From 1a68456be69e73bee43152d40384326b6b6960d3 Mon Sep 17 00:00:00 2001 From: Tom Butcher Date: Sun, 26 Jul 2026 19:07:36 +0100 Subject: [PATCH] Enhance Filament model to include vendor information - Added 'vendor' to the columns and filters in the Filament model for improved data categorization. - Introduced a new 'vendor' field with specific properties, enhancing the model's capability to track filament sources. --- src/database/models/Filament.js | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/src/database/models/Filament.js b/src/database/models/Filament.js index 464159a..ae30d7b 100644 --- a/src/database/models/Filament.js +++ b/src/database/models/Filament.js @@ -81,6 +81,7 @@ export const Filament = { columns: [ '_reference', 'name', + 'vendor', 'material', 'density', 'diameter', @@ -89,10 +90,11 @@ export const Filament = { 'createdAt', 'updatedAt' ], - filters: ['_id', 'name', 'material', 'cost', 'costWithTax'], + filters: ['_id', 'name', 'vendor', 'material', 'cost', 'costWithTax'], sorters: [ 'name', 'createdAt', + 'vendor', 'material', 'cost', 'costWithTax', @@ -126,6 +128,13 @@ export const Filament = { readOnly: true, columnWidth: 180 }, + { + name: 'updatedAt', + label: 'Updated At', + type: 'dateTime', + readOnly: true, + columnWidth: 175 + }, { name: 'name', label: 'Name', @@ -135,11 +144,13 @@ export const Filament = { columnWidth: 200 }, { - name: 'updatedAt', - label: 'Updated At', - type: 'dateTime', - readOnly: true, - columnWidth: 175 + name: 'vendor', + label: 'Vendor', + type: 'object', + objectType: 'vendor', + required: false, + showHyperlink: true, + columnWidth: 200 }, { name: 'material',