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