Fortellis bug fixes.

This commit is contained in:
Patrick Fic
2025-05-14 17:48:28 -07:00
parent 19ce1c66ad
commit 163eaac110
3 changed files with 39 additions and 16 deletions

View File

@@ -77,13 +77,26 @@ export function DmsCustomerSelector({ bodyshop, jobid }) {
const onUseGeneric = () => {
setOpen(false);
socket.emit(`${dmsType}-selected-customer`, bodyshop.cdk_configuration.generic_customer_number);
if (Fortellis.treatment === "on") {
wsssocket.emit(`fortellis-selected-customer`, {
selectedCustomerId: bodyshop.cdk_configuration.generic_customer_number,
jobid
});
} else {
socket.emit(`${dmsType}-selected-customer`, bodyshop.cdk_configuration.generic_customer_number);
}
setSelectedCustomer(null);
};
const onCreateNew = () => {
setOpen(false);
socket.emit(`${dmsType}-selected-customer`, null);
if (Fortellis.treatment === "on") {
wsssocket.emit(`fortellis-selected-customer`, { selectedCustomerId: null, jobid });
} else {
socket.emit(`${dmsType}-selected-customer`, null);
}
setSelectedCustomer(null);
};