IO-1697 Remove acct path popup if not qbd.

This commit is contained in:
Patrick Fic
2022-02-02 08:47:32 -08:00
parent 88bc8d4d05
commit 73e2b2d65d

View File

@@ -6,9 +6,11 @@ import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { setPartnerVersion } from "../../redux/application/application.actions";
import { selectBodyshop } from "../../redux/user/user.selectors";
const mapStateToProps = createStructuredSelector({
//currentUser: selectCurrentUser
bodyshop: selectBodyshop,
});
const mapDispatchToProps = (dispatch) => ({
//setUserLanguage: language => dispatch(setUserLanguage(language))
@@ -19,7 +21,7 @@ export default connect(
mapDispatchToProps
)(PartnerPingComponent);
export function PartnerPingComponent({ setPartnerVersion }) {
export function PartnerPingComponent({ bodyshop, setPartnerVersion }) {
const { t } = useTranslation();
useEffect(() => {
@@ -32,7 +34,14 @@ export function PartnerPingComponent({ setPartnerVersion }) {
setPartnerVersion(appver);
console.log({ appver, qbpath });
if (!qbpath) {
if (
!qbpath &&
!(
bodyshop.cdk_dealerid ||
bodyshop.pbs_serialnumber ||
bodyshop.accountingconfig.qbo
)
) {
notification["error"]({
title: "",
message: t("general.messages.noacctfilepath"),