Add DocumentPrintButton to various management components and update objectData handling
This commit is contained in:
parent
204a881dfa
commit
fbdb451659
@ -17,6 +17,7 @@ import FilamentStockIcon from '../../../Icons/FilamentStockIcon'
|
|||||||
import NoteIcon from '../../../Icons/NoteIcon'
|
import NoteIcon from '../../../Icons/NoteIcon'
|
||||||
import AuditLogIcon from '../../../Icons/AuditLogIcon'
|
import AuditLogIcon from '../../../Icons/AuditLogIcon'
|
||||||
import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder'
|
import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder'
|
||||||
|
import DocumentPrintButton from '../../common/DocumentPrintButton'
|
||||||
|
|
||||||
const FilamentStockInfo = () => {
|
const FilamentStockInfo = () => {
|
||||||
const location = useLocation()
|
const location = useLocation()
|
||||||
@ -39,7 +40,8 @@ const FilamentStockInfo = () => {
|
|||||||
editLoading: false,
|
editLoading: false,
|
||||||
formValid: false,
|
formValid: false,
|
||||||
lock: null,
|
lock: null,
|
||||||
loading: false
|
loading: false,
|
||||||
|
objectData: {}
|
||||||
})
|
})
|
||||||
|
|
||||||
const actions = {
|
const actions = {
|
||||||
@ -75,6 +77,7 @@ const FilamentStockInfo = () => {
|
|||||||
type='filamentStock'
|
type='filamentStock'
|
||||||
id={filamentStockId}
|
id={filamentStockId}
|
||||||
disabled={objectFormState.loading}
|
disabled={objectFormState.loading}
|
||||||
|
objectData={objectFormState.objectData}
|
||||||
/>
|
/>
|
||||||
<ViewButton
|
<ViewButton
|
||||||
disabled={objectFormState.loading}
|
disabled={objectFormState.loading}
|
||||||
@ -87,6 +90,11 @@ const FilamentStockInfo = () => {
|
|||||||
visibleState={collapseState}
|
visibleState={collapseState}
|
||||||
updateVisibleState={updateCollapseState}
|
updateVisibleState={updateCollapseState}
|
||||||
/>
|
/>
|
||||||
|
<DocumentPrintButton
|
||||||
|
type='filamentStock'
|
||||||
|
objectData={objectFormState.objectData}
|
||||||
|
disabled={objectFormState.loading}
|
||||||
|
/>
|
||||||
</Space>
|
</Space>
|
||||||
<LockIndicator lock={objectFormState.lock} />
|
<LockIndicator lock={objectFormState.lock} />
|
||||||
</Space>
|
</Space>
|
||||||
|
|||||||
@ -18,6 +18,7 @@ import ActionHandler from '../../common/ActionHandler.jsx'
|
|||||||
import ObjectActions from '../../common/ObjectActions.jsx'
|
import ObjectActions from '../../common/ObjectActions.jsx'
|
||||||
import ObjectTable from '../../common/ObjectTable.jsx'
|
import ObjectTable from '../../common/ObjectTable.jsx'
|
||||||
import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx'
|
import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx'
|
||||||
|
import DocumentPrintButton from '../../common/DocumentPrintButton.jsx'
|
||||||
|
|
||||||
const log = loglevel.getLogger('DocumentPrinterInfo')
|
const log = loglevel.getLogger('DocumentPrinterInfo')
|
||||||
log.setLevel(config.logLevel)
|
log.setLevel(config.logLevel)
|
||||||
@ -92,6 +93,7 @@ const DocumentPrinterInfo = () => {
|
|||||||
type='documentPrinter'
|
type='documentPrinter'
|
||||||
id={documentPrinterId}
|
id={documentPrinterId}
|
||||||
disabled={loading}
|
disabled={loading}
|
||||||
|
objectData={objectData}
|
||||||
/>
|
/>
|
||||||
<ViewButton
|
<ViewButton
|
||||||
disabled={loading}
|
disabled={loading}
|
||||||
@ -107,6 +109,11 @@ const DocumentPrinterInfo = () => {
|
|||||||
visibleState={collapseState}
|
visibleState={collapseState}
|
||||||
updateVisibleState={updateCollapseState}
|
updateVisibleState={updateCollapseState}
|
||||||
/>
|
/>
|
||||||
|
<DocumentPrintButton
|
||||||
|
type='documentPrinter'
|
||||||
|
objectData={objectData}
|
||||||
|
disabled={loading}
|
||||||
|
/>
|
||||||
</Space>
|
</Space>
|
||||||
<LockIndicator lock={lock} />
|
<LockIndicator lock={lock} />
|
||||||
</Space>
|
</Space>
|
||||||
|
|||||||
@ -19,6 +19,7 @@ import ActionHandler from '../../common/ActionHandler.jsx'
|
|||||||
import ObjectActions from '../../common/ObjectActions.jsx'
|
import ObjectActions from '../../common/ObjectActions.jsx'
|
||||||
import ObjectTable from '../../common/ObjectTable.jsx'
|
import ObjectTable from '../../common/ObjectTable.jsx'
|
||||||
import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx'
|
import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx'
|
||||||
|
import DocumentPrintButton from '../../common/DocumentPrintButton.jsx'
|
||||||
|
|
||||||
const log = loglevel.getLogger('DocumentSizeInfo')
|
const log = loglevel.getLogger('DocumentSizeInfo')
|
||||||
log.setLevel(config.logLevel)
|
log.setLevel(config.logLevel)
|
||||||
@ -43,7 +44,8 @@ const DocumentSizeInfo = () => {
|
|||||||
editLoading: false,
|
editLoading: false,
|
||||||
formValid: false,
|
formValid: false,
|
||||||
lock: null,
|
lock: null,
|
||||||
loading: false
|
loading: false,
|
||||||
|
objectData: {}
|
||||||
})
|
})
|
||||||
|
|
||||||
const actions = {
|
const actions = {
|
||||||
@ -79,6 +81,7 @@ const DocumentSizeInfo = () => {
|
|||||||
type='documentSize'
|
type='documentSize'
|
||||||
id={documentSizeId}
|
id={documentSizeId}
|
||||||
disabled={objectFormState.loading}
|
disabled={objectFormState.loading}
|
||||||
|
objectData={objectFormState.objectData}
|
||||||
/>
|
/>
|
||||||
<ViewButton
|
<ViewButton
|
||||||
disabled={objectFormState.loading}
|
disabled={objectFormState.loading}
|
||||||
@ -90,6 +93,11 @@ const DocumentSizeInfo = () => {
|
|||||||
visibleState={collapseState}
|
visibleState={collapseState}
|
||||||
updateVisibleState={updateCollapseState}
|
updateVisibleState={updateCollapseState}
|
||||||
/>
|
/>
|
||||||
|
<DocumentPrintButton
|
||||||
|
type='documentSize'
|
||||||
|
objectData={objectFormState.objectData}
|
||||||
|
disabled={objectFormState.loading}
|
||||||
|
/>
|
||||||
</Space>
|
</Space>
|
||||||
<LockIndicator lock={objectFormState.lock} />
|
<LockIndicator lock={objectFormState.lock} />
|
||||||
</Space>
|
</Space>
|
||||||
|
|||||||
@ -19,6 +19,7 @@ import ActionHandler from '../../common/ActionHandler.jsx'
|
|||||||
import ObjectActions from '../../common/ObjectActions.jsx'
|
import ObjectActions from '../../common/ObjectActions.jsx'
|
||||||
import ObjectTable from '../../common/ObjectTable.jsx'
|
import ObjectTable from '../../common/ObjectTable.jsx'
|
||||||
import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx'
|
import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx'
|
||||||
|
import DocumentPrintButton from '../../common/DocumentPrintButton.jsx'
|
||||||
|
|
||||||
const log = loglevel.getLogger('DocumentTemplateInfo')
|
const log = loglevel.getLogger('DocumentTemplateInfo')
|
||||||
log.setLevel(config.logLevel)
|
log.setLevel(config.logLevel)
|
||||||
@ -45,7 +46,8 @@ const DocumentTemplateInfo = () => {
|
|||||||
editLoading: false,
|
editLoading: false,
|
||||||
formValid: false,
|
formValid: false,
|
||||||
locked: false,
|
locked: false,
|
||||||
loading: false
|
loading: false,
|
||||||
|
objectData: {}
|
||||||
})
|
})
|
||||||
|
|
||||||
const actions = {
|
const actions = {
|
||||||
@ -84,6 +86,7 @@ const DocumentTemplateInfo = () => {
|
|||||||
type='documentTemplate'
|
type='documentTemplate'
|
||||||
id={documentTemplateId}
|
id={documentTemplateId}
|
||||||
disabled={objectFormState.loading}
|
disabled={objectFormState.loading}
|
||||||
|
objectData={objectFormState.objectData}
|
||||||
/>
|
/>
|
||||||
<ViewButton
|
<ViewButton
|
||||||
disabled={objectFormState.loading}
|
disabled={objectFormState.loading}
|
||||||
@ -95,6 +98,11 @@ const DocumentTemplateInfo = () => {
|
|||||||
visibleState={collapseState}
|
visibleState={collapseState}
|
||||||
updateVisibleState={updateCollapseState}
|
updateVisibleState={updateCollapseState}
|
||||||
/>
|
/>
|
||||||
|
<DocumentPrintButton
|
||||||
|
type='documentTemplate'
|
||||||
|
objectData={objectFormState.objectData}
|
||||||
|
disabled={objectFormState.loading}
|
||||||
|
/>
|
||||||
</Space>
|
</Space>
|
||||||
<LockIndicator lock={objectFormState.lock} />
|
<LockIndicator lock={objectFormState.lock} />
|
||||||
</Space>
|
</Space>
|
||||||
|
|||||||
@ -20,6 +20,7 @@ import ObjectActions from '../../common/ObjectActions.jsx'
|
|||||||
import ObjectTable from '../../common/ObjectTable.jsx'
|
import ObjectTable from '../../common/ObjectTable.jsx'
|
||||||
import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx'
|
import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx'
|
||||||
import FilamentIcon from '../../../Icons/FilamentIcon.jsx'
|
import FilamentIcon from '../../../Icons/FilamentIcon.jsx'
|
||||||
|
import DocumentPrintButton from '../../common/DocumentPrintButton.jsx'
|
||||||
|
|
||||||
const log = loglevel.getLogger('FilamentInfo')
|
const log = loglevel.getLogger('FilamentInfo')
|
||||||
log.setLevel(config.logLevel)
|
log.setLevel(config.logLevel)
|
||||||
@ -44,7 +45,8 @@ const FilamentInfo = () => {
|
|||||||
editLoading: false,
|
editLoading: false,
|
||||||
formValid: false,
|
formValid: false,
|
||||||
lock: null,
|
lock: null,
|
||||||
loading: false
|
loading: false,
|
||||||
|
objectData: {}
|
||||||
})
|
})
|
||||||
|
|
||||||
const actions = {
|
const actions = {
|
||||||
@ -83,6 +85,7 @@ const FilamentInfo = () => {
|
|||||||
type='filament'
|
type='filament'
|
||||||
id={filamentId}
|
id={filamentId}
|
||||||
disabled={objectFormState.loading}
|
disabled={objectFormState.loading}
|
||||||
|
objectData={objectFormState.objectData}
|
||||||
/>
|
/>
|
||||||
<ViewButton
|
<ViewButton
|
||||||
disabled={objectFormState.loading}
|
disabled={objectFormState.loading}
|
||||||
@ -95,6 +98,11 @@ const FilamentInfo = () => {
|
|||||||
visibleState={collapseState}
|
visibleState={collapseState}
|
||||||
updateVisibleState={updateCollapseState}
|
updateVisibleState={updateCollapseState}
|
||||||
/>
|
/>
|
||||||
|
<DocumentPrintButton
|
||||||
|
type='filament'
|
||||||
|
objectData={objectFormState.objectData}
|
||||||
|
disabled={objectFormState.loading}
|
||||||
|
/>
|
||||||
</Space>
|
</Space>
|
||||||
<LockIndicator lock={objectFormState.lock} />
|
<LockIndicator lock={objectFormState.lock} />
|
||||||
</Space>
|
</Space>
|
||||||
|
|||||||
@ -20,6 +20,8 @@ import ObjectActions from '../../common/ObjectActions.jsx'
|
|||||||
import ObjectTable from '../../common/ObjectTable.jsx'
|
import ObjectTable from '../../common/ObjectTable.jsx'
|
||||||
import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx'
|
import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx'
|
||||||
import HostOTP from './HostOtp.jsx'
|
import HostOTP from './HostOtp.jsx'
|
||||||
|
import DocumentPrintButton from '../../common/DocumentPrintButton.jsx'
|
||||||
|
import PrinterIcon from '../../../Icons/PrinterIcon.jsx'
|
||||||
|
|
||||||
const log = loglevel.getLogger('HostInfo')
|
const log = loglevel.getLogger('HostInfo')
|
||||||
log.setLevel(config.logLevel)
|
log.setLevel(config.logLevel)
|
||||||
@ -31,7 +33,7 @@ const HostInfo = () => {
|
|||||||
const hostId = new URLSearchParams(location.search).get('hostId')
|
const hostId = new URLSearchParams(location.search).get('hostId')
|
||||||
const [collapseState, updateCollapseState] = useCollapseState('HostInfo', {
|
const [collapseState, updateCollapseState] = useCollapseState('HostInfo', {
|
||||||
info: true,
|
info: true,
|
||||||
stocks: true,
|
printers: true,
|
||||||
notes: true,
|
notes: true,
|
||||||
auditLogs: true
|
auditLogs: true
|
||||||
})
|
})
|
||||||
@ -42,7 +44,8 @@ const HostInfo = () => {
|
|||||||
editLoading: false,
|
editLoading: false,
|
||||||
formValid: false,
|
formValid: false,
|
||||||
locked: false,
|
locked: false,
|
||||||
loading: false
|
loading: false,
|
||||||
|
objectData: {}
|
||||||
})
|
})
|
||||||
|
|
||||||
const actions = {
|
const actions = {
|
||||||
@ -85,17 +88,24 @@ const HostInfo = () => {
|
|||||||
type='host'
|
type='host'
|
||||||
id={hostId}
|
id={hostId}
|
||||||
disabled={objectFormState.loading}
|
disabled={objectFormState.loading}
|
||||||
|
objectData={objectFormState.objectData}
|
||||||
/>
|
/>
|
||||||
<ViewButton
|
<ViewButton
|
||||||
disabled={objectFormState.loading}
|
disabled={objectFormState.loading}
|
||||||
items={[
|
items={[
|
||||||
{ key: 'info', label: 'Host Information' },
|
{ key: 'info', label: 'Host Information' },
|
||||||
|
{ key: 'printers', label: 'Printers' },
|
||||||
{ key: 'notes', label: 'Notes' },
|
{ key: 'notes', label: 'Notes' },
|
||||||
{ key: 'auditLogs', label: 'Audit Logs' }
|
{ key: 'auditLogs', label: 'Audit Logs' }
|
||||||
]}
|
]}
|
||||||
visibleState={collapseState}
|
visibleState={collapseState}
|
||||||
updateVisibleState={updateCollapseState}
|
updateVisibleState={updateCollapseState}
|
||||||
/>
|
/>
|
||||||
|
<DocumentPrintButton
|
||||||
|
type='host'
|
||||||
|
objectData={objectFormState.objectData}
|
||||||
|
disabled={objectFormState.loading}
|
||||||
|
/>
|
||||||
</Space>
|
</Space>
|
||||||
<LockIndicator lock={objectFormState.lock} />
|
<LockIndicator lock={objectFormState.lock} />
|
||||||
</Space>
|
</Space>
|
||||||
@ -158,6 +168,27 @@ const HostInfo = () => {
|
|||||||
</InfoCollapse>
|
</InfoCollapse>
|
||||||
</ActionHandler>
|
</ActionHandler>
|
||||||
|
|
||||||
|
<InfoCollapse
|
||||||
|
title='Printers'
|
||||||
|
icon={<PrinterIcon />}
|
||||||
|
active={collapseState.printers}
|
||||||
|
onToggle={(expanded) => updateCollapseState('printers', expanded)}
|
||||||
|
collapseKey='printers'
|
||||||
|
>
|
||||||
|
{objectFormState.loading ? (
|
||||||
|
<InfoCollapsePlaceholder />
|
||||||
|
) : (
|
||||||
|
<ObjectTable
|
||||||
|
type='printer'
|
||||||
|
masterFilter={{ 'host._id': hostId }}
|
||||||
|
visibleColumns={{
|
||||||
|
host: false,
|
||||||
|
'host._id': false
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</InfoCollapse>
|
||||||
|
|
||||||
<InfoCollapse
|
<InfoCollapse
|
||||||
title='Notes'
|
title='Notes'
|
||||||
icon={<NoteIcon />}
|
icon={<NoteIcon />}
|
||||||
|
|||||||
@ -15,6 +15,7 @@ import ActionHandler from '../../common/ActionHandler.jsx'
|
|||||||
import ObjectActions from '../../common/ObjectActions.jsx'
|
import ObjectActions from '../../common/ObjectActions.jsx'
|
||||||
import ObjectTable from '../../common/ObjectTable.jsx'
|
import ObjectTable from '../../common/ObjectTable.jsx'
|
||||||
import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx'
|
import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx'
|
||||||
|
import DocumentPrintButton from '../../common/DocumentPrintButton.jsx'
|
||||||
|
|
||||||
const NoteTypeInfo = () => {
|
const NoteTypeInfo = () => {
|
||||||
const location = useLocation()
|
const location = useLocation()
|
||||||
@ -33,7 +34,8 @@ const NoteTypeInfo = () => {
|
|||||||
editLoading: false,
|
editLoading: false,
|
||||||
formValid: false,
|
formValid: false,
|
||||||
lock: null,
|
lock: null,
|
||||||
loading: false
|
loading: false,
|
||||||
|
objectData: {}
|
||||||
})
|
})
|
||||||
|
|
||||||
const actions = {
|
const actions = {
|
||||||
@ -69,6 +71,7 @@ const NoteTypeInfo = () => {
|
|||||||
type='noteType'
|
type='noteType'
|
||||||
id={noteTypeId}
|
id={noteTypeId}
|
||||||
disabled={objectFormState.loading}
|
disabled={objectFormState.loading}
|
||||||
|
objectData={objectFormState.objectData}
|
||||||
/>
|
/>
|
||||||
<ViewButton
|
<ViewButton
|
||||||
disabled={objectFormState.loading}
|
disabled={objectFormState.loading}
|
||||||
@ -79,6 +82,11 @@ const NoteTypeInfo = () => {
|
|||||||
visibleState={collapseState}
|
visibleState={collapseState}
|
||||||
updateVisibleState={updateCollapseState}
|
updateVisibleState={updateCollapseState}
|
||||||
/>
|
/>
|
||||||
|
<DocumentPrintButton
|
||||||
|
type='noteType'
|
||||||
|
objectData={objectFormState.objectData}
|
||||||
|
disabled={objectFormState.loading}
|
||||||
|
/>
|
||||||
</Space>
|
</Space>
|
||||||
<LockIndicator lock={objectFormState.lock} />
|
<LockIndicator lock={objectFormState.lock} />
|
||||||
</Space>
|
</Space>
|
||||||
|
|||||||
@ -18,6 +18,7 @@ import ActionHandler from '../../common/ActionHandler.jsx'
|
|||||||
import ObjectActions from '../../common/ObjectActions.jsx'
|
import ObjectActions from '../../common/ObjectActions.jsx'
|
||||||
import ObjectTable from '../../common/ObjectTable.jsx'
|
import ObjectTable from '../../common/ObjectTable.jsx'
|
||||||
import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx'
|
import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx'
|
||||||
|
import DocumentPrintButton from '../../common/DocumentPrintButton.jsx'
|
||||||
|
|
||||||
const log = loglevel.getLogger('NoteInfo')
|
const log = loglevel.getLogger('NoteInfo')
|
||||||
log.setLevel(config.logLevel)
|
log.setLevel(config.logLevel)
|
||||||
@ -37,7 +38,8 @@ const NoteInfo = () => {
|
|||||||
editLoading: false,
|
editLoading: false,
|
||||||
formValid: false,
|
formValid: false,
|
||||||
lock: null,
|
lock: null,
|
||||||
loading: false
|
loading: false,
|
||||||
|
objectData: {}
|
||||||
})
|
})
|
||||||
|
|
||||||
const actions = {
|
const actions = {
|
||||||
@ -77,6 +79,7 @@ const NoteInfo = () => {
|
|||||||
type='note'
|
type='note'
|
||||||
id={noteId}
|
id={noteId}
|
||||||
disabled={objectFormState.loading}
|
disabled={objectFormState.loading}
|
||||||
|
objectData={objectFormState.objectData}
|
||||||
/>
|
/>
|
||||||
<ViewButton
|
<ViewButton
|
||||||
disabled={objectFormState.loading}
|
disabled={objectFormState.loading}
|
||||||
@ -88,6 +91,11 @@ const NoteInfo = () => {
|
|||||||
visibleState={collapseState}
|
visibleState={collapseState}
|
||||||
updateVisibleState={updateCollapseState}
|
updateVisibleState={updateCollapseState}
|
||||||
/>
|
/>
|
||||||
|
<DocumentPrintButton
|
||||||
|
type='note'
|
||||||
|
objectData={objectFormState.objectData}
|
||||||
|
disabled={objectFormState.loading}
|
||||||
|
/>
|
||||||
</Space>
|
</Space>
|
||||||
<LockIndicator lock={objectFormState.lock} />
|
<LockIndicator lock={objectFormState.lock} />
|
||||||
</Space>
|
</Space>
|
||||||
|
|||||||
@ -16,6 +16,7 @@ import ActionHandler from '../../common/ActionHandler.jsx'
|
|||||||
import ObjectActions from '../../common/ObjectActions.jsx'
|
import ObjectActions from '../../common/ObjectActions.jsx'
|
||||||
import ObjectTable from '../../common/ObjectTable.jsx'
|
import ObjectTable from '../../common/ObjectTable.jsx'
|
||||||
import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx'
|
import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx'
|
||||||
|
import DocumentPrintButton from '../../common/DocumentPrintButton.jsx'
|
||||||
import { ApiServerContext } from '../../context/ApiServerContext'
|
import { ApiServerContext } from '../../context/ApiServerContext'
|
||||||
|
|
||||||
const PartInfo = () => {
|
const PartInfo = () => {
|
||||||
@ -78,6 +79,7 @@ const PartInfo = () => {
|
|||||||
type='part'
|
type='part'
|
||||||
id={partId}
|
id={partId}
|
||||||
disabled={objectFormState.loading}
|
disabled={objectFormState.loading}
|
||||||
|
objectData={objectFormState.objectData}
|
||||||
/>
|
/>
|
||||||
<ViewButton
|
<ViewButton
|
||||||
disabled={objectFormState.loading}
|
disabled={objectFormState.loading}
|
||||||
@ -89,6 +91,11 @@ const PartInfo = () => {
|
|||||||
visibleState={collapseState}
|
visibleState={collapseState}
|
||||||
updateVisibleState={updateCollapseState}
|
updateVisibleState={updateCollapseState}
|
||||||
/>
|
/>
|
||||||
|
<DocumentPrintButton
|
||||||
|
type='part'
|
||||||
|
objectData={objectFormState.objectData}
|
||||||
|
disabled={objectFormState.loading}
|
||||||
|
/>
|
||||||
</Space>
|
</Space>
|
||||||
<LockIndicator lock={objectFormState.lock} />
|
<LockIndicator lock={objectFormState.lock} />
|
||||||
</Space>
|
</Space>
|
||||||
|
|||||||
@ -17,6 +17,7 @@ import ObjectTable from '../../common/ObjectTable.jsx'
|
|||||||
import ActionHandler from '../../common/ActionHandler.jsx'
|
import ActionHandler from '../../common/ActionHandler.jsx'
|
||||||
import ObjectActions from '../../common/ObjectActions.jsx'
|
import ObjectActions from '../../common/ObjectActions.jsx'
|
||||||
import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx'
|
import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx'
|
||||||
|
import DocumentPrintButton from '../../common/DocumentPrintButton.jsx'
|
||||||
|
|
||||||
const ProductInfo = () => {
|
const ProductInfo = () => {
|
||||||
const location = useLocation()
|
const location = useLocation()
|
||||||
@ -70,6 +71,7 @@ const ProductInfo = () => {
|
|||||||
type='product'
|
type='product'
|
||||||
id={productId}
|
id={productId}
|
||||||
disabled={objectFormState.loading}
|
disabled={objectFormState.loading}
|
||||||
|
objectData={objectFormState.objectData}
|
||||||
/>
|
/>
|
||||||
<ViewButton
|
<ViewButton
|
||||||
disabled={objectFormState.loading}
|
disabled={objectFormState.loading}
|
||||||
@ -82,6 +84,11 @@ const ProductInfo = () => {
|
|||||||
visibleState={collapseState}
|
visibleState={collapseState}
|
||||||
updateVisibleState={updateCollapseState}
|
updateVisibleState={updateCollapseState}
|
||||||
/>
|
/>
|
||||||
|
<DocumentPrintButton
|
||||||
|
type='product'
|
||||||
|
objectData={objectFormState.objectData}
|
||||||
|
disabled={objectFormState.loading}
|
||||||
|
/>
|
||||||
</Space>
|
</Space>
|
||||||
<LockIndicator lock={objectFormState.lock} />
|
<LockIndicator lock={objectFormState.lock} />
|
||||||
</Space>
|
</Space>
|
||||||
|
|||||||
@ -17,6 +17,7 @@ import ActionHandler from '../../common/ActionHandler'
|
|||||||
import ObjectActions from '../../common/ObjectActions.jsx'
|
import ObjectActions from '../../common/ObjectActions.jsx'
|
||||||
import ObjectTable from '../../common/ObjectTable.jsx'
|
import ObjectTable from '../../common/ObjectTable.jsx'
|
||||||
import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx'
|
import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx'
|
||||||
|
import DocumentPrintButton from '../../common/DocumentPrintButton.jsx'
|
||||||
|
|
||||||
const UserInfo = () => {
|
const UserInfo = () => {
|
||||||
const location = useLocation()
|
const location = useLocation()
|
||||||
@ -33,7 +34,8 @@ const UserInfo = () => {
|
|||||||
editLoading: false,
|
editLoading: false,
|
||||||
formValid: false,
|
formValid: false,
|
||||||
lock: null,
|
lock: null,
|
||||||
loading: false
|
loading: false,
|
||||||
|
objectData: {}
|
||||||
})
|
})
|
||||||
|
|
||||||
const actions = {
|
const actions = {
|
||||||
@ -69,6 +71,7 @@ const UserInfo = () => {
|
|||||||
type='user'
|
type='user'
|
||||||
id={userId}
|
id={userId}
|
||||||
disabled={objectFormState.loading}
|
disabled={objectFormState.loading}
|
||||||
|
objectData={objectFormState.objectData}
|
||||||
/>
|
/>
|
||||||
<ViewButton
|
<ViewButton
|
||||||
disabled={objectFormState.loading}
|
disabled={objectFormState.loading}
|
||||||
@ -80,6 +83,11 @@ const UserInfo = () => {
|
|||||||
visibleState={collapseState}
|
visibleState={collapseState}
|
||||||
updateVisibleState={updateCollapseState}
|
updateVisibleState={updateCollapseState}
|
||||||
/>
|
/>
|
||||||
|
<DocumentPrintButton
|
||||||
|
type='user'
|
||||||
|
objectData={objectFormState.objectData}
|
||||||
|
disabled={objectFormState.loading}
|
||||||
|
/>
|
||||||
</Space>
|
</Space>
|
||||||
<LockIndicator lock={objectFormState.lock} />
|
<LockIndicator lock={objectFormState.lock} />
|
||||||
</Space>
|
</Space>
|
||||||
|
|||||||
@ -18,6 +18,7 @@ import ActionHandler from '../../common/ActionHandler.jsx'
|
|||||||
import ObjectActions from '../../common/ObjectActions.jsx'
|
import ObjectActions from '../../common/ObjectActions.jsx'
|
||||||
import ObjectTable from '../../common/ObjectTable.jsx'
|
import ObjectTable from '../../common/ObjectTable.jsx'
|
||||||
import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx'
|
import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx'
|
||||||
|
import DocumentPrintButton from '../../common/DocumentPrintButton.jsx'
|
||||||
|
|
||||||
const log = loglevel.getLogger('VendorInfo')
|
const log = loglevel.getLogger('VendorInfo')
|
||||||
log.setLevel(config.logLevel)
|
log.setLevel(config.logLevel)
|
||||||
@ -37,7 +38,8 @@ const VendorInfo = () => {
|
|||||||
editLoading: false,
|
editLoading: false,
|
||||||
formValid: false,
|
formValid: false,
|
||||||
lock: null,
|
lock: null,
|
||||||
loading: false
|
loading: false,
|
||||||
|
objectData: {}
|
||||||
})
|
})
|
||||||
|
|
||||||
const actions = {
|
const actions = {
|
||||||
@ -77,6 +79,7 @@ const VendorInfo = () => {
|
|||||||
type='vendor'
|
type='vendor'
|
||||||
id={vendorId}
|
id={vendorId}
|
||||||
disabled={objectFormState.loading}
|
disabled={objectFormState.loading}
|
||||||
|
objectData={objectFormState.objectData}
|
||||||
/>
|
/>
|
||||||
<ViewButton
|
<ViewButton
|
||||||
disabled={objectFormState.loading}
|
disabled={objectFormState.loading}
|
||||||
@ -88,6 +91,11 @@ const VendorInfo = () => {
|
|||||||
visibleState={collapseState}
|
visibleState={collapseState}
|
||||||
updateVisibleState={updateCollapseState}
|
updateVisibleState={updateCollapseState}
|
||||||
/>
|
/>
|
||||||
|
<DocumentPrintButton
|
||||||
|
type='vendor'
|
||||||
|
objectData={objectFormState.objectData}
|
||||||
|
disabled={objectFormState.loading}
|
||||||
|
/>
|
||||||
</Space>
|
</Space>
|
||||||
<LockIndicator lock={objectFormState.lock} />
|
<LockIndicator lock={objectFormState.lock} />
|
||||||
</Space>
|
</Space>
|
||||||
|
|||||||
@ -20,6 +20,7 @@ import ObjectActions from '../../common/ObjectActions.jsx'
|
|||||||
import ObjectTable from '../../common/ObjectTable.jsx'
|
import ObjectTable from '../../common/ObjectTable.jsx'
|
||||||
import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx'
|
import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx'
|
||||||
import EyeIcon from '../../../Icons/EyeIcon.jsx'
|
import EyeIcon from '../../../Icons/EyeIcon.jsx'
|
||||||
|
import DocumentPrintButton from '../../common/DocumentPrintButton.jsx'
|
||||||
|
|
||||||
const { Text } = Typography
|
const { Text } = Typography
|
||||||
|
|
||||||
@ -46,7 +47,8 @@ const GCodeFileInfo = () => {
|
|||||||
editLoading: false,
|
editLoading: false,
|
||||||
formValid: false,
|
formValid: false,
|
||||||
locked: false,
|
locked: false,
|
||||||
loading: false
|
loading: false,
|
||||||
|
objectData: {}
|
||||||
})
|
})
|
||||||
|
|
||||||
const actions = {
|
const actions = {
|
||||||
@ -85,6 +87,7 @@ const GCodeFileInfo = () => {
|
|||||||
type='gcodeFile'
|
type='gcodeFile'
|
||||||
id={gcodeFileId}
|
id={gcodeFileId}
|
||||||
disabled={objectFormState.loading}
|
disabled={objectFormState.loading}
|
||||||
|
objectData={objectFormState.objectData}
|
||||||
/>
|
/>
|
||||||
<ViewButton
|
<ViewButton
|
||||||
disabled={objectFormState.loading}
|
disabled={objectFormState.loading}
|
||||||
@ -97,6 +100,11 @@ const GCodeFileInfo = () => {
|
|||||||
visibleState={collapseState}
|
visibleState={collapseState}
|
||||||
updateVisibleState={updateCollapseState}
|
updateVisibleState={updateCollapseState}
|
||||||
/>
|
/>
|
||||||
|
<DocumentPrintButton
|
||||||
|
type='gcodeFile'
|
||||||
|
objectData={objectFormState.objectData}
|
||||||
|
disabled={objectFormState.loading}
|
||||||
|
/>
|
||||||
</Space>
|
</Space>
|
||||||
<LockIndicator lock={objectFormState.lock} />
|
<LockIndicator lock={objectFormState.lock} />
|
||||||
</Space>
|
</Space>
|
||||||
|
|||||||
@ -20,6 +20,7 @@ import ObjectActions from '../../common/ObjectActions.jsx'
|
|||||||
import ObjectTable from '../../common/ObjectTable.jsx'
|
import ObjectTable from '../../common/ObjectTable.jsx'
|
||||||
import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx'
|
import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx'
|
||||||
import JobIcon from '../../../Icons/JobIcon.jsx'
|
import JobIcon from '../../../Icons/JobIcon.jsx'
|
||||||
|
import DocumentPrintButton from '../../common/DocumentPrintButton.jsx'
|
||||||
|
|
||||||
const log = loglevel.getLogger('JobInfo')
|
const log = loglevel.getLogger('JobInfo')
|
||||||
log.setLevel(config.logLevel)
|
log.setLevel(config.logLevel)
|
||||||
@ -41,7 +42,8 @@ const JobInfo = () => {
|
|||||||
editLoading: false,
|
editLoading: false,
|
||||||
formValid: false,
|
formValid: false,
|
||||||
locked: false,
|
locked: false,
|
||||||
loading: false
|
loading: false,
|
||||||
|
objectData: {}
|
||||||
})
|
})
|
||||||
|
|
||||||
const actions = {
|
const actions = {
|
||||||
@ -80,6 +82,7 @@ const JobInfo = () => {
|
|||||||
type='job'
|
type='job'
|
||||||
id={jobId}
|
id={jobId}
|
||||||
disabled={objectFormState.loading}
|
disabled={objectFormState.loading}
|
||||||
|
objectData={objectFormState.objectData}
|
||||||
/>
|
/>
|
||||||
<ViewButton
|
<ViewButton
|
||||||
disabled={objectFormState.loading}
|
disabled={objectFormState.loading}
|
||||||
@ -92,6 +95,11 @@ const JobInfo = () => {
|
|||||||
visibleState={collapseState}
|
visibleState={collapseState}
|
||||||
updateVisibleState={updateCollapseState}
|
updateVisibleState={updateCollapseState}
|
||||||
/>
|
/>
|
||||||
|
<DocumentPrintButton
|
||||||
|
type='job'
|
||||||
|
objectData={objectFormState.objectData}
|
||||||
|
disabled={objectFormState.loading}
|
||||||
|
/>
|
||||||
</Space>
|
</Space>
|
||||||
<LockIndicator lock={objectFormState.lock} />
|
<LockIndicator lock={objectFormState.lock} />
|
||||||
</Space>
|
</Space>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user