IO-2206 Filter Enhanced and Non-Enhanced Payroll Reports
This commit is contained in:
@@ -59,15 +59,24 @@ export function PrintCenterJobsComponent({ printCenterModal, bodyshop }) {
|
||||
);
|
||||
const JobsReportsList =
|
||||
Enhanced_Payroll.treatment === "on"
|
||||
? Object.keys(Templates).map((key) => {
|
||||
return Templates[key];
|
||||
})
|
||||
? Object.keys(Templates)
|
||||
.map((key) => {
|
||||
return Templates[key];
|
||||
})
|
||||
.filter(
|
||||
(temp) =>
|
||||
temp.enhanced_payroll === undefined ||
|
||||
temp.enhanced_payroll === true
|
||||
)
|
||||
: Object.keys(Templates)
|
||||
.map((key) => {
|
||||
return Templates[key];
|
||||
})
|
||||
.filter((temp) => temp.enhanced_payroll !== true);
|
||||
|
||||
.filter(
|
||||
(temp) =>
|
||||
temp.enhanced_payroll === undefined ||
|
||||
temp.enhanced_payroll === false
|
||||
);
|
||||
const filteredJobsReportsList =
|
||||
search !== ""
|
||||
? JobsReportsList.filter((r) =>
|
||||
|
||||
@@ -53,12 +53,24 @@ export function ReportCenterModalComponent({ reportCenterModal, bodyshop }) {
|
||||
const Templates = TemplateList("report_center");
|
||||
const ReportsList =
|
||||
Enhanced_Payroll.treatment === "on"
|
||||
? Object.keys(Templates).map((key) => {
|
||||
return Templates[key];
|
||||
})
|
||||
: Object.keys(Templates).map((key) => {
|
||||
return Templates[key];
|
||||
}).filter((temp) => temp.enhanced_payroll !== true);
|
||||
? Object.keys(Templates)
|
||||
.map((key) => {
|
||||
return Templates[key];
|
||||
})
|
||||
.filter(
|
||||
(temp) =>
|
||||
temp.enhanced_payroll === undefined ||
|
||||
temp.enhanced_payroll === true
|
||||
)
|
||||
: Object.keys(Templates)
|
||||
.map((key) => {
|
||||
return Templates[key];
|
||||
})
|
||||
.filter(
|
||||
(temp) =>
|
||||
temp.enhanced_payroll === undefined ||
|
||||
temp.enhanced_payroll === false
|
||||
);
|
||||
const { visible } = reportCenterModal;
|
||||
|
||||
const [callVendorQuery, { data: vendorData, called: vendorCalled }] =
|
||||
|
||||
@@ -2374,6 +2374,7 @@
|
||||
"mpi_final_acct_sheet": "MPI - Final Accounting Sheet (Direct Repair)",
|
||||
"mpi_final_repair_acct_sheet": "MPI - Final Accounting Sheet",
|
||||
"paint_grid": "Paint Grid",
|
||||
"parts_dispatch": "Parts Dispatch",
|
||||
"parts_invoice_label_single": "Parts Label Single",
|
||||
"parts_label_multiple": "Parts Label - Multi",
|
||||
"parts_label_single": "Parts Label - Single",
|
||||
@@ -2436,6 +2437,7 @@
|
||||
"subjects": {
|
||||
"jobs": {
|
||||
"individual_job_note": "Job Note RO: {{ro_number}}",
|
||||
"parts_dispatch": "Parts Dispatch RO: {{ro_number}}",
|
||||
"parts_order": "Parts Order PO: {{ro_number}} - {{name}}",
|
||||
"parts_return_slip": "Parts Return PO: {{ro_number}} - {{name}}",
|
||||
"sublet_order": "Sublet Order PO: {{ro_number}} - {{name}}"
|
||||
|
||||
@@ -2374,6 +2374,7 @@
|
||||
"mpi_final_acct_sheet": "",
|
||||
"mpi_final_repair_acct_sheet": "",
|
||||
"paint_grid": "",
|
||||
"parts_dispatch": "",
|
||||
"parts_invoice_label_single": "",
|
||||
"parts_label_multiple": "",
|
||||
"parts_label_single": "",
|
||||
@@ -2436,6 +2437,7 @@
|
||||
"subjects": {
|
||||
"jobs": {
|
||||
"individual_job_note": "",
|
||||
"parts_dispatch": "",
|
||||
"parts_order": "",
|
||||
"parts_return_slip": "",
|
||||
"sublet_order": ""
|
||||
|
||||
@@ -2374,6 +2374,7 @@
|
||||
"mpi_final_acct_sheet": "",
|
||||
"mpi_final_repair_acct_sheet": "",
|
||||
"paint_grid": "",
|
||||
"parts_dispatch": "",
|
||||
"parts_invoice_label_single": "",
|
||||
"parts_label_multiple": "",
|
||||
"parts_label_single": "",
|
||||
@@ -2436,6 +2437,7 @@
|
||||
"subjects": {
|
||||
"jobs": {
|
||||
"individual_job_note": "",
|
||||
"parts_dispatch": "",
|
||||
"parts_order": "",
|
||||
"parts_return_slip": "",
|
||||
"sublet_order": ""
|
||||
|
||||
@@ -189,6 +189,16 @@ export const TemplateList = (type, context) => {
|
||||
key: "worksheet_by_line_number",
|
||||
disabled: false,
|
||||
group: "worksheet",
|
||||
enhanced_payroll: false,
|
||||
},
|
||||
worksheet_by_line_number_enhanced: {
|
||||
title: i18n.t("printcenter.jobs.worksheet_by_line_number"),
|
||||
description: "",
|
||||
subject: i18n.t("printcenter.jobs.worksheet_by_line_number"),
|
||||
key: "worksheet_by_line_number_enhanced",
|
||||
disabled: false,
|
||||
group: "worksheet",
|
||||
enhanced_payroll: true,
|
||||
},
|
||||
worksheet_sorted_by_operation_type: {
|
||||
title: i18n.t(
|
||||
@@ -201,6 +211,20 @@ export const TemplateList = (type, context) => {
|
||||
key: "worksheet_sorted_by_operation_type",
|
||||
disabled: false,
|
||||
group: "worksheet",
|
||||
enhanced_payroll: false,
|
||||
},
|
||||
worksheet_sorted_by_operation_type_enhanced: {
|
||||
title: i18n.t(
|
||||
"printcenter.jobs.worksheet_sorted_by_operation_type"
|
||||
),
|
||||
description: "",
|
||||
subject: i18n.t(
|
||||
"printcenter.jobs.worksheet_sorted_by_operation_type"
|
||||
),
|
||||
key: "worksheet_sorted_by_operation_type_enhanced",
|
||||
disabled: false,
|
||||
group: "worksheet",
|
||||
enhanced_payroll: true,
|
||||
},
|
||||
worksheet_sorted_by_operation: {
|
||||
title: i18n.t("printcenter.jobs.worksheet_sorted_by_operation"),
|
||||
@@ -209,6 +233,16 @@ export const TemplateList = (type, context) => {
|
||||
key: "worksheet_sorted_by_operation",
|
||||
disabled: false,
|
||||
group: "worksheet",
|
||||
enhanced_payroll: false,
|
||||
},
|
||||
worksheet_sorted_by_operation_enhanced: {
|
||||
title: i18n.t("printcenter.jobs.worksheet_sorted_by_operation"),
|
||||
description: "",
|
||||
subject: i18n.t("printcenter.jobs.worksheet_sorted_by_operation"),
|
||||
key: "worksheet_sorted_by_operation_enhanced",
|
||||
disabled: false,
|
||||
group: "worksheet",
|
||||
enhanced_payroll: true,
|
||||
},
|
||||
worksheet_sorted_by_operation_no_hours: {
|
||||
title: i18n.t(
|
||||
@@ -221,6 +255,20 @@ export const TemplateList = (type, context) => {
|
||||
key: "worksheet_sorted_by_operation_no_hours",
|
||||
disabled: false,
|
||||
group: "worksheet",
|
||||
enhanced_payroll: false,
|
||||
},
|
||||
worksheet_sorted_by_operation_no_hours_enhanced: {
|
||||
title: i18n.t(
|
||||
"printcenter.jobs.worksheet_sorted_by_operation_no_hours"
|
||||
),
|
||||
description: "",
|
||||
subject: i18n.t(
|
||||
"printcenter.jobs.worksheet_sorted_by_operation_no_hours"
|
||||
),
|
||||
key: "worksheet_sorted_by_operation_no_hours_enhanced",
|
||||
disabled: false,
|
||||
group: "worksheet",
|
||||
enhanced_payroll: true,
|
||||
},
|
||||
worksheet_sorted_by_operation_part_type: {
|
||||
title: i18n.t(
|
||||
@@ -233,6 +281,20 @@ export const TemplateList = (type, context) => {
|
||||
key: "worksheet_sorted_by_operation_part_type",
|
||||
disabled: false,
|
||||
group: "worksheet",
|
||||
enhanced_payroll: false,
|
||||
},
|
||||
worksheet_sorted_by_operation_part_type_enhanced: {
|
||||
title: i18n.t(
|
||||
"printcenter.jobs.worksheet_sorted_by_operation_part_type"
|
||||
),
|
||||
description: "",
|
||||
subject: i18n.t(
|
||||
"printcenter.jobs.worksheet_sorted_by_operation_part_type"
|
||||
),
|
||||
key: "worksheet_sorted_by_operation_part_type_enhanced",
|
||||
disabled: false,
|
||||
group: "worksheet",
|
||||
enhanced_payroll: true,
|
||||
},
|
||||
payments_by_job: {
|
||||
title: i18n.t("printcenter.jobs.payments_by_job"),
|
||||
@@ -526,7 +588,7 @@ export const TemplateList = (type, context) => {
|
||||
committed_timetickets_ro: {
|
||||
title: i18n.t("printcenter.jobs.committed_timetickets_ro"),
|
||||
description: "",
|
||||
subject: i18n.t("printcenter.jobs.commited_timetickets_ro"),
|
||||
subject: i18n.t("printcenter.jobs.committed_timetickets_ro"),
|
||||
key: "committed_timetickets_ro",
|
||||
disabled: false,
|
||||
group: "financial",
|
||||
@@ -1162,6 +1224,10 @@ export const TemplateList = (type, context) => {
|
||||
key: "timetickets_employee",
|
||||
idtype: "employee",
|
||||
disabled: false,
|
||||
rangeFilter: {
|
||||
object: i18n.t("reportcenter.labels.objects.timetickets"),
|
||||
field: i18n.t("timetickets.fields.date"),
|
||||
},
|
||||
group: "payroll",
|
||||
},
|
||||
attendance_detail: {
|
||||
@@ -1588,9 +1654,13 @@ export const TemplateList = (type, context) => {
|
||||
group: "jobs",
|
||||
},
|
||||
work_in_progress_committed_labour: {
|
||||
title: i18n.t("reportcenter.templates.work_in_progress_committed_labour"),
|
||||
title: i18n.t(
|
||||
"reportcenter.templates.work_in_progress_committed_labour"
|
||||
),
|
||||
description: "",
|
||||
subject: i18n.t("reportcenter.templates.work_in_progress_committed_labour"),
|
||||
subject: i18n.t(
|
||||
"reportcenter.templates.work_in_progress_committed_labour"
|
||||
),
|
||||
key: "work_in_progress_committed_labour",
|
||||
//idtype: "vendor",
|
||||
disabled: false,
|
||||
@@ -1970,17 +2040,29 @@ export const TemplateList = (type, context) => {
|
||||
enhanced_payroll: true,
|
||||
},
|
||||
committed_timetickets_employee: {
|
||||
title: i18n.t("reportcenter.templates.committed_timetickets_employee"),
|
||||
subject: i18n.t("reportcenter.templates.committed_timetickets_employee"),
|
||||
title: i18n.t(
|
||||
"reportcenter.templates.committed_timetickets_employee"
|
||||
),
|
||||
subject: i18n.t(
|
||||
"reportcenter.templates.committed_timetickets_employee"
|
||||
),
|
||||
key: "committed_timetickets_employee",
|
||||
idtype: "employee",
|
||||
disabled: false,
|
||||
rangeFilter: {
|
||||
object: i18n.t("reportcenter.labels.objects.timetickets"),
|
||||
field: i18n.t("timetickets.fields.committed_at"),
|
||||
},
|
||||
group: "payroll",
|
||||
enhanced_payroll: true,
|
||||
},
|
||||
committed_timetickets_summary: {
|
||||
title: i18n.t("reportcenter.templates.committed_timetickets_summary"),
|
||||
subject: i18n.t("reportcenter.templates.committed_timetickets_summary"),
|
||||
title: i18n.t(
|
||||
"reportcenter.templates.committed_timetickets_summary"
|
||||
),
|
||||
subject: i18n.t(
|
||||
"reportcenter.templates.committed_timetickets_summary"
|
||||
),
|
||||
key: "committed_timetickets_summary",
|
||||
//idtype: "vendor",
|
||||
disabled: false,
|
||||
|
||||
Reference in New Issue
Block a user