Refactor DocumentTemplate for Improved Readability and Layout Adjustments
All checks were successful
farmcontrol/farmcontrol-ui/pipeline/head This commit looks good
All checks were successful
farmcontrol/farmcontrol-ui/pipeline/head This commit looks good
- Reformatted the NewDocumentTemplate import for better readability. - Enhanced the layout of the DocumentTemplate component by adjusting column widths for various fields, improving overall data presentation. - Ensured consistent formatting in the content rendering of NewDocumentTemplate, enhancing code clarity.
This commit is contained in:
parent
b917636bf1
commit
39f1b31ac8
@ -5,7 +5,8 @@ const DocumentTemplateInfo = lazy(
|
||||
import('../../components/Dashboard/Management/DocumentTemplates/DocumentTemplateInfo')
|
||||
)
|
||||
const NewDocumentTemplate = lazy(
|
||||
() => import('../../components/Dashboard/Management/DocumentTemplates/NewDocumentTemplate')
|
||||
() =>
|
||||
import('../../components/Dashboard/Management/DocumentTemplates/NewDocumentTemplate')
|
||||
)
|
||||
import InfoCircleIcon from '../../components/Icons/InfoCircleIcon'
|
||||
import PlusIcon from '../../components/Icons/PlusIcon'
|
||||
@ -32,7 +33,11 @@ export const DocumentTemplate = {
|
||||
label: 'New Document Template',
|
||||
icon: PlusIcon,
|
||||
content: (objectData, { onOk } = {}) => {
|
||||
return createElement(NewDocumentTemplate, { defaultValues: objectData, onOk, reset: true })
|
||||
return createElement(NewDocumentTemplate, {
|
||||
defaultValues: objectData,
|
||||
onOk,
|
||||
reset: true
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -180,7 +185,7 @@ export const DocumentTemplate = {
|
||||
label: 'Object Type',
|
||||
required: true,
|
||||
type: 'objectType',
|
||||
columnWidth: 150,
|
||||
columnWidth: 180,
|
||||
empty: (documentTemplate) => {
|
||||
return documentTemplate.global
|
||||
}
|
||||
@ -223,7 +228,7 @@ export const DocumentTemplate = {
|
||||
masterFilter: { global: true, active: true },
|
||||
objectType: 'documentTemplate',
|
||||
showHyperlink: true,
|
||||
columnWidth: 200,
|
||||
columnWidth: 230,
|
||||
empty: (documentTemplate) => {
|
||||
return documentTemplate.global
|
||||
}
|
||||
@ -233,6 +238,7 @@ export const DocumentTemplate = {
|
||||
label: 'Document Printers',
|
||||
required: false,
|
||||
type: 'objectList',
|
||||
columnWidth: 230,
|
||||
objectType: 'documentPrinter',
|
||||
showHyperlink: true
|
||||
},
|
||||
@ -241,6 +247,7 @@ export const DocumentTemplate = {
|
||||
label: 'Referenced Templates',
|
||||
required: false,
|
||||
type: 'objectList',
|
||||
columnWidth: 230,
|
||||
objectType: 'documentTemplate',
|
||||
readOnly: true,
|
||||
showHyperlink: true
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user