Changed to show filament price if no spool price set and added tests

This commit is contained in:
pdsccode
2024-01-06 21:42:09 +01:00
parent 291d61fbba
commit 577ed1e680
4 changed files with 38 additions and 0 deletions

View File

@@ -52,6 +52,9 @@ function collapseSpool(element: ISpool): ISpoolCollapsed {
} else {
filament_name = element.filament.name ?? element.filament.id.toString();
}
if (!element.price){
element.price = element.filament.price;
}
return {
...element,
combined_name: filament_name,