Updated Print Center & TemplateList Object IO-587
This commit is contained in:
@@ -3,47 +3,37 @@ import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { setEmailOptions } from "../../redux/email/email.actions";
|
||||
import { toggleModalVisible } from "../../redux/modals/modals.actions";
|
||||
import { selectPrintCenter } from "../../redux/modals/modals.selectors";
|
||||
import {
|
||||
selectBodyshop,
|
||||
selectCurrentUser,
|
||||
} from "../../redux/user/user.selectors";
|
||||
import PrintCenterModalComponent from "./print-center-modal.component";
|
||||
import "./print-center-modal.styles.scss";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
currentUser: selectCurrentUser,
|
||||
bodyshop: selectBodyshop,
|
||||
printCenterModal: selectPrintCenter,
|
||||
});
|
||||
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
setEmailOptions: (e) => dispatch(setEmailOptions(e)),
|
||||
toggleModalVisible: () => dispatch(toggleModalVisible("printCenter")),
|
||||
});
|
||||
|
||||
export function PrintCenterModalContainer({
|
||||
printCenterModal,
|
||||
toggleModalVisible,
|
||||
currentUser,
|
||||
bodyshop,
|
||||
setEmailOptions,
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
const { visible, context } = printCenterModal;
|
||||
const { type, id } = context;
|
||||
const { type } = context;
|
||||
// const { refetch } = actions;
|
||||
|
||||
return (
|
||||
<Modal
|
||||
visible={visible}
|
||||
onCancel={() => toggleModalVisible()}
|
||||
width='90%'
|
||||
title={` ${t("printcenter.labels.title")} ${type} - ${id}`}
|
||||
destroyOnClose>
|
||||
width="90%"
|
||||
title={` ${t("printcenter.labels.title")} - ${type}`}
|
||||
destroyOnClose
|
||||
>
|
||||
<PrintCenterModalComponent context={context} />
|
||||
</Modal>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user