IO-1689 Resolve partner popup checks.
This commit is contained in:
@@ -4,7 +4,7 @@ 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";
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
|
import {store} from '../../redux/store'
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
//currentUser: selectCurrentUser
|
//currentUser: selectCurrentUser
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
@@ -18,7 +18,7 @@ export default connect(
|
|||||||
mapDispatchToProps
|
mapDispatchToProps
|
||||||
)(PartnerPingComponent);
|
)(PartnerPingComponent);
|
||||||
|
|
||||||
export function PartnerPingComponent({ bodyshop, setPartnerVersion }) {
|
export function PartnerPingComponent({ bodyshop, }) {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// Create an scoped async function in the hook
|
// Create an scoped async function in the hook
|
||||||
|
|
||||||
@@ -30,7 +30,7 @@ export function PartnerPingComponent({ bodyshop, setPartnerVersion }) {
|
|||||||
return <></>;
|
return <></>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function checkPartnerStatus(bodyshop, checkAcctPath = false) {
|
export async function checkPartnerStatus(bodyshop) {
|
||||||
if (!bodyshop) return;
|
if (!bodyshop) return;
|
||||||
try {
|
try {
|
||||||
//if (process.env.NODE_ENV === "development") return;
|
//if (process.env.NODE_ENV === "development") return;
|
||||||
@@ -38,7 +38,8 @@ export async function checkPartnerStatus(bodyshop, checkAcctPath = false) {
|
|||||||
// const {
|
// const {
|
||||||
// appver, //qbpath
|
// appver, //qbpath
|
||||||
// } = PartnerResponse.data;
|
// } = PartnerResponse.data;
|
||||||
setPartnerVersion(PartnerResponse.data);
|
console.log(PartnerResponse.data)
|
||||||
|
store.dispatch(setPartnerVersion(PartnerResponse.data));
|
||||||
// if (
|
// if (
|
||||||
// checkAcctPath &&
|
// checkAcctPath &&
|
||||||
// !qbpath &&
|
// !qbpath &&
|
||||||
|
|||||||
@@ -48,10 +48,12 @@ export function JobsAvailablePageContainer({
|
|||||||
</Link>
|
</Link>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<AlertComponent
|
{!partnerVersion && (
|
||||||
type="warning"
|
<AlertComponent
|
||||||
message={t("general.messages.partnernotrunning")}
|
type="warning"
|
||||||
/>
|
message={t("general.messages.partnernotrunning")}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
<JobsAvailableTableContainer />
|
<JobsAvailableTableContainer />
|
||||||
</div>
|
</div>
|
||||||
</RbacWrapper>
|
</RbacWrapper>
|
||||||
|
|||||||
Reference in New Issue
Block a user