Enhance DocumentPrinter components with labelWidth adjustments and UI improvements
All checks were successful
farmcontrol/farmcontrol-ui/pipeline/head This commit looks good

- Added labelWidth properties to NewDocumentPrinter and DocumentPrinterInfo components for better layout control.
- Updated the DocumentPrinter model to change the label from 'Current Document Size' to 'Document Size' for clarity.
- Improved the disabled state handling in DocumentPrinterInfo for better user experience during editing.
This commit is contained in:
Tom Butcher 2026-07-27 02:43:42 +01:00
parent 46173a54a5
commit 9e65f6d46d
3 changed files with 11 additions and 2 deletions

View File

@ -129,7 +129,9 @@ const DocumentPrinterInfo = () => {
}}
editLoading={objectFormState.editLoading}
formValid={objectFormState.formValid}
disabled={objectFormState.beingEditedByOther || objectFormState.loading}
disabled={
objectFormState.beingEditedByOther || objectFormState.loading
}
loading={objectFormState.editLoading}
/>
</Space>
@ -164,6 +166,7 @@ const DocumentPrinterInfo = () => {
loading={loading}
indicator={<LoadingOutlined />}
isEditing={isEditing}
labelWidth={165}
type='documentPrinter'
objectData={objectData}
/>

View File

@ -21,6 +21,7 @@ const NewDocumentPrinter = ({ onOk, defaultValues }) => {
bordered={false}
isEditing={true}
required={true}
labelWidth={100}
objectData={objectData}
/>
)
@ -35,6 +36,7 @@ const NewDocumentPrinter = ({ onOk, defaultValues }) => {
bordered={false}
isEditing={true}
required={false}
labelWidth={125}
visibleProperties={{ content: false, testObject: false }}
objectData={objectData}
/>
@ -52,8 +54,12 @@ const NewDocumentPrinter = ({ onOk, defaultValues }) => {
_id: false,
_reference: false,
createdAt: false,
connectedAt: false,
state: false,
online: false,
updatedAt: false
}}
labelWidth={130}
isEditing={false}
objectData={objectData}
/>

View File

@ -211,7 +211,7 @@ export const DocumentPrinter = {
},
{
name: 'currentDocumentSize',
label: 'Current Document Size',
label: 'Document Size',
required: false,
type: 'object',
objectType: 'documentSize',