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')
|
import('../../components/Dashboard/Management/DocumentTemplates/DocumentTemplateInfo')
|
||||||
)
|
)
|
||||||
const NewDocumentTemplate = lazy(
|
const NewDocumentTemplate = lazy(
|
||||||
() => import('../../components/Dashboard/Management/DocumentTemplates/NewDocumentTemplate')
|
() =>
|
||||||
|
import('../../components/Dashboard/Management/DocumentTemplates/NewDocumentTemplate')
|
||||||
)
|
)
|
||||||
import InfoCircleIcon from '../../components/Icons/InfoCircleIcon'
|
import InfoCircleIcon from '../../components/Icons/InfoCircleIcon'
|
||||||
import PlusIcon from '../../components/Icons/PlusIcon'
|
import PlusIcon from '../../components/Icons/PlusIcon'
|
||||||
@ -32,7 +33,11 @@ export const DocumentTemplate = {
|
|||||||
label: 'New Document Template',
|
label: 'New Document Template',
|
||||||
icon: PlusIcon,
|
icon: PlusIcon,
|
||||||
content: (objectData, { onOk } = {}) => {
|
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',
|
label: 'Object Type',
|
||||||
required: true,
|
required: true,
|
||||||
type: 'objectType',
|
type: 'objectType',
|
||||||
columnWidth: 150,
|
columnWidth: 180,
|
||||||
empty: (documentTemplate) => {
|
empty: (documentTemplate) => {
|
||||||
return documentTemplate.global
|
return documentTemplate.global
|
||||||
}
|
}
|
||||||
@ -223,7 +228,7 @@ export const DocumentTemplate = {
|
|||||||
masterFilter: { global: true, active: true },
|
masterFilter: { global: true, active: true },
|
||||||
objectType: 'documentTemplate',
|
objectType: 'documentTemplate',
|
||||||
showHyperlink: true,
|
showHyperlink: true,
|
||||||
columnWidth: 200,
|
columnWidth: 230,
|
||||||
empty: (documentTemplate) => {
|
empty: (documentTemplate) => {
|
||||||
return documentTemplate.global
|
return documentTemplate.global
|
||||||
}
|
}
|
||||||
@ -233,6 +238,7 @@ export const DocumentTemplate = {
|
|||||||
label: 'Document Printers',
|
label: 'Document Printers',
|
||||||
required: false,
|
required: false,
|
||||||
type: 'objectList',
|
type: 'objectList',
|
||||||
|
columnWidth: 230,
|
||||||
objectType: 'documentPrinter',
|
objectType: 'documentPrinter',
|
||||||
showHyperlink: true
|
showHyperlink: true
|
||||||
},
|
},
|
||||||
@ -241,6 +247,7 @@ export const DocumentTemplate = {
|
|||||||
label: 'Referenced Templates',
|
label: 'Referenced Templates',
|
||||||
required: false,
|
required: false,
|
||||||
type: 'objectList',
|
type: 'objectList',
|
||||||
|
columnWidth: 230,
|
||||||
objectType: 'documentTemplate',
|
objectType: 'documentTemplate',
|
||||||
readOnly: true,
|
readOnly: true,
|
||||||
showHyperlink: true
|
showHyperlink: true
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user