Compare commits
No commits in common. "f56646f906927243d2176200ebf8cf548155eb46" and "d9f3bb185fe3d95222c736ceb824403eff5cc093" have entirely different histories.
f56646f906
...
d9f3bb185f
@ -124,7 +124,6 @@
|
||||
.dashboard-navigation-fade {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
/* Incoming chrome waits for the outgoing fade, then fades in. */
|
||||
transition:
|
||||
opacity 0.2s ease 0.2s,
|
||||
visibility 0s linear 0.2s;
|
||||
@ -134,14 +133,9 @@
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
pointer-events: none;
|
||||
/*
|
||||
Visibility must use a non-zero duration on hide. A 0s visibility
|
||||
transition makes WebKit apply hidden immediately, so opacity never
|
||||
animates and the chrome glitches out instead of fading.
|
||||
*/
|
||||
transition:
|
||||
opacity 0.2s ease 0s,
|
||||
visibility 0.2s linear 0s;
|
||||
visibility 0s linear 0.2s;
|
||||
}
|
||||
|
||||
.dashboard-navigation-window-title {
|
||||
@ -168,7 +162,7 @@
|
||||
pointer-events: none;
|
||||
opacity: 1;
|
||||
/* Wait for outgoing chrome to finish fading before this line appears. */
|
||||
transition: opacity 0.2s ease 0s;
|
||||
transition: opacity 0s ease 0s;
|
||||
}
|
||||
|
||||
.dashboard-navigation-center-border-hidden {
|
||||
|
||||
@ -27,10 +27,7 @@ import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx'
|
||||
import InfoActionButtons from '../../common/InfoActionButtons.jsx'
|
||||
import UserNotifierToggle from '../../common/UserNotifierToggle.jsx'
|
||||
import ScrollBox from '../../common/ScrollBox.jsx'
|
||||
import {
|
||||
getModelProperty,
|
||||
getModelByName
|
||||
} from '../../../../database/ObjectModels.js'
|
||||
import { getModelProperty, getModelByName } from '../../../../database/ObjectModels.js'
|
||||
import OrderItemIcon from '../../../Icons/OrderItemIcon.jsx'
|
||||
import ShipmentIcon from '../../../Icons/ShipmentIcon.jsx'
|
||||
|
||||
@ -94,7 +91,7 @@ const InvoiceInfo = () => {
|
||||
finishEdit: () => {
|
||||
objectFormRef?.current?.handleUpdate?.()
|
||||
return true
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
return (
|
||||
@ -103,7 +100,6 @@ const InvoiceInfo = () => {
|
||||
vertical='true'
|
||||
style={{
|
||||
maxHeight: '100%',
|
||||
height: '100%',
|
||||
minHeight: 0
|
||||
}}
|
||||
>
|
||||
@ -261,9 +257,7 @@ const InvoiceInfo = () => {
|
||||
) : (
|
||||
<ObjectTable
|
||||
type='payment'
|
||||
masterFilter={{
|
||||
invoice: getModelByName('invoice').prefix + ':' + invoiceId
|
||||
}}
|
||||
masterFilter={{ invoice: getModelByName('invoice').prefix + ':' + invoiceId }}
|
||||
visibleColumns={{ invoice: false }}
|
||||
/>
|
||||
)}
|
||||
@ -297,7 +291,10 @@ const InvoiceInfo = () => {
|
||||
<ObjectTable
|
||||
type='auditLog'
|
||||
masterFilter={{
|
||||
parent: getModelByName('invoice').prefix + ':' + invoiceId
|
||||
parent:
|
||||
getModelByName('invoice').prefix +
|
||||
':' +
|
||||
invoiceId
|
||||
}}
|
||||
visibleColumns={{ _id: false, parent: false }}
|
||||
/>
|
||||
|
||||
@ -93,7 +93,7 @@ const PaymentPolicyInfo = () => {
|
||||
<Flex
|
||||
gap='large'
|
||||
vertical='true'
|
||||
style={{ maxHeight: '100%', height: '100%', minHeight: 0 }}
|
||||
style={{ maxHeight: '100%', minHeight: 0 }}
|
||||
>
|
||||
<Flex justify={'space-between'}>
|
||||
<Space size='small'>
|
||||
|
||||
@ -84,7 +84,7 @@ const PaymentInfo = () => {
|
||||
finishEdit: () => {
|
||||
objectFormRef?.current?.handleUpdate?.()
|
||||
return true
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
return (
|
||||
@ -93,7 +93,6 @@ const PaymentInfo = () => {
|
||||
vertical='true'
|
||||
style={{
|
||||
maxHeight: '100%',
|
||||
height: '100%',
|
||||
minHeight: 0
|
||||
}}
|
||||
>
|
||||
|
||||
@ -77,7 +77,7 @@ const TaxRecordInfo = () => {
|
||||
finishEdit: () => {
|
||||
objectFormRef?.current?.handleUpdate?.()
|
||||
return true
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
return (
|
||||
@ -85,7 +85,7 @@ const TaxRecordInfo = () => {
|
||||
<Flex
|
||||
gap='large'
|
||||
vertical='true'
|
||||
style={{ maxHeight: '100%', height: '100%', minHeight: 0 }}
|
||||
style={{ maxHeight: '100%', minHeight: 0 }}
|
||||
>
|
||||
<Flex justify={'space-between'}>
|
||||
<Space size='small'>
|
||||
@ -213,7 +213,9 @@ const TaxRecordInfo = () => {
|
||||
type='auditLog'
|
||||
masterFilter={{
|
||||
parent:
|
||||
getModelByName('taxRecord').prefix + ':' + taxRecordId
|
||||
getModelByName('taxRecord').prefix +
|
||||
':' +
|
||||
taxRecordId
|
||||
}}
|
||||
visibleColumns={{ _id: false, parent: false }}
|
||||
/>
|
||||
|
||||
@ -87,7 +87,7 @@ const FilamentStockInfo = () => {
|
||||
<Flex
|
||||
gap='large'
|
||||
vertical='true'
|
||||
style={{ maxHeight: '100%', height: '100%', minHeight: 0 }}
|
||||
style={{ maxHeight: '100%', minHeight: 0 }}
|
||||
>
|
||||
<Flex justify={'space-between'}>
|
||||
<Space size='small'>
|
||||
@ -197,12 +197,7 @@ const FilamentStockInfo = () => {
|
||||
) : (
|
||||
<ObjectTable
|
||||
type='stockEvent'
|
||||
masterFilter={{
|
||||
parent:
|
||||
getModelByName('filamentStock').prefix +
|
||||
':' +
|
||||
filamentStockId
|
||||
}}
|
||||
masterFilter={{ parent: getModelByName('filamentStock').prefix + ':' + filamentStockId }}
|
||||
visibleColumns={{ parent: false }}
|
||||
/>
|
||||
)}
|
||||
|
||||
@ -78,7 +78,7 @@ const OrderItemInfo = () => {
|
||||
finishEdit: () => {
|
||||
objectFormRef?.current?.handleUpdate?.()
|
||||
return true
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
return (
|
||||
@ -88,7 +88,6 @@ const OrderItemInfo = () => {
|
||||
vertical='true'
|
||||
style={{
|
||||
maxHeight: '100%',
|
||||
height: '100%',
|
||||
minHeight: 0
|
||||
}}
|
||||
>
|
||||
@ -225,7 +224,9 @@ const OrderItemInfo = () => {
|
||||
type='auditLog'
|
||||
masterFilter={{
|
||||
parent:
|
||||
getModelByName('orderItem').prefix + ':' + orderItemId
|
||||
getModelByName('orderItem').prefix +
|
||||
':' +
|
||||
orderItemId
|
||||
}}
|
||||
visibleColumns={{ _id: false, parent: false }}
|
||||
/>
|
||||
|
||||
@ -93,7 +93,6 @@ const PartStockInfo = () => {
|
||||
vertical='true'
|
||||
style={{
|
||||
maxHeight: '100%',
|
||||
height: '100%',
|
||||
minHeight: 0
|
||||
}}
|
||||
>
|
||||
@ -215,10 +214,7 @@ const PartStockInfo = () => {
|
||||
) : (
|
||||
<ObjectTable
|
||||
type='stockEvent'
|
||||
masterFilter={{
|
||||
parent:
|
||||
getModelByName('partStock').prefix + ':' + partStockId
|
||||
}}
|
||||
masterFilter={{ parent: getModelByName('partStock').prefix + ':' + partStockId }}
|
||||
visibleColumns={{ parent: false }}
|
||||
/>
|
||||
)}
|
||||
@ -276,7 +272,9 @@ const PartStockInfo = () => {
|
||||
type='auditLog'
|
||||
masterFilter={{
|
||||
parent:
|
||||
getModelByName('partStock').prefix + ':' + partStockId
|
||||
getModelByName('partStock').prefix +
|
||||
':' +
|
||||
partStockId
|
||||
}}
|
||||
visibleColumns={{ _id: false, parent: false }}
|
||||
/>
|
||||
|
||||
@ -109,7 +109,6 @@ const ProductStockInfo = () => {
|
||||
vertical='true'
|
||||
style={{
|
||||
maxHeight: '100%',
|
||||
height: '100%',
|
||||
minHeight: 0
|
||||
}}
|
||||
>
|
||||
|
||||
@ -102,7 +102,7 @@ const PurchaseOrderInfo = () => {
|
||||
orderItemsTableRef?.current?.handleUpdate?.()
|
||||
objectFormRef?.current?.handleUpdate?.()
|
||||
return true
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
return (
|
||||
@ -111,7 +111,6 @@ const PurchaseOrderInfo = () => {
|
||||
vertical='true'
|
||||
style={{
|
||||
maxHeight: '100%',
|
||||
height: '100%',
|
||||
minHeight: 0
|
||||
}}
|
||||
>
|
||||
@ -231,10 +230,7 @@ const PurchaseOrderInfo = () => {
|
||||
<ObjectTable
|
||||
type='orderItem'
|
||||
masterFilter={{
|
||||
order:
|
||||
getModelByName('purchaseOrder').prefix +
|
||||
':' +
|
||||
purchaseOrderId,
|
||||
order: getModelByName('purchaseOrder').prefix + ':' + purchaseOrderId,
|
||||
orderType: 'purchaseOrder'
|
||||
}}
|
||||
visibleColumns={{ order: false }}
|
||||
@ -253,10 +249,7 @@ const PurchaseOrderInfo = () => {
|
||||
<ObjectTable
|
||||
type='shipment'
|
||||
masterFilter={{
|
||||
order:
|
||||
getModelByName('purchaseOrder').prefix +
|
||||
':' +
|
||||
purchaseOrderId,
|
||||
order: getModelByName('purchaseOrder').prefix + ':' + purchaseOrderId,
|
||||
orderType: 'purchaseOrder'
|
||||
}}
|
||||
visibleColumns={{ order: false }}
|
||||
@ -278,10 +271,7 @@ const PurchaseOrderInfo = () => {
|
||||
<ObjectTable
|
||||
type='invoice'
|
||||
masterFilter={{
|
||||
order:
|
||||
getModelByName('purchaseOrder').prefix +
|
||||
':' +
|
||||
purchaseOrderId,
|
||||
order: getModelByName('purchaseOrder').prefix + ':' + purchaseOrderId,
|
||||
orderType: 'purchaseOrder'
|
||||
}}
|
||||
visibleColumns={{ order: false }}
|
||||
@ -303,10 +293,7 @@ const PurchaseOrderInfo = () => {
|
||||
<ObjectTable
|
||||
type='stockEvent'
|
||||
masterFilter={{
|
||||
owner:
|
||||
getModelByName('purchaseOrder').prefix +
|
||||
':' +
|
||||
purchaseOrderId
|
||||
owner: getModelByName('purchaseOrder').prefix + ':' + purchaseOrderId
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
|
||||
@ -121,7 +121,6 @@ const PurchaseOrderInfo = () => {
|
||||
vertical='true'
|
||||
style={{
|
||||
maxHeight: '100%',
|
||||
height: '100%',
|
||||
minHeight: 0
|
||||
}}
|
||||
>
|
||||
@ -234,10 +233,7 @@ const PurchaseOrderInfo = () => {
|
||||
<ObjectTable
|
||||
type='orderItem'
|
||||
masterFilter={{
|
||||
order:
|
||||
getModelByName('purchaseOrder').prefix +
|
||||
':' +
|
||||
purchaseOrderId,
|
||||
order: getModelByName('purchaseOrder').prefix + ':' + purchaseOrderId,
|
||||
orderType: 'purchaseOrder'
|
||||
}}
|
||||
visibleColumns={{ order: false }}
|
||||
@ -256,10 +252,7 @@ const PurchaseOrderInfo = () => {
|
||||
<ObjectTable
|
||||
type='shipment'
|
||||
masterFilter={{
|
||||
order:
|
||||
getModelByName('purchaseOrder').prefix +
|
||||
':' +
|
||||
purchaseOrderId,
|
||||
order: getModelByName('purchaseOrder').prefix + ':' + purchaseOrderId,
|
||||
orderType: 'purchaseOrder'
|
||||
}}
|
||||
visibleColumns={{ order: false }}
|
||||
|
||||
@ -96,7 +96,6 @@ const ShipmentInfo = () => {
|
||||
vertical='true'
|
||||
style={{
|
||||
maxHeight: '100%',
|
||||
height: '100%',
|
||||
minHeight: 0
|
||||
}}
|
||||
>
|
||||
|
||||
@ -26,10 +26,7 @@ import ObjectTable from '../../common/ObjectTable.jsx'
|
||||
import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx'
|
||||
import InfoActionButtons from '../../common/InfoActionButtons.jsx'
|
||||
import UserNotifierToggle from '../../common/UserNotifierToggle.jsx'
|
||||
import {
|
||||
getModelProperty,
|
||||
getModelByName
|
||||
} from '../../../../database/ObjectModels.js'
|
||||
import { getModelProperty, getModelByName } from '../../../../database/ObjectModels.js'
|
||||
import ScrollBox from '../../common/ScrollBox.jsx'
|
||||
|
||||
const log = loglevel.getLogger('StockAuditInfo')
|
||||
@ -95,7 +92,6 @@ const StockAuditInfo = () => {
|
||||
vertical='true'
|
||||
style={{
|
||||
maxHeight: '100%',
|
||||
height: '100%',
|
||||
minHeight: 0
|
||||
}}
|
||||
>
|
||||
@ -184,9 +180,7 @@ const StockAuditInfo = () => {
|
||||
title='Stock Audit Information'
|
||||
icon={<InfoCircleIcon />}
|
||||
active={collapseState.info}
|
||||
onToggle={(expanded) =>
|
||||
updateCollapseState('info', expanded)
|
||||
}
|
||||
onToggle={(expanded) => updateCollapseState('info', expanded)}
|
||||
collapseKey='info'
|
||||
>
|
||||
<ObjectInfo
|
||||
@ -268,7 +262,9 @@ const StockAuditInfo = () => {
|
||||
title='Audit Logs'
|
||||
icon={<AuditLogIcon />}
|
||||
active={collapseState.auditLogs}
|
||||
onToggle={(expanded) => updateCollapseState('auditLogs', expanded)}
|
||||
onToggle={(expanded) =>
|
||||
updateCollapseState('auditLogs', expanded)
|
||||
}
|
||||
collapseKey='auditLogs'
|
||||
>
|
||||
{objectFormState.loading ? (
|
||||
@ -278,7 +274,9 @@ const StockAuditInfo = () => {
|
||||
type='auditLog'
|
||||
masterFilter={{
|
||||
parent:
|
||||
getModelByName('stockAudit').prefix + ':' + stockAuditId
|
||||
getModelByName('stockAudit').prefix +
|
||||
':' +
|
||||
stockAuditId
|
||||
}}
|
||||
visibleColumns={{ _id: false, parent: false }}
|
||||
/>
|
||||
|
||||
@ -98,7 +98,6 @@ const StockLocationInfo = () => {
|
||||
vertical='true'
|
||||
style={{
|
||||
maxHeight: '100%',
|
||||
height: '100%',
|
||||
minHeight: 0
|
||||
}}
|
||||
>
|
||||
|
||||
@ -8,10 +8,7 @@ import InfoCollapse from '../../common/InfoCollapse.jsx'
|
||||
import ObjectInfo from '../../common/ObjectInfo.jsx'
|
||||
import ObjectProperty from '../../common/ObjectProperty.jsx'
|
||||
import ViewButton from '../../common/ViewButton.jsx'
|
||||
import {
|
||||
getModelProperty,
|
||||
getModelByName
|
||||
} from '../../../../database/ObjectModels.js'
|
||||
import { getModelProperty, getModelByName } from '../../../../database/ObjectModels.js'
|
||||
import InfoCircleIcon from '../../../Icons/InfoCircleIcon.jsx'
|
||||
import NoteIcon from '../../../Icons/NoteIcon.jsx'
|
||||
import AuditLogIcon from '../../../Icons/AuditLogIcon.jsx'
|
||||
@ -92,7 +89,7 @@ const StockTransferInfo = () => {
|
||||
finishEdit: () => {
|
||||
objectFormRef?.current.handleUpdate()
|
||||
return true
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
return (
|
||||
@ -101,7 +98,6 @@ const StockTransferInfo = () => {
|
||||
vertical='true'
|
||||
style={{
|
||||
maxHeight: '100%',
|
||||
height: '100%',
|
||||
minHeight: 0
|
||||
}}
|
||||
>
|
||||
|
||||
@ -87,7 +87,7 @@ const AppPasswordInfo = () => {
|
||||
<Flex
|
||||
gap='large'
|
||||
vertical='true'
|
||||
style={{ maxHeight: '100%', height: '100%', minHeight: 0 }}
|
||||
style={{ maxHeight: '100%', minHeight: 0 }}
|
||||
>
|
||||
<Flex justify={'space-between'}>
|
||||
<Space size='small'>
|
||||
@ -197,7 +197,9 @@ const AppPasswordInfo = () => {
|
||||
type='auditLog'
|
||||
masterFilter={{
|
||||
parent:
|
||||
getModelByName('appPassword').prefix + ':' + appPasswordId
|
||||
getModelByName('appPassword').prefix +
|
||||
':' +
|
||||
appPasswordId
|
||||
}}
|
||||
visibleColumns={{ _id: false, parent: false }}
|
||||
/>
|
||||
|
||||
@ -25,10 +25,7 @@ import ObjectTable from '../../common/ObjectTable.jsx'
|
||||
import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx'
|
||||
import InfoActionButtons from '../../common/InfoActionButtons.jsx'
|
||||
import UserNotifierToggle from '../../common/UserNotifierToggle.jsx'
|
||||
import {
|
||||
getModelProperty,
|
||||
getModelByName
|
||||
} from '../../../../database/ObjectModels.js'
|
||||
import { getModelProperty, getModelByName } from '../../../../database/ObjectModels.js'
|
||||
import ScrollBox from '../../common/ScrollBox.jsx'
|
||||
|
||||
const log = loglevel.getLogger('CourierServiceInfo')
|
||||
@ -85,7 +82,7 @@ const CourierServiceInfo = () => {
|
||||
finishEdit: () => {
|
||||
objectFormRef?.current?.handleUpdate?.()
|
||||
return true
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
return (
|
||||
@ -93,7 +90,7 @@ const CourierServiceInfo = () => {
|
||||
<Flex
|
||||
gap='large'
|
||||
vertical='true'
|
||||
style={{ maxHeight: '100%', height: '100%', minHeight: 0 }}
|
||||
style={{ maxHeight: '100%', minHeight: 0 }}
|
||||
>
|
||||
<Flex justify={'space-between'}>
|
||||
<Space size='small'>
|
||||
|
||||
@ -75,7 +75,7 @@ const CourierInfo = () => {
|
||||
finishEdit: () => {
|
||||
objectFormRef?.current?.handleUpdate?.()
|
||||
return true
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
return (
|
||||
@ -83,7 +83,7 @@ const CourierInfo = () => {
|
||||
<Flex
|
||||
gap='large'
|
||||
vertical='true'
|
||||
style={{ maxHeight: '100%', height: '100%', minHeight: 0 }}
|
||||
style={{ maxHeight: '100%', minHeight: 0 }}
|
||||
>
|
||||
<Flex justify={'space-between'}>
|
||||
<Space size='small'>
|
||||
@ -193,9 +193,7 @@ const CourierInfo = () => {
|
||||
) : (
|
||||
<ObjectTable
|
||||
type='courierService'
|
||||
masterFilter={{
|
||||
courier: getModelByName('courier').prefix + ':' + courierId
|
||||
}}
|
||||
masterFilter={{ courier: getModelByName('courier').prefix + ':' + courierId }}
|
||||
visibleColumns={{
|
||||
courier: false
|
||||
}}
|
||||
@ -233,7 +231,10 @@ const CourierInfo = () => {
|
||||
<ObjectTable
|
||||
type='auditLog'
|
||||
masterFilter={{
|
||||
parent: getModelByName('courier').prefix + ':' + courierId
|
||||
parent:
|
||||
getModelByName('courier').prefix +
|
||||
':' +
|
||||
courierId
|
||||
}}
|
||||
visibleColumns={{ _id: false, parent: false }}
|
||||
/>
|
||||
|
||||
@ -87,7 +87,7 @@ const DocumentJobInfo = () => {
|
||||
<Flex
|
||||
gap='large'
|
||||
vertical='true'
|
||||
style={{ maxHeight: '100%', height: '100%', minHeight: 0 }}
|
||||
style={{ maxHeight: '100%', minHeight: 0 }}
|
||||
>
|
||||
<Flex justify={'space-between'}>
|
||||
<Space size='small'>
|
||||
@ -216,7 +216,9 @@ const DocumentJobInfo = () => {
|
||||
type='auditLog'
|
||||
masterFilter={{
|
||||
parent:
|
||||
getModelByName('documentJob').prefix + ':' + documentJobId
|
||||
getModelByName('documentJob').prefix +
|
||||
':' +
|
||||
documentJobId
|
||||
}}
|
||||
visibleColumns={{ _id: false, parent: false }}
|
||||
/>
|
||||
|
||||
@ -91,7 +91,6 @@ const DocumentPrinterInfo = () => {
|
||||
vertical='true'
|
||||
style={{
|
||||
maxHeight: '100%',
|
||||
height: '100%',
|
||||
minHeight: 0
|
||||
}}
|
||||
>
|
||||
|
||||
@ -87,7 +87,7 @@ const DocumentSizeInfo = () => {
|
||||
<Flex
|
||||
gap='large'
|
||||
vertical='true'
|
||||
style={{ maxHeight: '100%', height: '100%', minHeight: 0 }}
|
||||
style={{ maxHeight: '100%', minHeight: 0 }}
|
||||
>
|
||||
<Flex justify={'space-between'}>
|
||||
<Space size='small'>
|
||||
|
||||
@ -97,7 +97,6 @@ const DocumentTemplateInfo = () => {
|
||||
vertical='true'
|
||||
style={{
|
||||
maxHeight: '100%',
|
||||
height: '100%',
|
||||
minHeight: 0
|
||||
}}
|
||||
>
|
||||
|
||||
@ -88,7 +88,7 @@ const EmailAccountInfo = () => {
|
||||
<Flex
|
||||
gap='large'
|
||||
vertical='true'
|
||||
style={{ maxHeight: '100%', height: '100%', minHeight: 0 }}
|
||||
style={{ maxHeight: '100%', minHeight: 0 }}
|
||||
>
|
||||
<Flex justify={'space-between'}>
|
||||
<Space size='small'>
|
||||
|
||||
@ -23,10 +23,7 @@ import ObjectTable from '../../common/ObjectTable.jsx'
|
||||
import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx'
|
||||
import InfoActionButtons from '../../common/InfoActionButtons.jsx'
|
||||
import UserNotifierToggle from '../../common/UserNotifierToggle.jsx'
|
||||
import {
|
||||
getModelByName,
|
||||
getModelProperty
|
||||
} from '../../../../database/ObjectModels.js'
|
||||
import { getModelByName, getModelProperty } from '../../../../database/ObjectModels.js'
|
||||
import ScrollBox from '../../common/ScrollBox.jsx'
|
||||
import TemplatePreview from '../../common/TemplatePreview.jsx'
|
||||
|
||||
@ -77,7 +74,7 @@ const EmailMessageInfo = () => {
|
||||
<Flex
|
||||
gap='large'
|
||||
vertical='true'
|
||||
style={{ maxHeight: '100%', height: '100%', minHeight: 0 }}
|
||||
style={{ maxHeight: '100%', minHeight: 0 }}
|
||||
>
|
||||
<Flex justify={'space-between'}>
|
||||
<Space size='small'>
|
||||
|
||||
@ -25,10 +25,7 @@ import ObjectTable from '../../common/ObjectTable.jsx'
|
||||
import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx'
|
||||
import InfoActionButtons from '../../common/InfoActionButtons.jsx'
|
||||
import UserNotifierToggle from '../../common/UserNotifierToggle.jsx'
|
||||
import {
|
||||
getModelByName,
|
||||
getModelProperty
|
||||
} from '../../../../database/ObjectModels.js'
|
||||
import { getModelByName, getModelProperty } from '../../../../database/ObjectModels.js'
|
||||
import ScrollBox from '../../common/ScrollBox.jsx'
|
||||
|
||||
const log = loglevel.getLogger('EmailTemplateInfo')
|
||||
@ -95,7 +92,7 @@ const EmailTemplateInfo = () => {
|
||||
<Flex
|
||||
gap='large'
|
||||
vertical='true'
|
||||
style={{ maxHeight: '100%', height: '100%', minHeight: 0 }}
|
||||
style={{ maxHeight: '100%', minHeight: 0 }}
|
||||
>
|
||||
<Flex justify={'space-between'}>
|
||||
<Space size='small'>
|
||||
|
||||
@ -74,7 +74,7 @@ const FilamentSkuInfo = () => {
|
||||
finishEdit: () => {
|
||||
objectFormRef?.current?.handleUpdate?.()
|
||||
return true
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
return (
|
||||
@ -82,7 +82,7 @@ const FilamentSkuInfo = () => {
|
||||
<Flex
|
||||
gap='large'
|
||||
vertical='true'
|
||||
style={{ maxHeight: '100%', height: '100%', minHeight: 0 }}
|
||||
style={{ maxHeight: '100%', minHeight: 0 }}
|
||||
>
|
||||
<Flex justify={'space-between'}>
|
||||
<Space size='small'>
|
||||
@ -210,7 +210,9 @@ const FilamentSkuInfo = () => {
|
||||
type='auditLog'
|
||||
masterFilter={{
|
||||
parent:
|
||||
getModelByName('filamentSku').prefix + ':' + filamentSkuId
|
||||
getModelByName('filamentSku').prefix +
|
||||
':' +
|
||||
filamentSkuId
|
||||
}}
|
||||
visibleColumns={{ _id: false, parent: false }}
|
||||
/>
|
||||
|
||||
@ -92,7 +92,7 @@ const FilamentInfo = () => {
|
||||
finishEdit: () => {
|
||||
objectFormRef?.current?.handleUpdate?.()
|
||||
return true
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
return (
|
||||
@ -101,7 +101,6 @@ const FilamentInfo = () => {
|
||||
vertical='true'
|
||||
style={{
|
||||
maxHeight: '100%',
|
||||
height: '100%',
|
||||
minHeight: 0
|
||||
}}
|
||||
>
|
||||
@ -221,9 +220,7 @@ const FilamentInfo = () => {
|
||||
<ObjectTable
|
||||
ref={filamentSkusTableRef}
|
||||
type='filamentSku'
|
||||
masterFilter={{
|
||||
filament: getModelByName('filament').prefix + ':' + filamentId
|
||||
}}
|
||||
masterFilter={{ filament: getModelByName('filament').prefix + ':' + filamentId }}
|
||||
visibleColumns={{ filament: false }}
|
||||
/>
|
||||
)}
|
||||
@ -241,9 +238,7 @@ const FilamentInfo = () => {
|
||||
) : (
|
||||
<ObjectTable
|
||||
type='filamentStock'
|
||||
masterFilter={{
|
||||
filament: getModelByName('filament').prefix + ':' + filamentId
|
||||
}}
|
||||
masterFilter={{ filament: getModelByName('filament').prefix + ':' + filamentId }}
|
||||
visibleColumns={{
|
||||
filament: false,
|
||||
startingWeight: false
|
||||
@ -282,7 +277,10 @@ const FilamentInfo = () => {
|
||||
<ObjectTable
|
||||
type='auditLog'
|
||||
masterFilter={{
|
||||
parent: getModelByName('filament').prefix + ':' + filamentId
|
||||
parent:
|
||||
getModelByName('filament').prefix +
|
||||
':' +
|
||||
filamentId
|
||||
}}
|
||||
visibleColumns={{ _id: false, parent: false }}
|
||||
/>
|
||||
|
||||
@ -98,7 +98,7 @@ const FileInfo = () => {
|
||||
<Flex
|
||||
gap='large'
|
||||
vertical='true'
|
||||
style={{ maxHeight: '100%', height: '100%', minHeight: 0 }}
|
||||
style={{ maxHeight: '100%', minHeight: 0 }}
|
||||
>
|
||||
<Flex justify={'space-between'}>
|
||||
<Space size='small'>
|
||||
|
||||
@ -87,7 +87,7 @@ const HostInfo = () => {
|
||||
finishEdit: () => {
|
||||
objectFormRef?.current.handleUpdate()
|
||||
return true
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
return (
|
||||
@ -96,7 +96,6 @@ const HostInfo = () => {
|
||||
vertical='true'
|
||||
style={{
|
||||
maxHeight: '100%',
|
||||
height: '100%',
|
||||
minHeight: 0
|
||||
}}
|
||||
>
|
||||
@ -214,9 +213,7 @@ const HostInfo = () => {
|
||||
) : (
|
||||
<ObjectTable
|
||||
type='printer'
|
||||
masterFilter={{
|
||||
host: getModelByName('host').prefix + ':' + hostId
|
||||
}}
|
||||
masterFilter={{ host: getModelByName('host').prefix + ':' + hostId }}
|
||||
visibleColumns={{
|
||||
host: false
|
||||
}}
|
||||
@ -237,9 +234,7 @@ const HostInfo = () => {
|
||||
) : (
|
||||
<ObjectTable
|
||||
type='documentPrinter'
|
||||
masterFilter={{
|
||||
host: getModelByName('host').prefix + ':' + hostId
|
||||
}}
|
||||
masterFilter={{ host: getModelByName('host').prefix + ':' + hostId }}
|
||||
visibleColumns={{
|
||||
host: false
|
||||
}}
|
||||
@ -277,7 +272,10 @@ const HostInfo = () => {
|
||||
<ObjectTable
|
||||
type='auditLog'
|
||||
masterFilter={{
|
||||
parent: getModelByName('host').prefix + ':' + hostId
|
||||
parent:
|
||||
getModelByName('host').prefix +
|
||||
':' +
|
||||
hostId
|
||||
}}
|
||||
visibleColumns={{ _id: false, parent: false }}
|
||||
/>
|
||||
|
||||
@ -77,7 +77,7 @@ const MaterialInfo = () => {
|
||||
finishEdit: () => {
|
||||
objectFormRef?.current?.handleUpdate?.()
|
||||
return true
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
return (
|
||||
@ -85,7 +85,7 @@ const MaterialInfo = () => {
|
||||
<Flex
|
||||
gap='large'
|
||||
vertical='true'
|
||||
style={{ maxHeight: '100%', height: '100%', minHeight: 0 }}
|
||||
style={{ maxHeight: '100%', minHeight: 0 }}
|
||||
>
|
||||
<Flex justify={'space-between'}>
|
||||
<Space size='small'>
|
||||
@ -212,7 +212,10 @@ const MaterialInfo = () => {
|
||||
<ObjectTable
|
||||
type='auditLog'
|
||||
masterFilter={{
|
||||
parent: getModelByName('material').prefix + ':' + materialId
|
||||
parent:
|
||||
getModelByName('material').prefix +
|
||||
':' +
|
||||
materialId
|
||||
}}
|
||||
visibleColumns={{ _id: false, parent: false }}
|
||||
/>
|
||||
|
||||
@ -77,7 +77,7 @@ const NoteTypeInfo = () => {
|
||||
<Flex
|
||||
gap='large'
|
||||
vertical='true'
|
||||
style={{ maxHeight: '100%', height: '100%', minHeight: 0 }}
|
||||
style={{ maxHeight: '100%', minHeight: 0 }}
|
||||
>
|
||||
<Flex justify={'space-between'}>
|
||||
<Space size='small'>
|
||||
@ -188,7 +188,10 @@ const NoteTypeInfo = () => {
|
||||
<ObjectTable
|
||||
type='auditLog'
|
||||
masterFilter={{
|
||||
parent: getModelByName('noteType').prefix + ':' + noteTypeId
|
||||
parent:
|
||||
getModelByName('noteType').prefix +
|
||||
':' +
|
||||
noteTypeId
|
||||
}}
|
||||
visibleColumns={{ _id: false, parent: false }}
|
||||
/>
|
||||
|
||||
@ -27,10 +27,7 @@ import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx'
|
||||
import InfoActionButtons from '../../common/InfoActionButtons.jsx'
|
||||
import UserNotifierToggle from '../../common/UserNotifierToggle.jsx'
|
||||
import ScrollBox from '../../common/ScrollBox.jsx'
|
||||
import {
|
||||
getModelProperty,
|
||||
getModelByName
|
||||
} from '../../../../database/ObjectModels.js'
|
||||
import { getModelProperty, getModelByName } from '../../../../database/ObjectModels.js'
|
||||
|
||||
const log = loglevel.getLogger('NoteInfo')
|
||||
log.setLevel(config.logLevel)
|
||||
@ -86,7 +83,7 @@ const NoteInfo = () => {
|
||||
finishEdit: () => {
|
||||
objectFormRef?.current?.handleUpdate?.()
|
||||
return true
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
return (
|
||||
@ -94,7 +91,7 @@ const NoteInfo = () => {
|
||||
<Flex
|
||||
gap='large'
|
||||
vertical='true'
|
||||
style={{ maxHeight: '100%', height: '100%', minHeight: 0 }}
|
||||
style={{ maxHeight: '100%', minHeight: 0 }}
|
||||
>
|
||||
<Flex justify={'space-between'}>
|
||||
<Space size='small'>
|
||||
@ -248,7 +245,10 @@ const NoteInfo = () => {
|
||||
<ObjectTable
|
||||
type='auditLog'
|
||||
masterFilter={{
|
||||
parent: getModelByName('note').prefix + ':' + noteId
|
||||
parent:
|
||||
getModelByName('note').prefix +
|
||||
':' +
|
||||
noteId
|
||||
}}
|
||||
visibleColumns={{ _id: false, parent: false }}
|
||||
/>
|
||||
|
||||
@ -69,7 +69,7 @@ const PartSkuInfo = () => {
|
||||
finishEdit: () => {
|
||||
objectFormRef?.current?.handleUpdate?.()
|
||||
return true
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
return (
|
||||
@ -77,7 +77,7 @@ const PartSkuInfo = () => {
|
||||
<Flex
|
||||
gap='large'
|
||||
vertical='true'
|
||||
style={{ maxHeight: '100%', height: '100%', minHeight: 0 }}
|
||||
style={{ maxHeight: '100%', minHeight: 0 }}
|
||||
>
|
||||
<Flex justify={'space-between'}>
|
||||
<Space size='small'>
|
||||
@ -204,7 +204,10 @@ const PartSkuInfo = () => {
|
||||
<ObjectTable
|
||||
type='auditLog'
|
||||
masterFilter={{
|
||||
parent: getModelByName('partSku').prefix + ':' + partSkuId
|
||||
parent:
|
||||
getModelByName('partSku').prefix +
|
||||
':' +
|
||||
partSkuId
|
||||
}}
|
||||
visibleColumns={{ _id: false, parent: false }}
|
||||
/>
|
||||
|
||||
@ -88,7 +88,7 @@ const PartInfo = () => {
|
||||
<Flex
|
||||
gap='large'
|
||||
vertical='true'
|
||||
style={{ maxHeight: '100%', height: '100%', minHeight: 0 }}
|
||||
style={{ maxHeight: '100%', minHeight: 0 }}
|
||||
>
|
||||
<Flex justify={'space-between'}>
|
||||
<Space size='small'>
|
||||
@ -197,9 +197,7 @@ const PartInfo = () => {
|
||||
<ObjectTable
|
||||
ref={partSkusTableRef}
|
||||
type='partSku'
|
||||
masterFilter={{
|
||||
part: getModelByName('part').prefix + ':' + partId
|
||||
}}
|
||||
masterFilter={{ part: getModelByName('part').prefix + ':' + partId }}
|
||||
visibleColumns={{ part: false }}
|
||||
/>
|
||||
)}
|
||||
@ -234,7 +232,10 @@ const PartInfo = () => {
|
||||
<ObjectTable
|
||||
type='auditLog'
|
||||
masterFilter={{
|
||||
parent: getModelByName('part').prefix + ':' + partId
|
||||
parent:
|
||||
getModelByName('part').prefix +
|
||||
':' +
|
||||
partId
|
||||
}}
|
||||
visibleColumns={{ _id: false, parent: false }}
|
||||
/>
|
||||
|
||||
@ -80,7 +80,7 @@ const PermissionSettingInfo = () => {
|
||||
finishEdit: () => {
|
||||
objectFormRef?.current?.handleUpdate?.()
|
||||
return true
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
return (
|
||||
@ -88,7 +88,7 @@ const PermissionSettingInfo = () => {
|
||||
<Flex
|
||||
gap='large'
|
||||
vertical='true'
|
||||
style={{ maxHeight: '100%', height: '100%', minHeight: 0 }}
|
||||
style={{ maxHeight: '100%', minHeight: 0 }}
|
||||
>
|
||||
<Flex justify={'space-between'}>
|
||||
<Space size='small'>
|
||||
|
||||
@ -23,10 +23,7 @@ import ObjectTable from '../../common/ObjectTable.jsx'
|
||||
import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx'
|
||||
import InfoActionButtons from '../../common/InfoActionButtons.jsx'
|
||||
import UserNotifierToggle from '../../common/UserNotifierToggle.jsx'
|
||||
import {
|
||||
getModelProperty,
|
||||
getModelByName
|
||||
} from '../../../../database/ObjectModels.js'
|
||||
import { getModelProperty, getModelByName } from '../../../../database/ObjectModels.js'
|
||||
import ScrollBox from '../../common/ScrollBox.jsx'
|
||||
|
||||
const ProductCategoryInfo = () => {
|
||||
@ -80,7 +77,7 @@ const ProductCategoryInfo = () => {
|
||||
finishEdit: () => {
|
||||
objectFormRef?.current?.handleUpdate?.()
|
||||
return true
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
return (
|
||||
@ -88,7 +85,7 @@ const ProductCategoryInfo = () => {
|
||||
<Flex
|
||||
gap='large'
|
||||
vertical='true'
|
||||
style={{ maxHeight: '100%', height: '100%', minHeight: 0 }}
|
||||
style={{ maxHeight: '100%', minHeight: 0 }}
|
||||
>
|
||||
<Flex justify={'space-between'}>
|
||||
<Space size='small'>
|
||||
|
||||
@ -23,10 +23,7 @@ import InfoActionButtons from '../../common/InfoActionButtons.jsx'
|
||||
import UserNotifierToggle from '../../common/UserNotifierToggle.jsx'
|
||||
import ScrollBox from '../../common/ScrollBox.jsx'
|
||||
import ObjectProperty from '../../common/ObjectProperty.jsx'
|
||||
import {
|
||||
getModelProperty,
|
||||
getModelByName
|
||||
} from '../../../../database/ObjectModels.js'
|
||||
import { getModelProperty, getModelByName } from '../../../../database/ObjectModels.js'
|
||||
import PartIcon from '../../../Icons/PartIcon.jsx'
|
||||
|
||||
const ProductSkuInfo = () => {
|
||||
@ -78,7 +75,7 @@ const ProductSkuInfo = () => {
|
||||
finishEdit: () => {
|
||||
objectFormRef?.current?.handleUpdate?.()
|
||||
return true
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
return (
|
||||
@ -86,7 +83,7 @@ const ProductSkuInfo = () => {
|
||||
<Flex
|
||||
gap='large'
|
||||
vertical='true'
|
||||
style={{ maxHeight: '100%', height: '100%', minHeight: 0 }}
|
||||
style={{ maxHeight: '100%', minHeight: 0 }}
|
||||
>
|
||||
<Flex justify={'space-between'}>
|
||||
<Space size='small'>
|
||||
@ -240,7 +237,9 @@ const ProductSkuInfo = () => {
|
||||
type='auditLog'
|
||||
masterFilter={{
|
||||
parent:
|
||||
getModelByName('productSku').prefix + ':' + productSkuId
|
||||
getModelByName('productSku').prefix +
|
||||
':' +
|
||||
productSkuId
|
||||
}}
|
||||
visibleColumns={{ _id: false, parent: false }}
|
||||
/>
|
||||
|
||||
@ -88,7 +88,7 @@ const ProductInfo = () => {
|
||||
<Flex
|
||||
gap='large'
|
||||
vertical='true'
|
||||
style={{ maxHeight: '100%', height: '100%', minHeight: 0 }}
|
||||
style={{ maxHeight: '100%', minHeight: 0 }}
|
||||
>
|
||||
<Flex justify={'space-between'}>
|
||||
<Space size='small'>
|
||||
@ -200,10 +200,7 @@ const ProductInfo = () => {
|
||||
<ObjectTable
|
||||
ref={productSkusTableRef}
|
||||
type='productSku'
|
||||
masterFilter={{
|
||||
product:
|
||||
getModelByName('product').prefix + ':' + productId
|
||||
}}
|
||||
masterFilter={{ product: getModelByName('product').prefix + ':' + productId }}
|
||||
visibleColumns={{ product: false }}
|
||||
/>
|
||||
)}
|
||||
@ -242,7 +239,10 @@ const ProductInfo = () => {
|
||||
<ObjectTable
|
||||
type='auditLog'
|
||||
masterFilter={{
|
||||
parent: getModelByName('product').prefix + ':' + productId
|
||||
parent:
|
||||
getModelByName('product').prefix +
|
||||
':' +
|
||||
productId
|
||||
}}
|
||||
visibleColumns={{ _id: false, parent: false }}
|
||||
/>
|
||||
|
||||
@ -22,10 +22,7 @@ import ObjectTable from '../../common/ObjectTable.jsx'
|
||||
import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx'
|
||||
import InfoActionButtons from '../../common/InfoActionButtons.jsx'
|
||||
import UserNotifierToggle from '../../common/UserNotifierToggle.jsx'
|
||||
import {
|
||||
getModelProperty,
|
||||
getModelByName
|
||||
} from '../../../../database/ObjectModels.js'
|
||||
import { getModelProperty, getModelByName } from '../../../../database/ObjectModels.js'
|
||||
import ScrollBox from '../../common/ScrollBox.jsx'
|
||||
|
||||
const StockAuditLevelInfo = () => {
|
||||
@ -85,7 +82,7 @@ const StockAuditLevelInfo = () => {
|
||||
<Flex
|
||||
gap='large'
|
||||
vertical='true'
|
||||
style={{ maxHeight: '100%', height: '100%', minHeight: 0 }}
|
||||
style={{ maxHeight: '100%', minHeight: 0 }}
|
||||
>
|
||||
<Flex justify={'space-between'}>
|
||||
<Space size='small'>
|
||||
@ -235,7 +232,9 @@ const StockAuditLevelInfo = () => {
|
||||
title='Audit Logs'
|
||||
icon={<AuditLogIcon />}
|
||||
active={collapseState.auditLogs}
|
||||
onToggle={(expanded) => updateCollapseState('auditLogs', expanded)}
|
||||
onToggle={(expanded) =>
|
||||
updateCollapseState('auditLogs', expanded)
|
||||
}
|
||||
collapseKey='auditLogs'
|
||||
>
|
||||
{objectFormState.loading ? (
|
||||
|
||||
@ -25,10 +25,7 @@ import ObjectTable from '../../common/ObjectTable.jsx'
|
||||
import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx'
|
||||
import InfoActionButtons from '../../common/InfoActionButtons.jsx'
|
||||
import UserNotifierToggle from '../../common/UserNotifierToggle.jsx'
|
||||
import {
|
||||
getModelProperty,
|
||||
getModelByName
|
||||
} from '../../../../database/ObjectModels.js'
|
||||
import { getModelProperty, getModelByName } from '../../../../database/ObjectModels.js'
|
||||
import ScrollBox from '../../common/ScrollBox.jsx'
|
||||
|
||||
const log = loglevel.getLogger('TaxRateInfo')
|
||||
@ -80,7 +77,7 @@ const TaxRateInfo = () => {
|
||||
finishEdit: () => {
|
||||
objectFormRef?.current?.handleUpdate?.()
|
||||
return true
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
return (
|
||||
@ -88,7 +85,7 @@ const TaxRateInfo = () => {
|
||||
<Flex
|
||||
gap='large'
|
||||
vertical='true'
|
||||
style={{ maxHeight: '100%', height: '100%', minHeight: 0 }}
|
||||
style={{ maxHeight: '100%', minHeight: 0 }}
|
||||
>
|
||||
<Flex justify={'space-between'}>
|
||||
<Space size='small'>
|
||||
@ -239,7 +236,10 @@ const TaxRateInfo = () => {
|
||||
<ObjectTable
|
||||
type='auditLog'
|
||||
masterFilter={{
|
||||
parent: getModelByName('taxRate').prefix + ':' + taxRateId
|
||||
parent:
|
||||
getModelByName('taxRate').prefix +
|
||||
':' +
|
||||
taxRateId
|
||||
}}
|
||||
visibleColumns={{ _id: false, parent: false }}
|
||||
/>
|
||||
|
||||
@ -80,14 +80,14 @@ const UserGroupInfo = () => {
|
||||
finishEdit: () => {
|
||||
objectFormRef?.current?.handleUpdate?.()
|
||||
return true
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
return (
|
||||
<Flex
|
||||
gap='large'
|
||||
vertical='true'
|
||||
style={{ maxHeight: '100%', height: '100%', minHeight: 0 }}
|
||||
style={{ maxHeight: '100%', minHeight: 0 }}
|
||||
>
|
||||
<Flex justify={'space-between'}>
|
||||
<Space size='small'>
|
||||
|
||||
@ -86,7 +86,7 @@ const UserInfo = () => {
|
||||
<Flex
|
||||
gap='large'
|
||||
vertical='true'
|
||||
style={{ maxHeight: '100%', height: '100%', minHeight: 0 }}
|
||||
style={{ maxHeight: '100%', minHeight: 0 }}
|
||||
>
|
||||
<Flex justify={'space-between'}>
|
||||
<Space size='small'>
|
||||
|
||||
@ -74,7 +74,7 @@ const VendorInfo = () => {
|
||||
finishEdit: () => {
|
||||
objectFormRef?.current?.handleUpdate?.()
|
||||
return true
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
return (
|
||||
@ -82,7 +82,7 @@ const VendorInfo = () => {
|
||||
<Flex
|
||||
gap='large'
|
||||
vertical='true'
|
||||
style={{ maxHeight: '100%', height: '100%', minHeight: 0 }}
|
||||
style={{ maxHeight: '100%', minHeight: 0 }}
|
||||
>
|
||||
<Flex justify={'space-between'}>
|
||||
<Space size='small'>
|
||||
@ -209,7 +209,10 @@ const VendorInfo = () => {
|
||||
<ObjectTable
|
||||
type='auditLog'
|
||||
masterFilter={{
|
||||
parent: getModelByName('vendor').prefix + ':' + vendorId
|
||||
parent:
|
||||
getModelByName('vendor').prefix +
|
||||
':' +
|
||||
vendorId
|
||||
}}
|
||||
visibleColumns={{ _id: false, parent: false }}
|
||||
/>
|
||||
|
||||
@ -111,14 +111,14 @@ const FilamentProfileInfo = () => {
|
||||
finishEdit: () => {
|
||||
objectFormRef.current?.handleUpdate?.()
|
||||
return true
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
return (
|
||||
<Flex
|
||||
gap='large'
|
||||
vertical='true'
|
||||
style={{ maxHeight: '100%', height: '100%', minHeight: 0 }}
|
||||
style={{ maxHeight: '100%', minHeight: 0 }}
|
||||
>
|
||||
<Flex justify='space-between'>
|
||||
<Space size='small'>
|
||||
|
||||
@ -25,10 +25,7 @@ import InfoCollapsePlaceholder from '../../common/InfoCollapsePlaceholder.jsx'
|
||||
import InfoActionButtons from '../../common/InfoActionButtons.jsx'
|
||||
import UserNotifierToggle from '../../common/UserNotifierToggle.jsx'
|
||||
import ScrollBox from '../../common/ScrollBox.jsx'
|
||||
import {
|
||||
getModelProperty,
|
||||
getModelByName
|
||||
} from '../../../../database/ObjectModels.js'
|
||||
import { getModelProperty, getModelByName } from '../../../../database/ObjectModels.js'
|
||||
import PartIcon from '../../../Icons/PartIcon.jsx'
|
||||
|
||||
const log = loglevel.getLogger('GCodeFileInfo')
|
||||
@ -94,7 +91,6 @@ const GCodeFileInfo = () => {
|
||||
vertical='true'
|
||||
style={{
|
||||
maxHeight: '100%',
|
||||
height: '100%',
|
||||
minHeight: 0
|
||||
}}
|
||||
>
|
||||
@ -255,7 +251,9 @@ const GCodeFileInfo = () => {
|
||||
type='auditLog'
|
||||
masterFilter={{
|
||||
parent:
|
||||
getModelByName('gcodeFile').prefix + ':' + gcodeFileId
|
||||
getModelByName('gcodeFile').prefix +
|
||||
':' +
|
||||
gcodeFileId
|
||||
}}
|
||||
visibleColumns={{ _id: false, parent: false }}
|
||||
/>
|
||||
|
||||
@ -97,7 +97,6 @@ const JobInfo = () => {
|
||||
vertical='true'
|
||||
style={{
|
||||
maxHeight: '100%',
|
||||
height: '100%',
|
||||
minHeight: 0
|
||||
}}
|
||||
>
|
||||
@ -243,7 +242,10 @@ const JobInfo = () => {
|
||||
<ObjectTable
|
||||
type='auditLog'
|
||||
masterFilter={{
|
||||
parent: getModelByName('job').prefix + ':' + jobId
|
||||
parent:
|
||||
getModelByName('job').prefix +
|
||||
':' +
|
||||
jobId
|
||||
}}
|
||||
visibleColumns={{ _id: false, parent: false }}
|
||||
/>
|
||||
|
||||
@ -27,10 +27,7 @@ import UserNotifierToggle from '../../common/UserNotifierToggle'
|
||||
import ViewButton from '../../common/ViewButton'
|
||||
import useCollapseState from '../../hooks/useCollapseState'
|
||||
import ObjectProperty from '../../common/ObjectProperty'
|
||||
import {
|
||||
getModelProperty,
|
||||
getModelByName
|
||||
} from '../../../../database/ObjectModels'
|
||||
import { getModelProperty, getModelByName } from '../../../../database/ObjectModels'
|
||||
import GCodeFileIcon from '../../../Icons/GCodeFileIcon'
|
||||
import SettingsIcon from '../../../Icons/SettingsIcon'
|
||||
import ExclamationOctagonIcon from '../../../Icons/ExclamationOctagonIcon'
|
||||
@ -92,14 +89,14 @@ const PrinterProfileInfo = () => {
|
||||
finishEdit: () => {
|
||||
objectFormRef.current?.handleUpdate?.()
|
||||
return true
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
return (
|
||||
<Flex
|
||||
gap='large'
|
||||
vertical='true'
|
||||
style={{ maxHeight: '100%', height: '100%', minHeight: 0 }}
|
||||
style={{ maxHeight: '100%', minHeight: 0 }}
|
||||
>
|
||||
<Flex justify='space-between'>
|
||||
<Space size='small'>
|
||||
|
||||
@ -98,7 +98,6 @@ const PrinterInfo = () => {
|
||||
vertical='true'
|
||||
style={{
|
||||
maxHeight: '100%',
|
||||
height: '100%',
|
||||
minHeight: 0
|
||||
}}
|
||||
>
|
||||
@ -224,9 +223,7 @@ const PrinterInfo = () => {
|
||||
<ObjectTable
|
||||
ref={profilesTableRef}
|
||||
type='printerProfile'
|
||||
masterFilter={{
|
||||
printer: getModelByName('printer').prefix + ':' + printerId
|
||||
}}
|
||||
masterFilter={{ printer: getModelByName('printer').prefix + ':' + printerId }}
|
||||
visibleColumns={{
|
||||
printer: false,
|
||||
'printer._id': false
|
||||
@ -265,7 +262,10 @@ const PrinterInfo = () => {
|
||||
<ObjectTable
|
||||
type='auditLog'
|
||||
masterFilter={{
|
||||
parent: getModelByName('printer').prefix + ':' + printerId
|
||||
parent:
|
||||
getModelByName('printer').prefix +
|
||||
':' +
|
||||
printerId
|
||||
}}
|
||||
visibleColumns={{ _id: false, parent: false }}
|
||||
/>
|
||||
|
||||
@ -77,7 +77,7 @@ const SubJobInfo = () => {
|
||||
<Flex
|
||||
gap='large'
|
||||
vertical='true'
|
||||
style={{ maxHeight: '100%', height: '100%', minHeight: 0 }}
|
||||
style={{ maxHeight: '100%', minHeight: 0 }}
|
||||
>
|
||||
<Flex justify={'space-between'}>
|
||||
<Space size='small'>
|
||||
@ -183,9 +183,7 @@ const SubJobInfo = () => {
|
||||
) : (
|
||||
<ObjectTable
|
||||
type='stockEvent'
|
||||
masterFilter={{
|
||||
owner: getModelByName('subJob').prefix + ':' + subJobId
|
||||
}}
|
||||
masterFilter={{ owner: getModelByName('subJob').prefix + ':' + subJobId }}
|
||||
visibleColumns={{
|
||||
owner: false,
|
||||
'owner.type': false
|
||||
@ -224,7 +222,10 @@ const SubJobInfo = () => {
|
||||
<ObjectTable
|
||||
type='auditLog'
|
||||
masterFilter={{
|
||||
parent: getModelByName('subJob').prefix + ':' + subJobId
|
||||
parent:
|
||||
getModelByName('subJob').prefix +
|
||||
':' +
|
||||
subJobId
|
||||
}}
|
||||
visibleColumns={{ _id: false, parent: false }}
|
||||
/>
|
||||
|
||||
@ -74,7 +74,7 @@ const ClientInfo = () => {
|
||||
finishEdit: () => {
|
||||
objectFormRef?.current?.handleUpdate?.()
|
||||
return true
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
return (
|
||||
@ -82,7 +82,7 @@ const ClientInfo = () => {
|
||||
<Flex
|
||||
gap='large'
|
||||
vertical='true'
|
||||
style={{ maxHeight: '100%', height: '100%', minHeight: 0 }}
|
||||
style={{ maxHeight: '100%', minHeight: 0 }}
|
||||
>
|
||||
<Flex justify={'space-between'}>
|
||||
<Space size='small'>
|
||||
@ -209,7 +209,10 @@ const ClientInfo = () => {
|
||||
<ObjectTable
|
||||
type='auditLog'
|
||||
masterFilter={{
|
||||
parent: getModelByName('client').prefix + ':' + clientId
|
||||
parent:
|
||||
getModelByName('client').prefix +
|
||||
':' +
|
||||
clientId
|
||||
}}
|
||||
visibleColumns={{ _id: false, parent: false }}
|
||||
/>
|
||||
|
||||
@ -93,7 +93,7 @@ const FulfillmentPolicyInfo = () => {
|
||||
<Flex
|
||||
gap='large'
|
||||
vertical='true'
|
||||
style={{ maxHeight: '100%', height: '100%', minHeight: 0 }}
|
||||
style={{ maxHeight: '100%', minHeight: 0 }}
|
||||
>
|
||||
<Flex justify={'space-between'}>
|
||||
<Space size='small'>
|
||||
|
||||
@ -96,14 +96,14 @@ const ListingVarientInfo = () => {
|
||||
finishEdit: () => {
|
||||
objectFormRef?.current?.handleUpdate?.()
|
||||
return true
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
return (
|
||||
<Flex
|
||||
gap='large'
|
||||
vertical='true'
|
||||
style={{ maxHeight: '100%', height: '100%', minHeight: 0 }}
|
||||
style={{ maxHeight: '100%', minHeight: 0 }}
|
||||
>
|
||||
<Flex justify={'space-between'}>
|
||||
<Space size='small'>
|
||||
|
||||
@ -101,7 +101,7 @@ const ListingInfo = () => {
|
||||
<Flex
|
||||
gap='large'
|
||||
vertical='true'
|
||||
style={{ maxHeight: '100%', height: '100%', minHeight: 0 }}
|
||||
style={{ maxHeight: '100%', minHeight: 0 }}
|
||||
>
|
||||
<Flex justify={'space-between'}>
|
||||
<Space size='small'>
|
||||
|
||||
@ -162,7 +162,7 @@ const MarketplaceInfo = () => {
|
||||
<Flex
|
||||
gap='large'
|
||||
vertical='true'
|
||||
style={{ maxHeight: '100%', height: '100%', minHeight: 0 }}
|
||||
style={{ maxHeight: '100%', minHeight: 0 }}
|
||||
>
|
||||
<Flex justify={'space-between'}>
|
||||
<Space size='small'>
|
||||
|
||||
@ -93,7 +93,7 @@ const ReturnPolicyInfo = () => {
|
||||
<Flex
|
||||
gap='large'
|
||||
vertical='true'
|
||||
style={{ maxHeight: '100%', height: '100%', minHeight: 0 }}
|
||||
style={{ maxHeight: '100%', minHeight: 0 }}
|
||||
>
|
||||
<Flex justify={'space-between'}>
|
||||
<Space size='small'>
|
||||
|
||||
@ -100,7 +100,7 @@ const SalesOrderInfo = () => {
|
||||
orderItemsTableRef?.current?.handleUpdate?.()
|
||||
objectFormRef?.current?.handleUpdate?.()
|
||||
return true
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
return (
|
||||
@ -109,7 +109,6 @@ const SalesOrderInfo = () => {
|
||||
vertical='true'
|
||||
style={{
|
||||
maxHeight: '100%',
|
||||
height: '100%',
|
||||
minHeight: 0
|
||||
}}
|
||||
>
|
||||
@ -229,10 +228,7 @@ const SalesOrderInfo = () => {
|
||||
<ObjectTable
|
||||
type='orderItem'
|
||||
masterFilter={{
|
||||
order:
|
||||
getModelByName('salesOrder').prefix +
|
||||
':' +
|
||||
salesOrderId,
|
||||
order: getModelByName('salesOrder').prefix + ':' + salesOrderId,
|
||||
orderType: 'salesOrder'
|
||||
}}
|
||||
visibleColumns={{ order: false }}
|
||||
@ -251,10 +247,7 @@ const SalesOrderInfo = () => {
|
||||
<ObjectTable
|
||||
type='shipment'
|
||||
masterFilter={{
|
||||
order:
|
||||
getModelByName('salesOrder').prefix +
|
||||
':' +
|
||||
salesOrderId,
|
||||
order: getModelByName('salesOrder').prefix + ':' + salesOrderId,
|
||||
orderType: 'salesOrder'
|
||||
}}
|
||||
visibleColumns={{ order: false }}
|
||||
@ -276,10 +269,7 @@ const SalesOrderInfo = () => {
|
||||
<ObjectTable
|
||||
type='invoice'
|
||||
masterFilter={{
|
||||
order:
|
||||
getModelByName('salesOrder').prefix +
|
||||
':' +
|
||||
salesOrderId,
|
||||
order: getModelByName('salesOrder').prefix + ':' + salesOrderId,
|
||||
orderType: 'salesOrder'
|
||||
}}
|
||||
visibleColumns={{ order: false }}
|
||||
@ -301,10 +291,7 @@ const SalesOrderInfo = () => {
|
||||
<ObjectTable
|
||||
type='stockEvent'
|
||||
masterFilter={{
|
||||
owner:
|
||||
getModelByName('salesOrder').prefix +
|
||||
':' +
|
||||
salesOrderId
|
||||
owner: getModelByName('salesOrder').prefix + ':' + salesOrderId
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
@ -343,7 +330,9 @@ const SalesOrderInfo = () => {
|
||||
type='auditLog'
|
||||
masterFilter={{
|
||||
parent:
|
||||
getModelByName('salesOrder').prefix + ':' + salesOrderId
|
||||
getModelByName('salesOrder').prefix +
|
||||
':' +
|
||||
salesOrderId
|
||||
}}
|
||||
visibleColumns={{ _id: false, parent: false }}
|
||||
/>
|
||||
|
||||
@ -86,40 +86,19 @@ const NAV_BADGE_STYLE = { padding: 0, fontWeight: 600 }
|
||||
const NAV_UPDATE_TAG_STYLE = { cursor: 'pointer', margin: '2px 0 0 0' }
|
||||
const NAV_OVERFLOW_BUTTON_STYLE = { marginBottom: '4px' }
|
||||
|
||||
const NAV_FADE_MS = 200
|
||||
|
||||
const navigationFadeClass = (visible) =>
|
||||
`dashboard-navigation-fade${visible ? '' : ' dashboard-navigation-fade-hidden'}`
|
||||
|
||||
const useDelayedInactive = (visible) => {
|
||||
const [inactive, setInactive] = useState(!visible)
|
||||
|
||||
useEffect(() => {
|
||||
if (visible) {
|
||||
setInactive(false)
|
||||
return undefined
|
||||
}
|
||||
|
||||
const timeoutId = window.setTimeout(() => setInactive(true), NAV_FADE_MS)
|
||||
return () => window.clearTimeout(timeoutId)
|
||||
}, [visible])
|
||||
|
||||
return inactive
|
||||
}
|
||||
|
||||
const NavigationFade = memo(function NavigationFade({
|
||||
visible,
|
||||
children,
|
||||
style,
|
||||
className
|
||||
style
|
||||
}) {
|
||||
const inactive = useDelayedInactive(visible)
|
||||
|
||||
return (
|
||||
<div
|
||||
className={classNames(navigationFadeClass(visible), className)}
|
||||
inert={inactive ? true : undefined}
|
||||
aria-hidden={inactive ? true : undefined}
|
||||
className={navigationFadeClass(visible)}
|
||||
inert={visible ? undefined : true}
|
||||
aria-hidden={visible ? undefined : true}
|
||||
style={style}
|
||||
>
|
||||
{children}
|
||||
@ -130,8 +109,7 @@ const NavigationFade = memo(function NavigationFade({
|
||||
NavigationFade.propTypes = {
|
||||
visible: PropTypes.bool,
|
||||
children: PropTypes.node,
|
||||
style: PropTypes.object,
|
||||
className: PropTypes.string
|
||||
style: PropTypes.object
|
||||
}
|
||||
|
||||
const DashboardNavigationTrailingItems = memo(
|
||||
@ -268,17 +246,13 @@ DashboardElectronCenterItems.propTypes = {
|
||||
const DashboardNavigationTrailing = memo(function DashboardNavigationTrailing({
|
||||
showControls,
|
||||
isOtherApp,
|
||||
isElectron,
|
||||
...itemProps
|
||||
}) {
|
||||
return (
|
||||
<>
|
||||
<div className='electrobun-webkit-app-region-no-drag'>
|
||||
<NavigationFade visible={!isElectron || showControls}>
|
||||
<DashboardNavigationTrailingItems
|
||||
isElectron={isElectron}
|
||||
{...itemProps}
|
||||
/>
|
||||
<NavigationFade visible={showControls}>
|
||||
<DashboardNavigationTrailingItems {...itemProps} />
|
||||
</NavigationFade>
|
||||
</div>
|
||||
{isOtherApp ? <DashboardWindowButtons /> : null}
|
||||
@ -496,11 +470,6 @@ const DashboardNavigation = () => {
|
||||
const showMobileLogo = !isElectron && isMobile
|
||||
|
||||
useEffect(() => {
|
||||
if (!isElectron) {
|
||||
setAnyModalVisible(false)
|
||||
return
|
||||
}
|
||||
|
||||
const isModalWrapVisible = (node) => {
|
||||
if (!(node instanceof Element)) return false
|
||||
if (node.getAttribute('aria-hidden') === 'true') return false
|
||||
@ -539,7 +508,7 @@ const DashboardNavigation = () => {
|
||||
observer.disconnect()
|
||||
if (frameId) window.cancelAnimationFrame(frameId)
|
||||
}
|
||||
}, [isElectron])
|
||||
}, [])
|
||||
|
||||
const controlsReady = !isElectron || authenticated
|
||||
const showControls = controlsReady && !anyModalVisible
|
||||
@ -649,15 +618,16 @@ const DashboardNavigation = () => {
|
||||
</>
|
||||
)
|
||||
|
||||
const showWindowTitle = isElectron && !showControls
|
||||
|
||||
const windowTitle = (
|
||||
<NavigationFade
|
||||
visible={showWindowTitle}
|
||||
className='dashboard-navigation-window-title'
|
||||
<div
|
||||
className={`dashboard-navigation-window-title ${navigationFadeClass(
|
||||
!showControls
|
||||
)}`}
|
||||
aria-hidden={showControls}
|
||||
inert={showControls ? true : undefined}
|
||||
>
|
||||
<Text type='secondary'>Farm Control</Text>
|
||||
</NavigationFade>
|
||||
</div>
|
||||
)
|
||||
|
||||
const navigationCenterBorder = (
|
||||
@ -674,11 +644,12 @@ const DashboardNavigation = () => {
|
||||
{navigationLeading}
|
||||
<div className='dashboard-navigation-center'>
|
||||
{!isMobile ? (
|
||||
<NavigationFade visible style={NAV_CENTER_FADE_STYLE}>
|
||||
<NavigationFade visible={showControls} style={NAV_CENTER_FADE_STYLE}>
|
||||
{menu}
|
||||
</NavigationFade>
|
||||
) : null}
|
||||
{windowTitle}
|
||||
{navigationCenterBorder}
|
||||
</div>
|
||||
{navigationTrailing}
|
||||
</Flex>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user