- 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.
88 lines
1.7 KiB
JavaScript
88 lines
1.7 KiB
JavaScript
import NoteIcon from '../../components/Icons/NoteIcon'
|
|
import InfoCircleIcon from '../../components/Icons/InfoCircleIcon'
|
|
|
|
export const Note = {
|
|
name: 'note',
|
|
label: 'Note',
|
|
prefix: 'NTE',
|
|
icon: NoteIcon,
|
|
actions: [
|
|
{
|
|
name: 'info',
|
|
label: 'Info',
|
|
default: true,
|
|
row: true,
|
|
icon: InfoCircleIcon,
|
|
url: (_id) => `/dashboard/management/notes/info?noteId=${_id}`
|
|
}
|
|
],
|
|
properties: [
|
|
{
|
|
name: '_id',
|
|
label: 'ID',
|
|
type: 'id',
|
|
objectType: 'note',
|
|
showCopy: true
|
|
},
|
|
{
|
|
name: 'createdAt',
|
|
label: 'Created At',
|
|
type: 'dateTime',
|
|
readOnly: true
|
|
},
|
|
{
|
|
name: '_reference',
|
|
label: 'Reference',
|
|
type: 'reference',
|
|
columnFixed: 'left',
|
|
objectType: 'note',
|
|
showCopy: true,
|
|
readOnly: true
|
|
},
|
|
{
|
|
name: 'updatedAt',
|
|
label: 'Updated At',
|
|
type: 'dateTime',
|
|
readOnly: true
|
|
},
|
|
{
|
|
name: 'user',
|
|
label: 'User',
|
|
type: 'object',
|
|
objectType: 'user',
|
|
showHyperlink: true
|
|
},
|
|
{
|
|
name: 'parentType',
|
|
label: 'Parent Type',
|
|
type: 'objectType',
|
|
required: true
|
|
},
|
|
{
|
|
name: 'parent',
|
|
label: 'Parent',
|
|
type: 'object',
|
|
objectType: (objectData) => {
|
|
return objectData.parentType
|
|
},
|
|
showHyperlink: true,
|
|
required: true
|
|
},
|
|
{
|
|
name: 'content',
|
|
label: 'Content',
|
|
type: 'markdown',
|
|
required: true,
|
|
span: 2
|
|
},
|
|
{
|
|
name: 'noteType',
|
|
label: 'Note Type',
|
|
type: 'object',
|
|
objectType: 'noteType',
|
|
showHyperlink: true,
|
|
required: true
|
|
}
|
|
]
|
|
}
|