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