IO-653 IO-654 Add SGI documents & regions filtering on print center.
This commit is contained in:
@@ -32596,6 +32596,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>csi_invitation_action</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>diagnostic_authorization</name>
|
<name>diagnostic_authorization</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -33226,6 +33247,48 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>sgi_certificate_of_repairs</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>sgi_windshield_auth</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>stolen_recovery_checklist</name>
|
<name>stolen_recovery_checklist</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
|
|||||||
@@ -1,28 +1,35 @@
|
|||||||
import { Card, Col, Input, Row, Space, Typography } from "antd";
|
import { Card, Col, Input, Row, Space, Typography } from "antd";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
import { connect } from "react-redux";
|
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 { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
import { TemplateList } from "../../utils/TemplateConstants";
|
import { TemplateList } from "../../utils/TemplateConstants";
|
||||||
import Jobd3RdPartyModal from "../job-3rd-party-modal/job-3rd-party-modal.component";
|
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";
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
printCenterModal: selectPrintCenter,
|
printCenterModal: selectPrintCenter,
|
||||||
|
bodyshop: selectBodyshop,
|
||||||
});
|
});
|
||||||
|
|
||||||
const mapDispatchToProps = (dispatch) => ({});
|
const mapDispatchToProps = (dispatch) => ({});
|
||||||
|
|
||||||
export function PrintCenterJobsComponent({ printCenterModal }) {
|
export function PrintCenterJobsComponent({ printCenterModal, bodyshop }) {
|
||||||
const [search, setSearch] = useState("");
|
const [search, setSearch] = useState("");
|
||||||
const { id: jobId } = printCenterModal.context;
|
const { id: jobId } = printCenterModal.context;
|
||||||
const tempList = TemplateList("job", {});
|
const tempList = TemplateList("job", {});
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const JobsReportsList = Object.keys(tempList).map((key) => {
|
const JobsReportsList = Object.keys(tempList)
|
||||||
return tempList[key];
|
.map((key) => {
|
||||||
});
|
return tempList[key];
|
||||||
|
})
|
||||||
|
.filter(
|
||||||
|
(temp) =>
|
||||||
|
!temp.regions || (temp.regions && temp.regions[bodyshop.region_config])
|
||||||
|
);
|
||||||
|
|
||||||
const filteredJobsReportsList =
|
const filteredJobsReportsList =
|
||||||
search !== ""
|
search !== ""
|
||||||
|
|||||||
@@ -1953,6 +1953,7 @@
|
|||||||
"coversheet_landscape": "Coversheet (Landscape)",
|
"coversheet_landscape": "Coversheet (Landscape)",
|
||||||
"coversheet_portrait": "Coversheet Portrait",
|
"coversheet_portrait": "Coversheet Portrait",
|
||||||
"csi_invitation": "CSI Invitation",
|
"csi_invitation": "CSI Invitation",
|
||||||
|
"csi_invitation_action": "CSI Invite",
|
||||||
"diagnostic_authorization": "Diagnostic Authorization",
|
"diagnostic_authorization": "Diagnostic Authorization",
|
||||||
"estimate": "Estimate Only",
|
"estimate": "Estimate Only",
|
||||||
"estimate_detail": "Estimate Details",
|
"estimate_detail": "Estimate Details",
|
||||||
@@ -1983,6 +1984,8 @@
|
|||||||
"qc_sheet": "Quality Control Sheet",
|
"qc_sheet": "Quality Control Sheet",
|
||||||
"ro_totals": "RO Totals",
|
"ro_totals": "RO Totals",
|
||||||
"ro_with_description": "RO Summary with Descriptions",
|
"ro_with_description": "RO Summary with Descriptions",
|
||||||
|
"sgi_certificate_of_repairs": "SGI - Certificate of Repairs",
|
||||||
|
"sgi_windshield_auth": "SGI - Windshield Authorization",
|
||||||
"stolen_recovery_checklist": "Stolen Recovery Checklist",
|
"stolen_recovery_checklist": "Stolen Recovery Checklist",
|
||||||
"supplement_request": "Supplement Request",
|
"supplement_request": "Supplement Request",
|
||||||
"thank_you_ro": "Thank You Letter",
|
"thank_you_ro": "Thank You Letter",
|
||||||
|
|||||||
@@ -1953,6 +1953,7 @@
|
|||||||
"coversheet_landscape": "",
|
"coversheet_landscape": "",
|
||||||
"coversheet_portrait": "",
|
"coversheet_portrait": "",
|
||||||
"csi_invitation": "",
|
"csi_invitation": "",
|
||||||
|
"csi_invitation_action": "",
|
||||||
"diagnostic_authorization": "",
|
"diagnostic_authorization": "",
|
||||||
"estimate": "",
|
"estimate": "",
|
||||||
"estimate_detail": "",
|
"estimate_detail": "",
|
||||||
@@ -1983,6 +1984,8 @@
|
|||||||
"qc_sheet": "",
|
"qc_sheet": "",
|
||||||
"ro_totals": "",
|
"ro_totals": "",
|
||||||
"ro_with_description": "",
|
"ro_with_description": "",
|
||||||
|
"sgi_certificate_of_repairs": "",
|
||||||
|
"sgi_windshield_auth": "",
|
||||||
"stolen_recovery_checklist": "",
|
"stolen_recovery_checklist": "",
|
||||||
"supplement_request": "",
|
"supplement_request": "",
|
||||||
"thank_you_ro": "",
|
"thank_you_ro": "",
|
||||||
|
|||||||
@@ -1953,6 +1953,7 @@
|
|||||||
"coversheet_landscape": "",
|
"coversheet_landscape": "",
|
||||||
"coversheet_portrait": "",
|
"coversheet_portrait": "",
|
||||||
"csi_invitation": "",
|
"csi_invitation": "",
|
||||||
|
"csi_invitation_action": "",
|
||||||
"diagnostic_authorization": "",
|
"diagnostic_authorization": "",
|
||||||
"estimate": "",
|
"estimate": "",
|
||||||
"estimate_detail": "",
|
"estimate_detail": "",
|
||||||
@@ -1983,6 +1984,8 @@
|
|||||||
"qc_sheet": "",
|
"qc_sheet": "",
|
||||||
"ro_totals": "",
|
"ro_totals": "",
|
||||||
"ro_with_description": "",
|
"ro_with_description": "",
|
||||||
|
"sgi_certificate_of_repairs": "",
|
||||||
|
"sgi_windshield_auth": "",
|
||||||
"stolen_recovery_checklist": "",
|
"stolen_recovery_checklist": "",
|
||||||
"supplement_request": "",
|
"supplement_request": "",
|
||||||
"thank_you_ro": "",
|
"thank_you_ro": "",
|
||||||
|
|||||||
@@ -352,6 +352,28 @@ export const TemplateList = (type, context) => {
|
|||||||
disabled: false,
|
disabled: false,
|
||||||
group: "ro",
|
group: "ro",
|
||||||
},
|
},
|
||||||
|
sgi_certificate_of_repairs: {
|
||||||
|
title: i18n.t("printcenter.jobs.sgi_certificate_of_repairs"),
|
||||||
|
description: "Thank You Letter by RO",
|
||||||
|
key: "sgi_certificate_of_repairs",
|
||||||
|
subject: i18n.t("printcenter.jobs.sgi_certificate_of_repairs"),
|
||||||
|
disabled: false,
|
||||||
|
group: "ro",
|
||||||
|
regions: {
|
||||||
|
CA_SK: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
sgi_windshield_auth: {
|
||||||
|
title: i18n.t("printcenter.jobs.sgi_windshield_auth"),
|
||||||
|
description: "Thank You Letter by RO",
|
||||||
|
key: "sgi_windshield_auth",
|
||||||
|
subject: i18n.t("printcenter.jobs.sgi_windshield_auth"),
|
||||||
|
disabled: false,
|
||||||
|
group: "pre",
|
||||||
|
regions: {
|
||||||
|
CA_SK: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
// parts_label_multi: {
|
// parts_label_multi: {
|
||||||
// title: i18n.t("printcenter.jobs.parts_label_multi"),
|
// title: i18n.t("printcenter.jobs.parts_label_multi"),
|
||||||
// description: "Thank You Letter by RO",
|
// description: "Thank You Letter by RO",
|
||||||
|
|||||||
Reference in New Issue
Block a user