Add pendingSlicerUploads and queue properties to printer components

- Updated ControlPrinter, NewPrinter, and PrinterInfo components to include pendingSlicerUploads and queue properties for enhanced state management.
- Modified Printer model to define pendingSlicerUploads structure, improving data handling for printer uploads.
This commit is contained in:
Tom Butcher 2026-07-24 22:19:53 +01:00
parent 80ecc8a175
commit c201d26744
4 changed files with 39 additions and 3 deletions

View File

@ -341,6 +341,7 @@ const ControlPrinter = ({ slicerIntegration = false }) => {
createdAt: false,
updatedAt: false,
state: !slicerIntegration,
pendingSlicerUploads: false,
name: !slicerIntegration
}}
objectPropertyProps={{

View File

@ -53,7 +53,8 @@ const NewPrinter = ({ onOk, defaultValues }) => {
'currentJob._id': false,
currentSubJob: false,
'currentSubJob._id': false,
alerts: false
alerts: false,
queue: false
}}
/>
)
@ -80,7 +81,10 @@ const NewPrinter = ({ onOk, defaultValues }) => {
'currentJob._id': false,
currentSubJob: false,
'currentSubJob._id': false,
alerts: false
alerts: false,
pendingSlicerUploads: false,
online: false,
queue: false
}}
isEditing={false}
objectData={objectData}

View File

@ -171,7 +171,8 @@ const PrinterInfo = () => {
'currentJob._id': false,
currentSubJob: false,
'currentSubJob._id': false,
alerts: false
alerts: false,
pendingSlicerUploads: false
}}
/>
)}

View File

@ -406,6 +406,36 @@ export const Printer = {
required: false,
readOnly: true,
columnWidth: 200
},
{
name: 'pendingSlicerUploads',
type: 'objectChildren',
label: 'Pending Slicer Uploads',
properties: [
{
name: 'file',
label: 'File',
type: 'object',
objectType: 'file',
required: true,
showHyperlink: true
},
{
name: 'shouldPrint',
label: 'Should Print',
type: 'bool',
required: true,
columnWidth: 125
},
{
name: 'job',
label: 'Job',
type: 'object',
objectType: 'job',
required: false,
showHyperlink: true
}
]
}
],
stats: [