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

View File

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

View File

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

View File

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