diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index e4549e29b..73624e110 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -32596,6 +32596,27 @@ + + csi_invitation_action + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + diagnostic_authorization false @@ -33226,6 +33247,48 @@ + + sgi_certificate_of_repairs + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + sgi_windshield_auth + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + stolen_recovery_checklist false diff --git a/client/src/components/print-center-jobs/print-center-jobs.component.jsx b/client/src/components/print-center-jobs/print-center-jobs.component.jsx index bf641ae74..7773a89df 100644 --- a/client/src/components/print-center-jobs/print-center-jobs.component.jsx +++ b/client/src/components/print-center-jobs/print-center-jobs.component.jsx @@ -1,28 +1,35 @@ import { Card, Col, Input, Row, Space, Typography } from "antd"; import _ from "lodash"; import React, { useState } from "react"; +import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; import { selectPrintCenter } from "../../redux/modals/modals.selectors"; +import { selectBodyshop } from "../../redux/user/user.selectors"; 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 PrintCenterSpeedPrint from "../print-center-speed-print/print-center-speed-print.component"; -import { useTranslation } from "react-i18next"; const mapStateToProps = createStructuredSelector({ printCenterModal: selectPrintCenter, + bodyshop: selectBodyshop, }); const mapDispatchToProps = (dispatch) => ({}); -export function PrintCenterJobsComponent({ printCenterModal }) { +export function PrintCenterJobsComponent({ printCenterModal, bodyshop }) { const [search, setSearch] = useState(""); const { id: jobId } = printCenterModal.context; const tempList = TemplateList("job", {}); const { t } = useTranslation(); - const JobsReportsList = Object.keys(tempList).map((key) => { - return tempList[key]; - }); + const JobsReportsList = Object.keys(tempList) + .map((key) => { + return tempList[key]; + }) + .filter( + (temp) => + !temp.regions || (temp.regions && temp.regions[bodyshop.region_config]) + ); const filteredJobsReportsList = search !== "" diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json index c2775a5b3..533efd873 100644 --- a/client/src/translations/en_us/common.json +++ b/client/src/translations/en_us/common.json @@ -1953,6 +1953,7 @@ "coversheet_landscape": "Coversheet (Landscape)", "coversheet_portrait": "Coversheet Portrait", "csi_invitation": "CSI Invitation", + "csi_invitation_action": "CSI Invite", "diagnostic_authorization": "Diagnostic Authorization", "estimate": "Estimate Only", "estimate_detail": "Estimate Details", @@ -1983,6 +1984,8 @@ "qc_sheet": "Quality Control Sheet", "ro_totals": "RO Totals", "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", "supplement_request": "Supplement Request", "thank_you_ro": "Thank You Letter", diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json index 3c258ddb2..69c67002b 100644 --- a/client/src/translations/es/common.json +++ b/client/src/translations/es/common.json @@ -1953,6 +1953,7 @@ "coversheet_landscape": "", "coversheet_portrait": "", "csi_invitation": "", + "csi_invitation_action": "", "diagnostic_authorization": "", "estimate": "", "estimate_detail": "", @@ -1983,6 +1984,8 @@ "qc_sheet": "", "ro_totals": "", "ro_with_description": "", + "sgi_certificate_of_repairs": "", + "sgi_windshield_auth": "", "stolen_recovery_checklist": "", "supplement_request": "", "thank_you_ro": "", diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json index 272c43393..6f31d9b24 100644 --- a/client/src/translations/fr/common.json +++ b/client/src/translations/fr/common.json @@ -1953,6 +1953,7 @@ "coversheet_landscape": "", "coversheet_portrait": "", "csi_invitation": "", + "csi_invitation_action": "", "diagnostic_authorization": "", "estimate": "", "estimate_detail": "", @@ -1983,6 +1984,8 @@ "qc_sheet": "", "ro_totals": "", "ro_with_description": "", + "sgi_certificate_of_repairs": "", + "sgi_windshield_auth": "", "stolen_recovery_checklist": "", "supplement_request": "", "thank_you_ro": "", diff --git a/client/src/utils/TemplateConstants.js b/client/src/utils/TemplateConstants.js index 72edb6ac4..941941f28 100644 --- a/client/src/utils/TemplateConstants.js +++ b/client/src/utils/TemplateConstants.js @@ -352,6 +352,28 @@ export const TemplateList = (type, context) => { disabled: false, 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: { // title: i18n.t("printcenter.jobs.parts_label_multi"), // description: "Thank You Letter by RO",