IO-2776 Calculate allocations on load using Fortellis connection.
This commit is contained in:
@@ -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,8 +93,12 @@ export function DmsAllocationsSummary({ socket, bodyshop, jobId, title }) {
|
||||
extra={
|
||||
<Button
|
||||
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 />
|
||||
</Button>
|
||||
|
||||
@@ -35,7 +35,7 @@ function createJsonEvent(socket, level, message, json) {
|
||||
timestamp: new Date(),
|
||||
level,
|
||||
message
|
||||
});
|
||||
});
|
||||
}
|
||||
logger.log(
|
||||
"ws-log-event-json",
|
||||
|
||||
Reference in New Issue
Block a user