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(() => {
|
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>
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
Reference in New Issue
Block a user