Enhance Filament model to include vendor information
All checks were successful
farmcontrol/farmcontrol-ui/pipeline/head This commit looks good

- 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.
This commit is contained in:
Tom Butcher 2026-07-26 19:07:36 +01:00
parent cc712e7427
commit 1a68456be6

View File

@ -81,6 +81,7 @@ export const Filament = {
columns: [ columns: [
'_reference', '_reference',
'name', 'name',
'vendor',
'material', 'material',
'density', 'density',
'diameter', 'diameter',
@ -89,10 +90,11 @@ export const Filament = {
'createdAt', 'createdAt',
'updatedAt' 'updatedAt'
], ],
filters: ['_id', 'name', 'material', 'cost', 'costWithTax'], filters: ['_id', 'name', 'vendor', 'material', 'cost', 'costWithTax'],
sorters: [ sorters: [
'name', 'name',
'createdAt', 'createdAt',
'vendor',
'material', 'material',
'cost', 'cost',
'costWithTax', 'costWithTax',
@ -126,6 +128,13 @@ export const Filament = {
readOnly: true, readOnly: true,
columnWidth: 180 columnWidth: 180
}, },
{
name: 'updatedAt',
label: 'Updated At',
type: 'dateTime',
readOnly: true,
columnWidth: 175
},
{ {
name: 'name', name: 'name',
label: 'Name', label: 'Name',
@ -135,11 +144,13 @@ export const Filament = {
columnWidth: 200 columnWidth: 200
}, },
{ {
name: 'updatedAt', name: 'vendor',
label: 'Updated At', label: 'Vendor',
type: 'dateTime', type: 'object',
readOnly: true, objectType: 'vendor',
columnWidth: 175 required: false,
showHyperlink: true,
columnWidth: 200
}, },
{ {
name: 'material', name: 'material',