feature/IO-3357-Reynolds-and-Reynolds-DMS-API-Integration - Fixes to Caching of allocations summary
This commit is contained in:
@@ -68,6 +68,7 @@ const DMS_SOCKET_EVENTS = {
|
||||
export function DmsContainer({ bodyshop, setBreadcrumbs, setSelectedHeader, insertAuditTrail }) {
|
||||
const { t } = useTranslation();
|
||||
const [resetAfterReconnect, setResetAfterReconnect] = useState(false);
|
||||
const [allocationsSummary, setAllocationsSummary] = useState(null);
|
||||
|
||||
const history = useNavigate();
|
||||
const search = queryString.parse(useLocation().search);
|
||||
@@ -152,6 +153,7 @@ export function DmsContainer({ bodyshop, setBreadcrumbs, setSelectedHeader, inse
|
||||
setLogs([]);
|
||||
setRrOpenRoLimit(false);
|
||||
setrrValidationPending(false);
|
||||
setAllocationsSummary(null);
|
||||
|
||||
if (!activeSocket) return;
|
||||
|
||||
@@ -398,6 +400,7 @@ export function DmsContainer({ bodyshop, setBreadcrumbs, setSelectedHeader, inse
|
||||
{!isRrMode ? (
|
||||
<DmsAllocationsSummary
|
||||
key={resetKey}
|
||||
onAllocationsChange={setAllocationsSummary}
|
||||
title={
|
||||
<span>
|
||||
<Link
|
||||
@@ -415,6 +418,7 @@ export function DmsContainer({ bodyshop, setBreadcrumbs, setSelectedHeader, inse
|
||||
) : (
|
||||
<RrAllocationsSummary
|
||||
key={resetKey}
|
||||
onAllocationsChange={setAllocationsSummary}
|
||||
title={
|
||||
<span>
|
||||
<Link to={`/manage/jobs/${data && data.jobs_by_pk.id}`}>
|
||||
@@ -432,7 +436,14 @@ export function DmsContainer({ bodyshop, setBreadcrumbs, setSelectedHeader, inse
|
||||
</Col>
|
||||
|
||||
<Col md={24} lg={14} className="dms-equal-height-col">
|
||||
<DmsPostForm key={resetKey} socket={activeSocket} job={data?.jobs_by_pk} logsRef={logsRef} mode={mode} />
|
||||
<DmsPostForm
|
||||
key={resetKey}
|
||||
socket={activeSocket}
|
||||
job={data?.jobs_by_pk}
|
||||
logsRef={logsRef}
|
||||
mode={mode}
|
||||
allocationsSummary={allocationsSummary}
|
||||
/>
|
||||
</Col>
|
||||
|
||||
<DmsCustomerSelector
|
||||
|
||||
Reference in New Issue
Block a user