Compare commits

...

2 Commits

Author SHA1 Message Date
4fbb434103 Refactor DocumentSizeInfo and DocumentTemplateInfo components for improved UI and functionality
All checks were successful
farmcontrol/farmcontrol-ui/pipeline/head This commit looks good
- Adjusted the disabled state logic in DocumentSizeInfo and DocumentTemplateInfo components for better clarity during editing.
- Added labelWidth properties to DocumentTemplateInfo for enhanced layout control.
- Updated the labelWidth in DocumentTemplateInfo to improve consistency in UI presentation.
2026-07-27 02:48:48 +01:00
71b432ba4d Refactor DocumentSize model to update 'updatedAt' field and adjust visibility logic
- Added a new 'updatedAt' field to the DocumentSize model for tracking updates, ensuring it is read-only and properly formatted.
- Removed the previous 'updatedAt' field and adjusted the visibility logic for the 'width' field based on the 'infiniteHeight' property, enhancing user experience.
2026-07-27 02:45:57 +01:00
4 changed files with 30 additions and 24 deletions

View File

@ -121,7 +121,9 @@ const DocumentSizeInfo = () => {
}} }}
editLoading={objectFormState.editLoading} editLoading={objectFormState.editLoading}
formValid={objectFormState.formValid} formValid={objectFormState.formValid}
disabled={objectFormState.beingEditedByOther || objectFormState.loading} disabled={
objectFormState.beingEditedByOther || objectFormState.loading
}
loading={objectFormState.editLoading} loading={objectFormState.editLoading}
/> />
</Space> </Space>
@ -154,6 +156,7 @@ const DocumentSizeInfo = () => {
loading={loading} loading={loading}
indicator={<LoadingOutlined />} indicator={<LoadingOutlined />}
isEditing={isEditing} isEditing={isEditing}
labelWidth={160}
type='documentSize' type='documentSize'
objectData={objectData} objectData={objectData}
/> />

View File

@ -126,7 +126,9 @@ const DocumentTemplateInfo = () => {
}} }}
editLoading={objectFormState.editLoading} editLoading={objectFormState.editLoading}
formValid={objectFormState.formValid} formValid={objectFormState.formValid}
disabled={objectFormState.beingEditedByOther || objectFormState.loading} disabled={
objectFormState.beingEditedByOther || objectFormState.loading
}
loading={objectFormState.editLoading} loading={objectFormState.editLoading}
/> />
</Space> </Space>
@ -167,7 +169,7 @@ const DocumentTemplateInfo = () => {
content: false, content: false,
testObject: false testObject: false
}} }}
labelWidth='175px' labelWidth='190px'
/> />
) )
}} }}

View File

@ -84,6 +84,13 @@ export const DocumentJob = {
readOnly: true, readOnly: true,
columnWidth: 180 columnWidth: 180
}, },
{
name: 'updatedAt',
label: 'Updated At',
type: 'dateTime',
readOnly: true,
columnWidth: 175
},
{ {
name: 'name', name: 'name',
label: 'Name', label: 'Name',
@ -97,13 +104,7 @@ export const DocumentJob = {
} }
} }
}, },
{
name: 'updatedAt',
label: 'Updated At',
type: 'dateTime',
readOnly: true,
columnWidth: 175
},
{ {
name: 'state', name: 'state',
label: 'Status', label: 'Status',

View File

@ -98,6 +98,13 @@ export const DocumentSize = {
readOnly: true, readOnly: true,
columnWidth: 180 columnWidth: 180
}, },
{
name: 'updatedAt',
label: 'Updated At',
type: 'dateTime',
readOnly: true,
columnWidth: 175
},
{ {
name: 'name', name: 'name',
label: 'Name', label: 'Name',
@ -107,11 +114,11 @@ export const DocumentSize = {
columnFixed: 'left' columnFixed: 'left'
}, },
{ {
name: 'updatedAt', name: 'infiniteHeight',
label: 'Updated At', label: 'Infinite Height',
type: 'dateTime', required: true,
readOnly: true, columnWidth: 150,
columnWidth: 175 type: 'bool'
}, },
{ {
name: 'width', name: 'width',
@ -128,16 +135,9 @@ export const DocumentSize = {
columnWidth: 150, columnWidth: 150,
type: 'number', type: 'number',
suffix: 'mm', suffix: 'mm',
disabled: (objectData) => { visible: (objectData) => {
return objectData.infiniteHeight return !objectData.infiniteHeight
} }
},
{
name: 'infiniteHeight',
label: 'Infinite Height',
required: true,
columnWidth: 150,
type: 'bool'
} }
] ]
} }