IO-1697 Dont display partner message unless QBD.
This commit is contained in:
@@ -31,15 +31,16 @@ export function PartnerPingComponent({ bodyshop, setPartnerVersion }) {
|
||||
//if (process.env.NODE_ENV === "development") return;
|
||||
const PartnerResponse = await axios.post("http://localhost:1337/ping/");
|
||||
const { appver, qbpath } = PartnerResponse.data;
|
||||
|
||||
if (!bodyshop) return;
|
||||
setPartnerVersion(appver);
|
||||
console.log({ appver, qbpath });
|
||||
if (
|
||||
!qbpath &&
|
||||
!(
|
||||
bodyshop.cdk_dealerid ||
|
||||
bodyshop.pbs_serialnumber ||
|
||||
bodyshop.accountingconfig.qbo
|
||||
bodyshop &&
|
||||
(bodyshop.cdk_dealerid ||
|
||||
bodyshop.pbs_serialnumber ||
|
||||
bodyshop.accountingconfig.qbo)
|
||||
)
|
||||
) {
|
||||
notification["error"]({
|
||||
@@ -48,6 +49,7 @@ export function PartnerPingComponent({ bodyshop, setPartnerVersion }) {
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
notification["error"]({
|
||||
title: "",
|
||||
message: t("general.messages.partnernotrunning"),
|
||||
@@ -57,7 +59,7 @@ export function PartnerPingComponent({ bodyshop, setPartnerVersion }) {
|
||||
// Execute the created function directly
|
||||
checkPartnerStatus();
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
}, [bodyshop]);
|
||||
|
||||
return <></>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user