All checks were successful
farmcontrol/farmcontrol-ui/pipeline/head This commit looks good
83 lines
1.7 KiB
JavaScript
83 lines
1.7 KiB
JavaScript
import StockLocationIcon from '../../components/Icons/StockLocationIcon'
|
|
import InfoCircleIcon from '../../components/Icons/InfoCircleIcon'
|
|
|
|
export const StockLocation = {
|
|
name: 'stockLocation',
|
|
label: 'Stock Location',
|
|
prefix: 'SLN',
|
|
icon: StockLocationIcon,
|
|
actions: [
|
|
{
|
|
name: 'info',
|
|
label: 'Info',
|
|
default: true,
|
|
row: true,
|
|
icon: InfoCircleIcon,
|
|
url: (_id) =>
|
|
`/dashboard/inventory/stocklocations/info?stockLocationId=${_id}`
|
|
}
|
|
],
|
|
url: (id) => `/dashboard/inventory/stocklocations/info?stockLocationId=${id}`,
|
|
filters: ['_id', 'name'],
|
|
sorters: ['name', 'createdAt'],
|
|
columns: ['_reference', 'name', 'address', 'createdAt', 'updatedAt'],
|
|
properties: [
|
|
{
|
|
name: '_id',
|
|
label: 'ID',
|
|
type: 'id',
|
|
objectType: 'stockLocation',
|
|
showCopy: true,
|
|
readOnly: true,
|
|
columnWidth: 140
|
|
},
|
|
{
|
|
name: 'createdAt',
|
|
label: 'Created At',
|
|
type: 'dateTime',
|
|
readOnly: true,
|
|
columnWidth: 175
|
|
},
|
|
{
|
|
name: '_reference',
|
|
label: 'Reference',
|
|
type: 'reference',
|
|
columnFixed: 'left',
|
|
objectType: 'stockLocation',
|
|
showCopy: true,
|
|
readOnly: true,
|
|
columnWidth: 180
|
|
},
|
|
{
|
|
name: 'updatedAt',
|
|
label: 'Updated At',
|
|
type: 'dateTime',
|
|
readOnly: true,
|
|
columnWidth: 175
|
|
},
|
|
{
|
|
name: 'name',
|
|
label: 'Name',
|
|
type: 'text',
|
|
required: true,
|
|
columnWidth: 220
|
|
},
|
|
{
|
|
name: 'address',
|
|
label: 'Address',
|
|
type: 'address',
|
|
readOnly: false,
|
|
required: true,
|
|
columnWidth: 250
|
|
}
|
|
],
|
|
stats: [
|
|
{
|
|
name: 'total.count',
|
|
label: 'Locations',
|
|
type: 'number',
|
|
color: 'default'
|
|
}
|
|
]
|
|
}
|