diff --git a/client/public/locales/en/common.json b/client/public/locales/en/common.json index ff9c0ef..fbf8ee8 100644 --- a/client/public/locales/en/common.json +++ b/client/public/locales/en/common.json @@ -53,6 +53,7 @@ "id": "Id", "filament_name": "Filament", "filament": "Filament", + "material": "Material", "used_weight": "Used Weight", "remaining_weight": "Remaining Weight", "used_length": "Used Length", diff --git a/client/public/locales/sv/common.json b/client/public/locales/sv/common.json index 6c47923..67e0244 100644 --- a/client/public/locales/sv/common.json +++ b/client/public/locales/sv/common.json @@ -53,6 +53,7 @@ "id": "Id", "filament_name": "Filament", "filament": "Filament", + "material": "Material", "used_weight": "Använd vikt", "remaining_weight": "Återstående vikt", "used_length": "Använd längd", diff --git a/client/src/pages/spools/list.tsx b/client/src/pages/spools/list.tsx index d1c8a2b..ceebf26 100644 --- a/client/src/pages/spools/list.tsx +++ b/client/src/pages/spools/list.tsx @@ -35,6 +35,7 @@ dayjs.extend(utc); interface ISpoolCollapsed extends ISpool { filament_name: string; + material?: string; } export const SpoolList: React.FC = () => { @@ -75,6 +76,7 @@ export const SpoolList: React.FC = () => { const allColumns: (keyof ISpoolCollapsed & string)[] = [ "id", "filament_name", + "material", "used_weight", "remaining_weight", "used_length", @@ -120,7 +122,11 @@ export const SpoolList: React.FC = () => { filament_name = element.filament.name ?? element.filament.id.toString(); } - return { ...element, filament_name }; + return { + ...element, + filament_name, + material: element.filament.material, + }; }), [tableProps.dataSource] ); @@ -200,6 +206,12 @@ export const SpoolList: React.FC = () => { dataSource, tableState, })} + {FilteredColumn({ + id: "material", + i18ncat: "spool", + dataSource, + tableState, + })} {NumberColumn({ id: "used_weight", i18ncat: "spool",