Add Stock Events Section to Stock Audit Info Component
- Introduced StockEventIcon and added a new section for Stock Events in the StockAuditInfo component. - Updated the collapse state management to include stock events, enhancing the user interface and data visibility. - Modified the ObjectTable to display stock events related to the selected stock audit, improving data representation and user experience.
This commit is contained in:
parent
3475c1b35d
commit
6800702881
@ -14,6 +14,7 @@ import InfoCircleIcon from '../../../Icons/InfoCircleIcon.jsx'
|
||||
import NoteIcon from '../../../Icons/NoteIcon.jsx'
|
||||
import AuditLogIcon from '../../../Icons/AuditLogIcon.jsx'
|
||||
import StockAuditIcon from '../../../Icons/StockAuditIcon.jsx'
|
||||
import StockEventIcon from '../../../Icons/StockEventIcon.jsx'
|
||||
import ObjectForm from '../../common/ObjectForm.jsx'
|
||||
import EditButtons from '../../common/EditButtons.jsx'
|
||||
import ObjectTableNavigationButtons from '../../common/ObjectTableNavigationButtons.jsx'
|
||||
@ -41,6 +42,7 @@ const StockAuditInfo = () => {
|
||||
{
|
||||
info: true,
|
||||
auditLines: true,
|
||||
stockEvents: true,
|
||||
notes: true,
|
||||
auditLogs: false
|
||||
}
|
||||
@ -108,6 +110,7 @@ const StockAuditInfo = () => {
|
||||
items={[
|
||||
{ key: 'info', label: 'Stock Audit Information' },
|
||||
{ key: 'auditLines', label: 'Audit Lines' },
|
||||
{ key: 'stockEvents', label: 'Stock Events' },
|
||||
{ key: 'notes', label: 'Notes' },
|
||||
{ key: 'auditLogs', label: 'Audit Logs' }
|
||||
]}
|
||||
@ -212,6 +215,32 @@ const StockAuditInfo = () => {
|
||||
</ObjectForm>
|
||||
</ActionHandler>
|
||||
|
||||
<InfoCollapse
|
||||
title='Stock Events'
|
||||
icon={<StockEventIcon />}
|
||||
active={collapseState.stockEvents}
|
||||
onToggle={(expanded) =>
|
||||
updateCollapseState('stockEvents', expanded)
|
||||
}
|
||||
collapseKey='stockEvents'
|
||||
>
|
||||
{objectFormState.loading ? (
|
||||
<InfoCollapsePlaceholder />
|
||||
) : (
|
||||
<ObjectTable
|
||||
type='stockEvent'
|
||||
masterFilter={{
|
||||
owner:
|
||||
getModelByName('stockAudit').prefix + ':' + stockAuditId
|
||||
}}
|
||||
visibleColumns={{
|
||||
owner: false,
|
||||
'owner.type': false
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</InfoCollapse>
|
||||
|
||||
<InfoCollapse
|
||||
title='Notes'
|
||||
icon={<NoteIcon />}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user