diff --git a/src/database/models/Listing.js b/src/database/models/Listing.js index 8ae6f3f..24cafcf 100644 --- a/src/database/models/Listing.js +++ b/src/database/models/Listing.js @@ -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', diff --git a/src/database/models/StockLocation.js b/src/database/models/StockLocation.js index 54377e7..9d54ca0 100644 --- a/src/database/models/StockLocation.js +++ b/src/database/models/StockLocation.js @@ -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: [