diff --git a/src/components/Dashboard/Inventory/FilamentStocks/FilamentStockInfo.jsx b/src/components/Dashboard/Inventory/FilamentStocks/FilamentStockInfo.jsx index a61b642..ff6a44b 100644 --- a/src/components/Dashboard/Inventory/FilamentStocks/FilamentStockInfo.jsx +++ b/src/components/Dashboard/Inventory/FilamentStocks/FilamentStockInfo.jsx @@ -17,6 +17,7 @@ import FilamentStockIcon from '../../../Icons/FilamentStockIcon' import NoteIcon from '../../../Icons/NoteIcon' import AuditLogIcon from '../../../Icons/AuditLogIcon' import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder' +import DocumentPrintButton from '../../common/DocumentPrintButton' const FilamentStockInfo = () => { const location = useLocation() @@ -39,7 +40,8 @@ const FilamentStockInfo = () => { editLoading: false, formValid: false, lock: null, - loading: false + loading: false, + objectData: {} }) const actions = { @@ -75,6 +77,7 @@ const FilamentStockInfo = () => { type='filamentStock' id={filamentStockId} disabled={objectFormState.loading} + objectData={objectFormState.objectData} /> { visibleState={collapseState} updateVisibleState={updateCollapseState} /> + diff --git a/src/components/Dashboard/Management/DocumentPrinters/DocumentPrinterInfo.jsx b/src/components/Dashboard/Management/DocumentPrinters/DocumentPrinterInfo.jsx index 82e105c..67b126d 100644 --- a/src/components/Dashboard/Management/DocumentPrinters/DocumentPrinterInfo.jsx +++ b/src/components/Dashboard/Management/DocumentPrinters/DocumentPrinterInfo.jsx @@ -18,6 +18,7 @@ import ActionHandler from '../../common/ActionHandler.jsx' import ObjectActions from '../../common/ObjectActions.jsx' import ObjectTable from '../../common/ObjectTable.jsx' import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx' +import DocumentPrintButton from '../../common/DocumentPrintButton.jsx' const log = loglevel.getLogger('DocumentPrinterInfo') log.setLevel(config.logLevel) @@ -92,6 +93,7 @@ const DocumentPrinterInfo = () => { type='documentPrinter' id={documentPrinterId} disabled={loading} + objectData={objectData} /> { visibleState={collapseState} updateVisibleState={updateCollapseState} /> + diff --git a/src/components/Dashboard/Management/DocumentSizes/DocumentSizeInfo.jsx b/src/components/Dashboard/Management/DocumentSizes/DocumentSizeInfo.jsx index ea8432e..2ca40a4 100644 --- a/src/components/Dashboard/Management/DocumentSizes/DocumentSizeInfo.jsx +++ b/src/components/Dashboard/Management/DocumentSizes/DocumentSizeInfo.jsx @@ -19,6 +19,7 @@ import ActionHandler from '../../common/ActionHandler.jsx' import ObjectActions from '../../common/ObjectActions.jsx' import ObjectTable from '../../common/ObjectTable.jsx' import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx' +import DocumentPrintButton from '../../common/DocumentPrintButton.jsx' const log = loglevel.getLogger('DocumentSizeInfo') log.setLevel(config.logLevel) @@ -43,7 +44,8 @@ const DocumentSizeInfo = () => { editLoading: false, formValid: false, lock: null, - loading: false + loading: false, + objectData: {} }) const actions = { @@ -79,6 +81,7 @@ const DocumentSizeInfo = () => { type='documentSize' id={documentSizeId} disabled={objectFormState.loading} + objectData={objectFormState.objectData} /> { visibleState={collapseState} updateVisibleState={updateCollapseState} /> + diff --git a/src/components/Dashboard/Management/DocumentTemplates/DocumentTemplateInfo.jsx b/src/components/Dashboard/Management/DocumentTemplates/DocumentTemplateInfo.jsx index f087f73..c339114 100644 --- a/src/components/Dashboard/Management/DocumentTemplates/DocumentTemplateInfo.jsx +++ b/src/components/Dashboard/Management/DocumentTemplates/DocumentTemplateInfo.jsx @@ -19,6 +19,7 @@ import ActionHandler from '../../common/ActionHandler.jsx' import ObjectActions from '../../common/ObjectActions.jsx' import ObjectTable from '../../common/ObjectTable.jsx' import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx' +import DocumentPrintButton from '../../common/DocumentPrintButton.jsx' const log = loglevel.getLogger('DocumentTemplateInfo') log.setLevel(config.logLevel) @@ -45,7 +46,8 @@ const DocumentTemplateInfo = () => { editLoading: false, formValid: false, locked: false, - loading: false + loading: false, + objectData: {} }) const actions = { @@ -84,6 +86,7 @@ const DocumentTemplateInfo = () => { type='documentTemplate' id={documentTemplateId} disabled={objectFormState.loading} + objectData={objectFormState.objectData} /> { visibleState={collapseState} updateVisibleState={updateCollapseState} /> + @@ -126,7 +134,7 @@ const DocumentTemplateInfo = () => { ref={actionHandlerRef} > } active={collapseState.info} onToggle={(expanded) => updateCollapseState('info', expanded)} diff --git a/src/components/Dashboard/Management/Filaments/FilamentInfo.jsx b/src/components/Dashboard/Management/Filaments/FilamentInfo.jsx index 0bea273..e061ac3 100644 --- a/src/components/Dashboard/Management/Filaments/FilamentInfo.jsx +++ b/src/components/Dashboard/Management/Filaments/FilamentInfo.jsx @@ -20,6 +20,7 @@ import ObjectActions from '../../common/ObjectActions.jsx' import ObjectTable from '../../common/ObjectTable.jsx' import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx' import FilamentIcon from '../../../Icons/FilamentIcon.jsx' +import DocumentPrintButton from '../../common/DocumentPrintButton.jsx' const log = loglevel.getLogger('FilamentInfo') log.setLevel(config.logLevel) @@ -44,7 +45,8 @@ const FilamentInfo = () => { editLoading: false, formValid: false, lock: null, - loading: false + loading: false, + objectData: {} }) const actions = { @@ -83,6 +85,7 @@ const FilamentInfo = () => { type='filament' id={filamentId} disabled={objectFormState.loading} + objectData={objectFormState.objectData} /> { visibleState={collapseState} updateVisibleState={updateCollapseState} /> + diff --git a/src/components/Dashboard/Management/Hosts/HostInfo.jsx b/src/components/Dashboard/Management/Hosts/HostInfo.jsx index 4a0c147..ba1eb61 100644 --- a/src/components/Dashboard/Management/Hosts/HostInfo.jsx +++ b/src/components/Dashboard/Management/Hosts/HostInfo.jsx @@ -20,6 +20,8 @@ import ObjectActions from '../../common/ObjectActions.jsx' import ObjectTable from '../../common/ObjectTable.jsx' import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx' import HostOTP from './HostOtp.jsx' +import DocumentPrintButton from '../../common/DocumentPrintButton.jsx' +import PrinterIcon from '../../../Icons/PrinterIcon.jsx' const log = loglevel.getLogger('HostInfo') log.setLevel(config.logLevel) @@ -31,7 +33,7 @@ const HostInfo = () => { const hostId = new URLSearchParams(location.search).get('hostId') const [collapseState, updateCollapseState] = useCollapseState('HostInfo', { info: true, - stocks: true, + printers: true, notes: true, auditLogs: true }) @@ -42,7 +44,8 @@ const HostInfo = () => { editLoading: false, formValid: false, locked: false, - loading: false + loading: false, + objectData: {} }) const actions = { @@ -85,17 +88,24 @@ const HostInfo = () => { type='host' id={hostId} disabled={objectFormState.loading} + objectData={objectFormState.objectData} /> + @@ -158,6 +168,27 @@ const HostInfo = () => { + } + active={collapseState.printers} + onToggle={(expanded) => updateCollapseState('printers', expanded)} + collapseKey='printers' + > + {objectFormState.loading ? ( + + ) : ( + + )} + + } diff --git a/src/components/Dashboard/Management/NoteTypes/NoteTypeInfo.jsx b/src/components/Dashboard/Management/NoteTypes/NoteTypeInfo.jsx index ac850c3..eaad48b 100644 --- a/src/components/Dashboard/Management/NoteTypes/NoteTypeInfo.jsx +++ b/src/components/Dashboard/Management/NoteTypes/NoteTypeInfo.jsx @@ -15,6 +15,7 @@ import ActionHandler from '../../common/ActionHandler.jsx' import ObjectActions from '../../common/ObjectActions.jsx' import ObjectTable from '../../common/ObjectTable.jsx' import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx' +import DocumentPrintButton from '../../common/DocumentPrintButton.jsx' const NoteTypeInfo = () => { const location = useLocation() @@ -33,7 +34,8 @@ const NoteTypeInfo = () => { editLoading: false, formValid: false, lock: null, - loading: false + loading: false, + objectData: {} }) const actions = { @@ -69,6 +71,7 @@ const NoteTypeInfo = () => { type='noteType' id={noteTypeId} disabled={objectFormState.loading} + objectData={objectFormState.objectData} /> { visibleState={collapseState} updateVisibleState={updateCollapseState} /> + diff --git a/src/components/Dashboard/Management/Notes/NoteInfo.jsx b/src/components/Dashboard/Management/Notes/NoteInfo.jsx index 8481c18..95753df 100644 --- a/src/components/Dashboard/Management/Notes/NoteInfo.jsx +++ b/src/components/Dashboard/Management/Notes/NoteInfo.jsx @@ -18,6 +18,7 @@ import ActionHandler from '../../common/ActionHandler.jsx' import ObjectActions from '../../common/ObjectActions.jsx' import ObjectTable from '../../common/ObjectTable.jsx' import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx' +import DocumentPrintButton from '../../common/DocumentPrintButton.jsx' const log = loglevel.getLogger('NoteInfo') log.setLevel(config.logLevel) @@ -37,7 +38,8 @@ const NoteInfo = () => { editLoading: false, formValid: false, lock: null, - loading: false + loading: false, + objectData: {} }) const actions = { @@ -77,6 +79,7 @@ const NoteInfo = () => { type='note' id={noteId} disabled={objectFormState.loading} + objectData={objectFormState.objectData} /> { visibleState={collapseState} updateVisibleState={updateCollapseState} /> + diff --git a/src/components/Dashboard/Management/Parts/PartInfo.jsx b/src/components/Dashboard/Management/Parts/PartInfo.jsx index f90130f..bdcc330 100644 --- a/src/components/Dashboard/Management/Parts/PartInfo.jsx +++ b/src/components/Dashboard/Management/Parts/PartInfo.jsx @@ -16,6 +16,7 @@ import ActionHandler from '../../common/ActionHandler.jsx' import ObjectActions from '../../common/ObjectActions.jsx' import ObjectTable from '../../common/ObjectTable.jsx' import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx' +import DocumentPrintButton from '../../common/DocumentPrintButton.jsx' import { ApiServerContext } from '../../context/ApiServerContext' const PartInfo = () => { @@ -78,6 +79,7 @@ const PartInfo = () => { type='part' id={partId} disabled={objectFormState.loading} + objectData={objectFormState.objectData} /> { visibleState={collapseState} updateVisibleState={updateCollapseState} /> + diff --git a/src/components/Dashboard/Management/Products/ProductInfo.jsx b/src/components/Dashboard/Management/Products/ProductInfo.jsx index 7a996fb..d8c1380 100644 --- a/src/components/Dashboard/Management/Products/ProductInfo.jsx +++ b/src/components/Dashboard/Management/Products/ProductInfo.jsx @@ -17,6 +17,7 @@ import ObjectTable from '../../common/ObjectTable.jsx' import ActionHandler from '../../common/ActionHandler.jsx' import ObjectActions from '../../common/ObjectActions.jsx' import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx' +import DocumentPrintButton from '../../common/DocumentPrintButton.jsx' const ProductInfo = () => { const location = useLocation() @@ -70,6 +71,7 @@ const ProductInfo = () => { type='product' id={productId} disabled={objectFormState.loading} + objectData={objectFormState.objectData} /> { visibleState={collapseState} updateVisibleState={updateCollapseState} /> + diff --git a/src/components/Dashboard/Management/Users/UserInfo.jsx b/src/components/Dashboard/Management/Users/UserInfo.jsx index dfaa905..87f79ce 100644 --- a/src/components/Dashboard/Management/Users/UserInfo.jsx +++ b/src/components/Dashboard/Management/Users/UserInfo.jsx @@ -17,6 +17,7 @@ import ActionHandler from '../../common/ActionHandler' import ObjectActions from '../../common/ObjectActions.jsx' import ObjectTable from '../../common/ObjectTable.jsx' import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx' +import DocumentPrintButton from '../../common/DocumentPrintButton.jsx' const UserInfo = () => { const location = useLocation() @@ -33,7 +34,8 @@ const UserInfo = () => { editLoading: false, formValid: false, lock: null, - loading: false + loading: false, + objectData: {} }) const actions = { @@ -69,6 +71,7 @@ const UserInfo = () => { type='user' id={userId} disabled={objectFormState.loading} + objectData={objectFormState.objectData} /> { visibleState={collapseState} updateVisibleState={updateCollapseState} /> + diff --git a/src/components/Dashboard/Management/Vendors/VendorInfo.jsx b/src/components/Dashboard/Management/Vendors/VendorInfo.jsx index 3b2eb56..b525f82 100644 --- a/src/components/Dashboard/Management/Vendors/VendorInfo.jsx +++ b/src/components/Dashboard/Management/Vendors/VendorInfo.jsx @@ -18,6 +18,7 @@ import ActionHandler from '../../common/ActionHandler.jsx' import ObjectActions from '../../common/ObjectActions.jsx' import ObjectTable from '../../common/ObjectTable.jsx' import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx' +import DocumentPrintButton from '../../common/DocumentPrintButton.jsx' const log = loglevel.getLogger('VendorInfo') log.setLevel(config.logLevel) @@ -37,7 +38,8 @@ const VendorInfo = () => { editLoading: false, formValid: false, lock: null, - loading: false + loading: false, + objectData: {} }) const actions = { @@ -77,6 +79,7 @@ const VendorInfo = () => { type='vendor' id={vendorId} disabled={objectFormState.loading} + objectData={objectFormState.objectData} /> { visibleState={collapseState} updateVisibleState={updateCollapseState} /> + diff --git a/src/components/Dashboard/Production/GCodeFiles/GCodeFileInfo.jsx b/src/components/Dashboard/Production/GCodeFiles/GCodeFileInfo.jsx index b59c10b..c95ac04 100644 --- a/src/components/Dashboard/Production/GCodeFiles/GCodeFileInfo.jsx +++ b/src/components/Dashboard/Production/GCodeFiles/GCodeFileInfo.jsx @@ -20,6 +20,7 @@ import ObjectActions from '../../common/ObjectActions.jsx' import ObjectTable from '../../common/ObjectTable.jsx' import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx' import EyeIcon from '../../../Icons/EyeIcon.jsx' +import DocumentPrintButton from '../../common/DocumentPrintButton.jsx' const { Text } = Typography @@ -46,7 +47,8 @@ const GCodeFileInfo = () => { editLoading: false, formValid: false, locked: false, - loading: false + loading: false, + objectData: {} }) const actions = { @@ -85,6 +87,7 @@ const GCodeFileInfo = () => { type='gcodeFile' id={gcodeFileId} disabled={objectFormState.loading} + objectData={objectFormState.objectData} /> { visibleState={collapseState} updateVisibleState={updateCollapseState} /> + diff --git a/src/components/Dashboard/Production/Jobs/JobInfo.jsx b/src/components/Dashboard/Production/Jobs/JobInfo.jsx index 3ed18a2..567cc35 100644 --- a/src/components/Dashboard/Production/Jobs/JobInfo.jsx +++ b/src/components/Dashboard/Production/Jobs/JobInfo.jsx @@ -20,6 +20,7 @@ import ObjectActions from '../../common/ObjectActions.jsx' import ObjectTable from '../../common/ObjectTable.jsx' import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx' import JobIcon from '../../../Icons/JobIcon.jsx' +import DocumentPrintButton from '../../common/DocumentPrintButton.jsx' const log = loglevel.getLogger('JobInfo') log.setLevel(config.logLevel) @@ -41,7 +42,8 @@ const JobInfo = () => { editLoading: false, formValid: false, locked: false, - loading: false + loading: false, + objectData: {} }) const actions = { @@ -80,6 +82,7 @@ const JobInfo = () => { type='job' id={jobId} disabled={objectFormState.loading} + objectData={objectFormState.objectData} /> { visibleState={collapseState} updateVisibleState={updateCollapseState} /> +