diff --git a/client/public/locales/en/common.json b/client/public/locales/en/common.json index 7dfceed..fd26c6f 100644 --- a/client/public/locales/en/common.json +++ b/client/public/locales/en/common.json @@ -134,6 +134,7 @@ "id": "ID", "filament_name": "Filament", "filament": "Filament", + "price": "Price", "material": "Material", "weight_to_use": "Weight", "used_weight": "Used Weight", @@ -150,6 +151,7 @@ "archived": "Archived" }, "fields_help": { + "price": "Price of a full spool in the system configured currency.", "weight_to_use": "Select what weight value to enter. Measured weight is only available if the spool weight is set for the selected filament.", "used_weight": "How much filament has been used from the spool. A new spool should have 0g used.", "remaining_weight": "How much filament is left on the spool. For a new spool this should match the spool weight.", diff --git a/client/src/pages/spools/create.tsx b/client/src/pages/spools/create.tsx index f9c41f7..d33d6ff 100644 --- a/client/src/pages/spools/create.tsx +++ b/client/src/pages/spools/create.tsx @@ -201,7 +201,20 @@ export const SpoolCreate: React.FC - + + + diff --git a/client/src/pages/spools/edit.tsx b/client/src/pages/spools/edit.tsx index 1bbce4b..86b84ce 100644 --- a/client/src/pages/spools/edit.tsx +++ b/client/src/pages/spools/edit.tsx @@ -181,6 +181,20 @@ export const SpoolEdit: React.FC = () => { }} /> + + + diff --git a/client/src/pages/spools/list.tsx b/client/src/pages/spools/list.tsx index cc17f38..770ec17 100644 --- a/client/src/pages/spools/list.tsx +++ b/client/src/pages/spools/list.tsx @@ -73,6 +73,7 @@ const allColumns: (keyof ISpoolCollapsed & string)[] = [ "id", "combined_name", "filament.material", + "price", "used_weight", "remaining_weight", "used_length", @@ -312,6 +313,14 @@ export const SpoolList: React.FC = () => { filterValueQuery: useSpoolmanMaterials(), width: 120, }), + SortedColumn({ + id: "price", + i18ncat: "spool", + actions, + dataSource, + tableState, + width: 80, + }), NumberColumn({ id: "used_weight", i18ncat: "spool", diff --git a/client/src/pages/spools/model.tsx b/client/src/pages/spools/model.tsx index 7dd64d2..f365d03 100644 --- a/client/src/pages/spools/model.tsx +++ b/client/src/pages/spools/model.tsx @@ -6,6 +6,7 @@ export interface ISpool { first_used?: string; last_used?: string; filament: IFilament; + price?: number; remaining_weight?: number; used_weight: number; remaining_length?: number; diff --git a/client/src/pages/spools/show.tsx b/client/src/pages/spools/show.tsx index 2765310..bae1b39 100644 --- a/client/src/pages/spools/show.tsx +++ b/client/src/pages/spools/show.tsx @@ -58,6 +58,8 @@ export const SpoolShow: React.FC = () => { {t("spool.fields.filament")} + {t("spool.fields.price")} + {t("spool.fields.registered")}