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,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 />
|
||||
|
||||
Reference in New Issue
Block a user