Tom Butcher 2fbafc5396 Refactor database models to replace '_id' with '_reference' in columns
- Updated multiple models to change the column identifier from '_id' to '_reference' for consistency across the database schema.
- Adjusted relevant filters and properties to align with the new column naming convention.
2025-12-27 21:22:59 +00:00

54 lines
1.2 KiB
JavaScript

import StockAuditIcon from '../../components/Icons/StockAuditIcon'
import InfoCircleIcon from '../../components/Icons/InfoCircleIcon'
export const StockAudit = {
name: 'stockAudit',
label: 'Stock Audit',
prefix: 'SAU',
icon: StockAuditIcon,
actions: [
{
name: 'info',
label: 'Info',
default: true,
row: true,
icon: InfoCircleIcon,
url: (_id) => `/dashboard/inventory/stockaudits/info?stockAuditId=${_id}`
}
],
url: (id) => `/dashboard/inventory/stockaudits/info?stockAuditId=${id}`,
columns: ['_reference', 'state', 'createdAt', 'updatedAt'],
filters: ['_id'],
sorters: ['createdAt', 'updatedAt'],
group: ['state'],
properties: [
{
name: '_id',
label: 'ID',
type: 'id',
objectType: 'stockAudit',
showCopy: true,
readOnly: true
},
{
name: 'createdAt',
label: 'Created At',
type: 'dateTime',
readOnly: true
},
{
name: 'state',
label: 'State',
type: 'state',
readOnly: true,
columnWidth: 120
},
{
name: 'updatedAt',
label: 'Updated At',
type: 'dateTime',
readOnly: true
}
]
}