IO-2315 DMS Posting Sheet

Restrict to DMS setups only
This commit is contained in:
Allan Carr
2023-06-01 20:32:30 -07:00
parent de62e994bd
commit cbf5d268ea
2 changed files with 29 additions and 11 deletions

View File

@@ -23,7 +23,23 @@ export function PrintCenterJobsComponent({ printCenterModal, bodyshop }) {
const { id: jobId, job } = printCenterModal.context; const { id: jobId, job } = printCenterModal.context;
const tempList = TemplateList("job", {}); const tempList = TemplateList("job", {});
const { t } = useTranslation(); const { t } = useTranslation();
const JobsReportsList = Object.keys(tempList)
const JobsReportsList =
bodyshop.cdk_dealerid === null && bodyshop.pbs_serialnumber === null
? Object.keys(tempList)
.map((key) => {
return tempList[key];
})
.filter(
(temp) =>
(!temp.regions ||
(temp.regions && temp.regions[bodyshop.region_config]) ||
(temp.regions &&
bodyshop.region_config.includes(Object.keys(temp.regions)) ===
true)) &&
(!temp.dms || temp.dms === false)
)
: Object.keys(tempList)
.map((key) => { .map((key) => {
return tempList[key]; return tempList[key];
}) })
@@ -32,7 +48,8 @@ export function PrintCenterJobsComponent({ printCenterModal, bodyshop }) {
!temp.regions || !temp.regions ||
(temp.regions && temp.regions[bodyshop.region_config]) || (temp.regions && temp.regions[bodyshop.region_config]) ||
(temp.regions && (temp.regions &&
bodyshop.region_config.includes(Object.keys(temp.regions)) === true) bodyshop.region_config.includes(Object.keys(temp.regions)) ===
true)
); );
const filteredJobsReportsList = const filteredJobsReportsList =

View File

@@ -512,6 +512,7 @@ export const TemplateList = (type, context) => {
key: "dms_posting_sheet", key: "dms_posting_sheet",
disabled: false, disabled: false,
group: "financial", group: "financial",
dms: true,
}, },
} }
: {}), : {}),