Added third party payer support IO-546
This commit is contained in:
@@ -23615,6 +23615,305 @@
|
|||||||
<folder_node>
|
<folder_node>
|
||||||
<name>jobs</name>
|
<name>jobs</name>
|
||||||
<children>
|
<children>
|
||||||
|
<folder_node>
|
||||||
|
<name>3rdpartyfields</name>
|
||||||
|
<children>
|
||||||
|
<concept_node>
|
||||||
|
<name>addr1</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>addr2</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>addr3</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>attn</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>city</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>custgst</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>ded_amt</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>depreciation</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>other</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>ponumber</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>sendtype</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>state</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>zip</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
|
</children>
|
||||||
|
</folder_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>3rdpartypayer</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
<concept_node>
|
<concept_node>
|
||||||
<name>appointment_confirmation</name>
|
<name>appointment_confirmation</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -23846,6 +24145,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>thirdpartypayer</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
<concept_node>
|
<concept_node>
|
||||||
<name>window_tag</name>
|
<name>window_tag</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
|
|||||||
@@ -18,13 +18,14 @@ import { CHECK_BILL_INVOICE_NUMBER } from "../../graphql/bills.queries";
|
|||||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
import AlertComponent from "../alert/alert.component";
|
import AlertComponent from "../alert/alert.component";
|
||||||
import FormDatePicker from "../form-date-picker/form-date-picker.component";
|
import FormDatePicker from "../form-date-picker/form-date-picker.component";
|
||||||
|
import FormFieldsChanged from "../form-fields-changed-alert/form-fields-changed-alert.component";
|
||||||
import CurrencyInput from "../form-items-formatted/currency-form-item.component";
|
import CurrencyInput from "../form-items-formatted/currency-form-item.component";
|
||||||
import JobSearchSelect from "../job-search-select/job-search-select.component";
|
import JobSearchSelect from "../job-search-select/job-search-select.component";
|
||||||
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
||||||
import VendorSearchSelect from "../vendor-search-select/vendor-search-select.component";
|
import VendorSearchSelect from "../vendor-search-select/vendor-search-select.component";
|
||||||
import BillFormLines from "./bill-form.lines.component";
|
import BillFormLines from "./bill-form.lines.component";
|
||||||
import { CalculateBillTotal } from "./bill-form.totals.utility";
|
import { CalculateBillTotal } from "./bill-form.totals.utility";
|
||||||
import FormFieldsChanged from "../form-fields-changed-alert/form-fields-changed-alert.component";
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -0,0 +1,178 @@
|
|||||||
|
import { useQuery } from "@apollo/react-hooks";
|
||||||
|
import { Button, Form, Input, InputNumber, Modal, Radio } from "antd";
|
||||||
|
import React, { useState } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { SEARCH_VENDOR_AUTOCOMPLETE_WITH_ADDR } from "../../graphql/vendors.queries";
|
||||||
|
import { GenerateDocument } from "../../utils/RenderTemplate";
|
||||||
|
import { TemplateList } from "../../utils/TemplateConstants";
|
||||||
|
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
||||||
|
import VendorSearchSelect from "../vendor-search-select/vendor-search-select.component";
|
||||||
|
|
||||||
|
export default function Jobd3RdPartyModal({ jobId }) {
|
||||||
|
const [isModalVisible, setIsModalVisible] = useState(false);
|
||||||
|
const { t } = useTranslation();
|
||||||
|
const [form] = Form.useForm();
|
||||||
|
const { data: VendorAutoCompleteData } = useQuery(
|
||||||
|
SEARCH_VENDOR_AUTOCOMPLETE_WITH_ADDR
|
||||||
|
);
|
||||||
|
|
||||||
|
const showModal = () => {
|
||||||
|
setIsModalVisible(true);
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleOk = () => {
|
||||||
|
form.submit();
|
||||||
|
setIsModalVisible(false);
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleCancel = () => {
|
||||||
|
setIsModalVisible(false);
|
||||||
|
};
|
||||||
|
const handleFinish = (values) => {
|
||||||
|
const { sendtype, ...restVals } = values;
|
||||||
|
console.log(restVals);
|
||||||
|
GenerateDocument(
|
||||||
|
{
|
||||||
|
name: TemplateList("job_special").thirdpartypayer.key,
|
||||||
|
variables: { id: jobId },
|
||||||
|
context: restVals,
|
||||||
|
},
|
||||||
|
{},
|
||||||
|
sendtype
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleVendorSelect = (vendorid, opt) => {
|
||||||
|
const vendor = VendorAutoCompleteData.vendors.filter(
|
||||||
|
(v) => v.id === vendorid
|
||||||
|
)[0];
|
||||||
|
if (vendor) {
|
||||||
|
form.setFieldsValue({
|
||||||
|
addr1: vendor.name,
|
||||||
|
addr2: vendor.street1,
|
||||||
|
addr3: vendor.street2,
|
||||||
|
city: vendor.city,
|
||||||
|
state: vendor.state,
|
||||||
|
zip: vendor.zip,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Button type="primary" onClick={showModal}>
|
||||||
|
{t("printcenter.jobs.3rdpartypayer")}
|
||||||
|
</Button>
|
||||||
|
<Modal visible={isModalVisible} onOk={handleOk} onCancel={handleCancel}>
|
||||||
|
<Form
|
||||||
|
onFinish={handleFinish}
|
||||||
|
autoComplete={"off"}
|
||||||
|
layout="vertical"
|
||||||
|
form={form}
|
||||||
|
>
|
||||||
|
<Form.Item label={t("bills.fields.vendor")} name="vendorid">
|
||||||
|
<VendorSearchSelect
|
||||||
|
options={VendorAutoCompleteData && VendorAutoCompleteData.vendors}
|
||||||
|
onSelect={handleVendorSelect}
|
||||||
|
/>
|
||||||
|
</Form.Item>
|
||||||
|
<LayoutFormRow grow>
|
||||||
|
<Form.Item
|
||||||
|
label={t("printcenter.jobs.3rdpartyfields.addr1")}
|
||||||
|
name="addr1"
|
||||||
|
>
|
||||||
|
<Input />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("printcenter.jobs.3rdpartyfields.addr2")}
|
||||||
|
name="addr2"
|
||||||
|
>
|
||||||
|
<Input />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("printcenter.jobs.3rdpartyfields.addr3")}
|
||||||
|
name="addr3"
|
||||||
|
>
|
||||||
|
<Input />
|
||||||
|
</Form.Item>
|
||||||
|
</LayoutFormRow>
|
||||||
|
<LayoutFormRow grow>
|
||||||
|
<Form.Item
|
||||||
|
label={t("printcenter.jobs.3rdpartyfields.city")}
|
||||||
|
name="city"
|
||||||
|
>
|
||||||
|
<Input />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("printcenter.jobs.3rdpartyfields.state")}
|
||||||
|
name="state"
|
||||||
|
>
|
||||||
|
<Input />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("printcenter.jobs.3rdpartyfields.zip")}
|
||||||
|
name="zip"
|
||||||
|
>
|
||||||
|
<Input />
|
||||||
|
</Form.Item>
|
||||||
|
</LayoutFormRow>
|
||||||
|
<LayoutFormRow grow>
|
||||||
|
<Form.Item
|
||||||
|
label={t("printcenter.jobs.3rdpartyfields.attn")}
|
||||||
|
name="attn"
|
||||||
|
>
|
||||||
|
<Input />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("printcenter.jobs.3rdpartyfields.ponumber")}
|
||||||
|
name="ponumber"
|
||||||
|
>
|
||||||
|
<Input />
|
||||||
|
</Form.Item>
|
||||||
|
</LayoutFormRow>
|
||||||
|
<LayoutFormRow grow>
|
||||||
|
<Form.Item
|
||||||
|
label={t("printcenter.jobs.3rdpartyfields.ded_amt")}
|
||||||
|
name="ded_amt"
|
||||||
|
>
|
||||||
|
<InputNumber min={0} precision={2} />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("printcenter.jobs.3rdpartyfields.depreciation")}
|
||||||
|
name="depreciation"
|
||||||
|
>
|
||||||
|
<InputNumber min={0} precision={2} />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("printcenter.jobs.3rdpartyfields.custgst")}
|
||||||
|
name="custgst"
|
||||||
|
>
|
||||||
|
<InputNumber min={0} precision={2} />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("printcenter.jobs.3rdpartyfields.other")}
|
||||||
|
name="other"
|
||||||
|
>
|
||||||
|
<InputNumber min={0} precision={2} />
|
||||||
|
</Form.Item>
|
||||||
|
</LayoutFormRow>
|
||||||
|
<Form.Item
|
||||||
|
label={t("printcenter.jobs.3rdpartyfields.sendtype")}
|
||||||
|
name="sendtype"
|
||||||
|
rules={[
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: t("general.validation.required"),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
>
|
||||||
|
<Radio.Group>
|
||||||
|
<Radio value={"e"}>{t("parts_orders.labels.email")}</Radio>
|
||||||
|
<Radio value={"p"}>{t("parts_orders.labels.print")}</Radio>
|
||||||
|
</Radio.Group>
|
||||||
|
</Form.Item>
|
||||||
|
</Form>
|
||||||
|
</Modal>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -33,7 +33,7 @@ export function PartsReceiveModalContainer({
|
|||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
const { visible, context, actions } = partsOrderModal;
|
const { visible, context, actions } = partsOrderModal;
|
||||||
const { jobId, partsorderlines } = context;
|
const { partsorderlines } = context;
|
||||||
|
|
||||||
const { refetch } = actions;
|
const { refetch } = actions;
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { connect } from "react-redux";
|
|||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
import { selectPrintCenter } from "../../redux/modals/modals.selectors";
|
import { selectPrintCenter } from "../../redux/modals/modals.selectors";
|
||||||
import { TemplateList } from "../../utils/TemplateConstants";
|
import { TemplateList } from "../../utils/TemplateConstants";
|
||||||
|
import Jobd3RdPartyModal from "../job-3rd-party-modal/job-3rd-party-modal.component";
|
||||||
import PrintCenterItem from "../print-center-item/print-center-item.component";
|
import PrintCenterItem from "../print-center-item/print-center-item.component";
|
||||||
import PrintCenterSpeedPrint from "../print-center-speed-print/print-center-speed-print.component";
|
import PrintCenterSpeedPrint from "../print-center-speed-print/print-center-speed-print.component";
|
||||||
|
|
||||||
@@ -44,6 +45,7 @@ export function PrintCenterJobsComponent({ printCenterModal }) {
|
|||||||
))}
|
))}
|
||||||
</ul>
|
</ul>
|
||||||
</Collapse.Panel>
|
</Collapse.Panel>
|
||||||
|
<Jobd3RdPartyModal jobId={jobId} />
|
||||||
</Collapse>
|
</Collapse>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
|||||||
@@ -92,3 +92,21 @@ export const SEARCH_VENDOR_AUTOCOMPLETE = gql`
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
export const SEARCH_VENDOR_AUTOCOMPLETE_WITH_ADDR = gql`
|
||||||
|
query SEARCH_VENDOR_AUTOCOMPLETE_WITH_ADDR {
|
||||||
|
vendors(order_by: { name: asc }) {
|
||||||
|
name
|
||||||
|
discount
|
||||||
|
id
|
||||||
|
cost_center
|
||||||
|
street1
|
||||||
|
street2
|
||||||
|
zip
|
||||||
|
country
|
||||||
|
city
|
||||||
|
email
|
||||||
|
state
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|||||||
@@ -964,7 +964,7 @@
|
|||||||
"lam": "Mechanical",
|
"lam": "Mechanical",
|
||||||
"lar": "Refinish",
|
"lar": "Refinish",
|
||||||
"las": "Structural",
|
"las": "Structural",
|
||||||
"lau": "LAU",
|
"lau": "User Defined",
|
||||||
"local_tax_rate": "Local Tax Rate",
|
"local_tax_rate": "Local Tax Rate",
|
||||||
"loss_date": "Loss Date",
|
"loss_date": "Loss Date",
|
||||||
"loss_desc": "Loss Description",
|
"loss_desc": "Loss Description",
|
||||||
@@ -1017,8 +1017,8 @@
|
|||||||
"rate_lag": "Glass",
|
"rate_lag": "Glass",
|
||||||
"rate_lam": "Mechanical",
|
"rate_lam": "Mechanical",
|
||||||
"rate_lar": "Refinish",
|
"rate_lar": "Refinish",
|
||||||
"rate_las": "Sublet",
|
"rate_las": "Structural",
|
||||||
"rate_lau": "Aluminum",
|
"rate_lau": "User Defined",
|
||||||
"rate_ma2s": "2 Stage Paint",
|
"rate_ma2s": "2 Stage Paint",
|
||||||
"rate_ma3s": "3 Stage Paint",
|
"rate_ma3s": "3 Stage Paint",
|
||||||
"rate_mabl": "MABL??",
|
"rate_mabl": "MABL??",
|
||||||
@@ -1439,6 +1439,22 @@
|
|||||||
"nocontexttype": "No context type set."
|
"nocontexttype": "No context type set."
|
||||||
},
|
},
|
||||||
"jobs": {
|
"jobs": {
|
||||||
|
"3rdpartyfields": {
|
||||||
|
"addr1": "Address 1",
|
||||||
|
"addr2": "Address 2",
|
||||||
|
"addr3": "Address 3",
|
||||||
|
"attn": "Attention",
|
||||||
|
"city": "City",
|
||||||
|
"custgst": "Customer Portion of GST",
|
||||||
|
"ded_amt": "Deductible",
|
||||||
|
"depreciation": "Depreciation",
|
||||||
|
"other": "Other",
|
||||||
|
"ponumber": "PO Number",
|
||||||
|
"sendtype": "Send by",
|
||||||
|
"state": "Province/State",
|
||||||
|
"zip": "Postal Code/Zip"
|
||||||
|
},
|
||||||
|
"3rdpartypayer": "Third Party Payer",
|
||||||
"appointment_confirmation": "Appointment Confirmation",
|
"appointment_confirmation": "Appointment Confirmation",
|
||||||
"casl_authorization": "CASL Authorization",
|
"casl_authorization": "CASL Authorization",
|
||||||
"diagnostic_authorization": "Diagnostic Authorization",
|
"diagnostic_authorization": "Diagnostic Authorization",
|
||||||
@@ -1450,6 +1466,7 @@
|
|||||||
"payment_receipt": "Payment Receipt",
|
"payment_receipt": "Payment Receipt",
|
||||||
"payments_by_job": "Job Payments",
|
"payments_by_job": "Job Payments",
|
||||||
"ro_with_description": "RO Summary with Descriptions",
|
"ro_with_description": "RO Summary with Descriptions",
|
||||||
|
"thirdpartypayer": "Third Party Payer",
|
||||||
"window_tag": "Window Tag",
|
"window_tag": "Window Tag",
|
||||||
"work_authorization": "Work Authorization"
|
"work_authorization": "Work Authorization"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1017,8 +1017,8 @@
|
|||||||
"rate_lag": "Tasa de vidrio",
|
"rate_lag": "Tasa de vidrio",
|
||||||
"rate_lam": "Tasa mecánica",
|
"rate_lam": "Tasa mecánica",
|
||||||
"rate_lar": "Tasa de acabado",
|
"rate_lar": "Tasa de acabado",
|
||||||
"rate_las": "Tasa de subarriendo",
|
"rate_las": "",
|
||||||
"rate_lau": "Tasa de aluminio",
|
"rate_lau": "",
|
||||||
"rate_ma2s": "Velocidad de pintura de 2 etapas",
|
"rate_ma2s": "Velocidad de pintura de 2 etapas",
|
||||||
"rate_ma3s": "Tasa de pintura de 3 etapas",
|
"rate_ma3s": "Tasa de pintura de 3 etapas",
|
||||||
"rate_mabl": "MABL ??",
|
"rate_mabl": "MABL ??",
|
||||||
@@ -1439,6 +1439,22 @@
|
|||||||
"nocontexttype": ""
|
"nocontexttype": ""
|
||||||
},
|
},
|
||||||
"jobs": {
|
"jobs": {
|
||||||
|
"3rdpartyfields": {
|
||||||
|
"addr1": "",
|
||||||
|
"addr2": "",
|
||||||
|
"addr3": "",
|
||||||
|
"attn": "",
|
||||||
|
"city": "",
|
||||||
|
"custgst": "",
|
||||||
|
"ded_amt": "",
|
||||||
|
"depreciation": "",
|
||||||
|
"other": "",
|
||||||
|
"ponumber": "",
|
||||||
|
"sendtype": "",
|
||||||
|
"state": "",
|
||||||
|
"zip": ""
|
||||||
|
},
|
||||||
|
"3rdpartypayer": "",
|
||||||
"appointment_confirmation": "",
|
"appointment_confirmation": "",
|
||||||
"casl_authorization": "",
|
"casl_authorization": "",
|
||||||
"diagnostic_authorization": "",
|
"diagnostic_authorization": "",
|
||||||
@@ -1450,6 +1466,7 @@
|
|||||||
"payment_receipt": "",
|
"payment_receipt": "",
|
||||||
"payments_by_job": "",
|
"payments_by_job": "",
|
||||||
"ro_with_description": "",
|
"ro_with_description": "",
|
||||||
|
"thirdpartypayer": "",
|
||||||
"window_tag": "",
|
"window_tag": "",
|
||||||
"work_authorization": ""
|
"work_authorization": ""
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1017,7 +1017,7 @@
|
|||||||
"rate_lag": "Taux de verre",
|
"rate_lag": "Taux de verre",
|
||||||
"rate_lam": "Taux mécanique",
|
"rate_lam": "Taux mécanique",
|
||||||
"rate_lar": "Taux de finition",
|
"rate_lar": "Taux de finition",
|
||||||
"rate_las": "Taux de sous-location",
|
"rate_las": "",
|
||||||
"rate_lau": "Taux d'aluminium",
|
"rate_lau": "Taux d'aluminium",
|
||||||
"rate_ma2s": "Taux de peinture en 2 étapes",
|
"rate_ma2s": "Taux de peinture en 2 étapes",
|
||||||
"rate_ma3s": "Taux de peinture en 3 étapes",
|
"rate_ma3s": "Taux de peinture en 3 étapes",
|
||||||
@@ -1439,6 +1439,22 @@
|
|||||||
"nocontexttype": ""
|
"nocontexttype": ""
|
||||||
},
|
},
|
||||||
"jobs": {
|
"jobs": {
|
||||||
|
"3rdpartyfields": {
|
||||||
|
"addr1": "",
|
||||||
|
"addr2": "",
|
||||||
|
"addr3": "",
|
||||||
|
"attn": "",
|
||||||
|
"city": "",
|
||||||
|
"custgst": "",
|
||||||
|
"ded_amt": "",
|
||||||
|
"depreciation": "",
|
||||||
|
"other": "",
|
||||||
|
"ponumber": "",
|
||||||
|
"sendtype": "",
|
||||||
|
"state": "",
|
||||||
|
"zip": ""
|
||||||
|
},
|
||||||
|
"3rdpartypayer": "",
|
||||||
"appointment_confirmation": "",
|
"appointment_confirmation": "",
|
||||||
"casl_authorization": "",
|
"casl_authorization": "",
|
||||||
"diagnostic_authorization": "",
|
"diagnostic_authorization": "",
|
||||||
@@ -1450,6 +1466,7 @@
|
|||||||
"payment_receipt": "",
|
"payment_receipt": "",
|
||||||
"payments_by_job": "",
|
"payments_by_job": "",
|
||||||
"ro_with_description": "",
|
"ro_with_description": "",
|
||||||
|
"thirdpartypayer": "",
|
||||||
"window_tag": "",
|
"window_tag": "",
|
||||||
"work_authorization": ""
|
"work_authorization": ""
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ export const axiosAuthInterceptorId = axios.interceptors.request.use(
|
|||||||
config.headers.Authorization = `Bearer ${token}`;
|
config.headers.Authorization = `Bearer ${token}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log("Axios interceptor called.");
|
|
||||||
return config;
|
return config;
|
||||||
},
|
},
|
||||||
(error) => Promise.reject(error)
|
(error) => Promise.reject(error)
|
||||||
|
|||||||
@@ -44,11 +44,15 @@ export default async function RenderTemplate(
|
|||||||
"There are too many queries to choose from. Please ensure there are no conflicting keys."
|
"There are too many queries to choose from. Please ensure there are no conflicting keys."
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
const { data: contextData } = await client.query({
|
let contextData;
|
||||||
query: gql(templateQueryToExecute),
|
if (templateQueryToExecute) {
|
||||||
variables: { ...templateObject.variables },
|
const { data } = await client.query({
|
||||||
fetchPolicy: "network-only",
|
query: gql(templateQueryToExecute),
|
||||||
});
|
variables: { ...templateObject.variables },
|
||||||
|
fetchPolicy: "network-only",
|
||||||
|
});
|
||||||
|
contextData = data;
|
||||||
|
}
|
||||||
|
|
||||||
let reportRequest = {
|
let reportRequest = {
|
||||||
template: {
|
template: {
|
||||||
@@ -58,8 +62,9 @@ export default async function RenderTemplate(
|
|||||||
...(renderAsHtml ? {} : { recipe: "chrome-pdf" }),
|
...(renderAsHtml ? {} : { recipe: "chrome-pdf" }),
|
||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
...contextData,
|
...(templateQueryToExecute ? contextData : {}),
|
||||||
...templateObject.variables,
|
...templateObject.variables,
|
||||||
|
...templateObject.context,
|
||||||
headerpath: `/${bodyshop.imexshopid}/header.html`,
|
headerpath: `/${bodyshop.imexshopid}/header.html`,
|
||||||
bodyshop: bodyshop,
|
bodyshop: bodyshop,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -77,6 +77,16 @@ export const TemplateList = (type, context) => {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
: {}),
|
: {}),
|
||||||
|
...(!type || type === "job_special"
|
||||||
|
? {
|
||||||
|
thirdpartypayer: {
|
||||||
|
title: i18n.t("printcenter.jobs.thirdpartypayer"),
|
||||||
|
description: "CSI invite",
|
||||||
|
key: "special/thirdpartypayer",
|
||||||
|
disabled: false,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
: {}),
|
||||||
...(!type || type === "appointment"
|
...(!type || type === "appointment"
|
||||||
? {
|
? {
|
||||||
appointment_confirmation: {
|
appointment_confirmation: {
|
||||||
|
|||||||
Reference in New Issue
Block a user