IO-2776 Calculate allocations on load using Fortellis connection.

This commit is contained in:
Patrick Fic
2025-08-27 16:56:46 -07:00
parent f525ec6fb8
commit 2e25324ae9
2 changed files with 8 additions and 4 deletions

View File

@@ -35,7 +35,7 @@ export function DmsAllocationsSummary({ socket, bodyshop, jobId, title }) {
useEffect(() => { useEffect(() => {
if (Fortellis.treatment === "on") { if (Fortellis.treatment === "on") {
wsssocket.emit("cdk-calculate-allocations", jobId, (ack) => { wsssocket.emit("fortellis-calculate-allocations", jobId, (ack) => {
setAllocationsSummary(ack); setAllocationsSummary(ack);
socket.allocationsSummary = ack; socket.allocationsSummary = ack;
}); });
@@ -93,8 +93,12 @@ export function DmsAllocationsSummary({ socket, bodyshop, jobId, title }) {
extra={ extra={
<Button <Button
onClick={() => { onClick={() => {
socket.emit("cdk-calculate-allocations", jobId, (ack) => setAllocationsSummary(ack)); if (Fortellis.treatment === "on") {
}} socket.emit("fortellis-calculate-allocations", jobId, (ack) => setAllocationsSummary(ack));
} else {
socket.emit("cdk-calculate-allocations", jobId, (ack) => setAllocationsSummary(ack));
}
}}
> >
<SyncOutlined /> <SyncOutlined />
</Button> </Button>

View File

@@ -35,7 +35,7 @@ function createJsonEvent(socket, level, message, json) {
timestamp: new Date(), timestamp: new Date(),
level, level,
message message
}); });
} }
logger.log( logger.log(
"ws-log-event-json", "ws-log-event-json",