IO-233 CDK Updates.
This commit is contained in:
@@ -48,7 +48,7 @@ export function DmsCdkVehicles({ bodyshop, form, socket, job }) {
|
||||
];
|
||||
|
||||
return (
|
||||
<div>
|
||||
<>
|
||||
<Modal
|
||||
width={"90%"}
|
||||
visible={visible}
|
||||
@@ -100,6 +100,6 @@ export function DmsCdkVehicles({ bodyshop, form, socket, job }) {
|
||||
>
|
||||
{t("jobs.actions.dms.findmakemodelcode")}
|
||||
</Button>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -4,9 +4,12 @@ import React, { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import {
|
||||
selectBodyshop,
|
||||
selectCurrentUser,
|
||||
} from "../../redux/user/user.selectors";
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
//currentUser: selectCurrentUser
|
||||
currentUser: selectCurrentUser,
|
||||
bodyshop: selectBodyshop,
|
||||
});
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
@@ -14,9 +17,12 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
});
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(DmsCdkMakesRefetch);
|
||||
|
||||
export function DmsCdkMakesRefetch({ bodyshop, form, socket }) {
|
||||
export function DmsCdkMakesRefetch({ currentUser, bodyshop, form, socket }) {
|
||||
const [loading, setLoading] = useState(false);
|
||||
const { t } = useTranslation();
|
||||
|
||||
if (!currentUser.email.includes("@imex.")) return null;
|
||||
|
||||
const handleRefetch = async () => {
|
||||
setLoading(true);
|
||||
await axios.post("/cdk/getvehicles", {
|
||||
|
||||
Reference in New Issue
Block a user