- Introduced OrderItem and Shipment models with associated properties and actions. - Updated ObjectModels to include new models for better integration. - Refactored existing models to remove unnecessary ID references and improve hyperlink support for related objects. - Enhanced various models by removing deprecated fields and ensuring consistency in object references.
84 lines
1.6 KiB
JavaScript
84 lines
1.6 KiB
JavaScript
import AuditLogIcon from '../../components/Icons/AuditLogIcon'
|
|
|
|
export const AuditLog = {
|
|
name: 'auditLog',
|
|
label: 'Audit Log',
|
|
prefix: 'ADL',
|
|
icon: AuditLogIcon,
|
|
actions: [],
|
|
columns: [
|
|
'_id',
|
|
'owner',
|
|
'parent',
|
|
'operation',
|
|
'changes',
|
|
'createdAt'
|
|
],
|
|
filters: ['_id', 'owner', 'parent', 'operation'],
|
|
sorters: ['createdAt'],
|
|
properties: [
|
|
{
|
|
name: '_id',
|
|
label: 'ID',
|
|
type: 'id',
|
|
objectType: 'auditLog',
|
|
columnFixed: 'left',
|
|
value: null,
|
|
showCopy: true
|
|
},
|
|
{
|
|
name: 'createdAt',
|
|
label: 'Created At',
|
|
type: 'dateTime',
|
|
value: null,
|
|
readOnly: true
|
|
},
|
|
{
|
|
name: 'updatedAt',
|
|
label: 'Updated At',
|
|
type: 'dateTime',
|
|
value: null,
|
|
readOnly: true
|
|
},
|
|
{
|
|
name: 'owner',
|
|
label: 'Owner',
|
|
type: 'object',
|
|
objectType: (objectData) => {
|
|
return objectData.ownerType
|
|
},
|
|
columnFixed: 'left',
|
|
value: null,
|
|
showCopy: true,
|
|
showHyperlink: true
|
|
},
|
|
{
|
|
name: 'parent',
|
|
label: 'Parent',
|
|
type: 'object',
|
|
objectType: (objectData) => {
|
|
return objectData.parentType
|
|
},
|
|
value: null,
|
|
showCopy: true,
|
|
showHyperlink: true
|
|
},
|
|
{
|
|
name: 'operation',
|
|
label: 'Operation',
|
|
columnWidth: 120,
|
|
type: 'operation'
|
|
},
|
|
{
|
|
name: 'changes',
|
|
label: 'Changes',
|
|
columnWidth: 500,
|
|
type: 'propertyChanges',
|
|
objectType: (objectData) => {
|
|
return objectData.parentType
|
|
},
|
|
showCopy: true
|
|
}
|
|
]
|
|
}
|