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