BOD-9 Added print format to parts order.

This commit is contained in:
Patrick Fic
2020-05-12 10:47:22 -07:00
parent 6fd485c2fe
commit cf8e0a918c
4 changed files with 25 additions and 11 deletions

View File

@@ -1,12 +1,11 @@
import { MailOutlined, PrinterOutlined } from "@ant-design/icons";
import React from "react";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { setEmailOptions } from "../../redux/email/email.actions";
import { selectPrintCenter } from "../../redux/modals/modals.selectors";
import { selectBodyshop } from "../../redux/user/user.selectors";
import { MailOutlined, PrinterOutlined } from "@ant-design/icons";
import RenderTemplate from "../../utils/RenderTemplate";
import { useApolloClient } from "@apollo/react-hooks";
const mapStateToProps = createStructuredSelector({
printCenterModal: selectPrintCenter,
bodyshop: selectBodyshop,
@@ -23,15 +22,13 @@ export function PrintCenterItemComponent({
bodyshop,
disabled,
}) {
const client = useApolloClient();
const renderToNewWindow = async () => {
const html = await RenderTemplate(
{
name: item.key,
variables: { id: id },
},
client,
bodyshop
);