Implemented stock locations.
Some checks failed
farmcontrol/farmcontrol-ui/pipeline/head There was a failure building this commit

This commit is contained in:
Tom Butcher 2026-05-17 16:54:57 +01:00
parent f289bbb6b2
commit c57446836e
2 changed files with 33 additions and 7 deletions

View File

@ -106,6 +106,8 @@ export const Listing = {
'_reference',
'title',
'product',
'vendor',
'stockLocation',
'marketplace',
'state',
'price',
@ -118,6 +120,8 @@ export const Listing = {
'title',
'_id',
'product',
'vendor',
'stockLocation',
'marketplace',
'state',
'createdAt',
@ -125,6 +129,7 @@ export const Listing = {
],
sorters: [
'title',
'vendor',
'state',
'price',
'lastSyncedAt',
@ -132,7 +137,7 @@ export const Listing = {
'updatedAt',
'_id'
],
group: ['marketplace', 'product'],
group: ['marketplace', 'product', 'vendor', 'stockLocation'],
properties: [
{
name: '_id',
@ -192,6 +197,26 @@ export const Listing = {
required: false,
columnWidth: 200
},
{
name: 'vendor',
label: 'Vendor',
type: 'object',
objectType: 'vendor',
showHyperlink: true,
readOnly: false,
required: true,
columnWidth: 200
},
{
name: 'stockLocation',
label: 'Stock Location',
type: 'object',
objectType: 'stockLocation',
showHyperlink: true,
readOnly: false,
required: true,
columnWidth: 200
},
{
name: 'marketplace',
label: 'Marketplace',

View File

@ -20,7 +20,7 @@ export const StockLocation = {
url: (id) => `/dashboard/inventory/stocklocations/info?stockLocationId=${id}`,
filters: ['_id', 'name'],
sorters: ['name', 'createdAt'],
columns: ['_reference', 'name', 'createdAt', 'updatedAt'],
columns: ['_reference', 'name', 'address', 'createdAt', 'updatedAt'],
properties: [
{
name: '_id',
@ -62,11 +62,12 @@ export const StockLocation = {
columnWidth: 220
},
{
name: 'notes',
label: 'Notes',
type: 'text',
required: false,
columnWidth: 280
name: 'address',
label: 'Address',
type: 'address',
readOnly: false,
required: true,
columnWidth: 250
}
],
stats: [