{
- GenerateDocument(
- {
- name: TemplateList().timetickets_employee.key,
- variables: { id: empId, start: startDate, end: endDate },
- },
- {},
- "p"
- );
- };
-
return (
-
-
- {t("timetickets.labels.jobhours")}
-
- }
- itemLayout="horizontal"
- //dataSource={jobTickets}
- >
- {jobTickets.map((item, idx) => {
- const employeeCostCenters = item.tickets
- .map((i) => i.cost_center)
- .filter(onlyUnique);
-
- return employeeCostCenters.map((costCenter) => {
- const actHrs = item.tickets
- .filter((ticket) => ticket.cost_center === costCenter)
- .reduce((acc, val) => acc + val.actualhrs, 0);
-
- const prodHrs = item.tickets
- .filter((ticket) => ticket.cost_center === costCenter)
- .reduce((acc, val) => acc + val.productivehrs, 0);
-
- const clockHrs = item.tickets
- .filter((ticket) => ticket.cost_center === costCenter)
- .reduce((acc, val) => {
- if (!!val.clockoff && !!val.clockon)
- return (
- acc +
- moment(val.clockoff).diff(
- moment(val.clockon),
- "hours",
- true
- )
- );
- return acc;
- }, 0);
-
- return (
- handlePrintEmployeeTicket(item.employee.id)}
- >
- {t("timetickets.actions.printemployee")}
- ,
- ]}
- >
-
-
-
-
-
-
-
-
-
-
- );
- });
- })}
-
-
- {t("timetickets.labels.clockhours")}
-
- }
- itemLayout="horizontal"
- dataSource={shiftTickets}
- renderItem={(item) => {
- const clockHrs = item.tickets.reduce((acc, val) => {
- if (!!val.clockoff && !!val.clockon)
- return (
- acc +
- moment(val.clockoff).diff(moment(val.clockon), "hours", true)
- );
- return acc;
- }, 0);
-
- return (
- handlePrintEmployeeTicket(item.employee.id)}
- >
- {t("timetickets.actions.printemployee")}
- ,
- ]}
- >
-
-
-
-
-
- );
- }}
- />
-
+
+
+
+
+
+
+
+
);
}
export default connect(
mapStateToProps,
mapDispatchToProps
)(TimeTicketsSummaryEmployees);
+
+const JobRelatedTicketsTable = ({
+ loading,
+ jobTickets,
+ startDate,
+ endDate,
+}) => {
+ const Templates = TemplateList();
+ const { t } = useTranslation();
+ const [state, setState] = useState({
+ sortedInfo: {},
+ });
+ const data = useMemo(() => {
+ return _.flatten(
+ jobTickets.map((item, idx) => {
+ const employeeCostCenters = item.tickets
+ .map((i) => i.cost_center)
+ .filter(onlyUnique);
+
+ return employeeCostCenters.map((costCenter) => {
+ const actHrs = item.tickets
+ .filter((ticket) => ticket.cost_center === costCenter)
+ .reduce((acc, val) => acc + val.actualhrs, 0);
+
+ const prodHrs = item.tickets
+ .filter((ticket) => ticket.cost_center === costCenter)
+ .reduce((acc, val) => acc + val.productivehrs, 0);
+
+ const clockHrs = item.tickets
+ .filter((ticket) => ticket.cost_center === costCenter)
+ .reduce((acc, val) => {
+ if (!!val.clockoff && !!val.clockon)
+ return (
+ acc +
+ moment(val.clockoff).diff(moment(val.clockon), "hours", true)
+ );
+ return acc;
+ }, 0);
+
+ return {
+ id: `${item.jobKey}${costCenter}`,
+ item,
+ actHrs,
+ prodHrs,
+ clockHrs,
+ };
+ });
+ })
+ );
+ }, [jobTickets]);
+
+ const columns = [
+ {
+ title: t("bills.fields.vendorname"),
+ dataIndex: "empname",
+ key: "empname",
+ sorter: (a, b) => alphaSort(a.empname, b.empname),
+ sortOrder:
+ state.sortedInfo.columnKey === "empname" && state.sortedInfo.order,
+ render: (text, record) =>
+ `${record.item.employee.first_name} ${record.item.employee.last_name}`,
+ },
+ {
+ title: t("timetickets.fields.actualhrs"),
+ dataIndex: "actHrs",
+ key: "actHrs",
+ sorter: (a, b) => a.actHrs - b.actHrs,
+ sortOrder:
+ state.sortedInfo.columnKey === "actHrs" && state.sortedInfo.order,
+ },
+ {
+ title: t("timetickets.fields.productivehrs"),
+ dataIndex: "prodHrs",
+ key: "prodHrs",
+ sorter: (a, b) => a.prodHrs - b.prodHrs,
+ sortOrder:
+ state.sortedInfo.columnKey === "prodHrs" && state.sortedInfo.order,
+ },
+ {
+ title: t("timetickets.fields.efficiency"),
+ dataIndex: "total",
+ key: "total",
+ sorter: (a, b) => a.total - b.total,
+ sortOrder:
+ state.sortedInfo.columnKey === "total" && state.sortedInfo.order,
+ render: (text, record) =>
+ record.actHrs === 0 || !record.actHrs
+ ? "∞"
+ : (record.prodHrs / record.actHrs) * 100,
+ },
+ {
+ title: t("timetickets.fields.clockhours"),
+ dataIndex: "clockHrs",
+ key: "clockHrs",
+ sorter: (a, b) => a.clockHrs - b.clockHrs,
+ sortOrder:
+ state.sortedInfo.columnKey === "clockHrs" && state.sortedInfo.order,
+ render: (text, record) => record.clockHrs.toFixed(2),
+ },
+ {
+ title: t("general.labels.actions"),
+ dataIndex: "actions",
+ key: "actions",
+ render: (text, record) => (
+
+ ),
+ },
+ ];
+
+ const handleTableChange = (pagination, filters, sorter) => {
+ setState({ ...state, filteredInfo: filters, sortedInfo: sorter });
+ };
+
+ return (
+
+
+
+ );
+};
+
+const ShiftRelatedTicketsTable = ({
+ loading,
+ shiftTickets,
+ startDate,
+ endDate,
+}) => {
+ const Templates = TemplateList();
+ const { t } = useTranslation();
+ const [state, setState] = useState({
+ sortedInfo: {},
+ });
+ const data = useMemo(() => {
+ return shiftTickets.map((item) => {
+ const clockHrs = item.tickets.reduce((acc, val) => {
+ if (!!val.clockoff && !!val.clockon)
+ return (
+ acc + moment(val.clockoff).diff(moment(val.clockon), "hours", true)
+ );
+ return acc;
+ }, 0);
+
+ return { id: item.employee.id, item, clockHrs };
+ });
+ }, [shiftTickets]);
+
+ const columns = [
+ {
+ title: t("bills.fields.vendorname"),
+ dataIndex: "empname",
+ key: "empname",
+ sorter: (a, b) => alphaSort(a.empname, b.empname),
+ sortOrder:
+ state.sortedInfo.columnKey === "empname" && state.sortedInfo.order,
+ render: (text, record) =>
+ `${record.item.employee.first_name} ${record.item.employee.last_name}`,
+ },
+
+ {
+ title: t("timetickets.fields.clockhours"),
+ dataIndex: "clockHrs",
+ key: "clockHrs",
+ sorter: (a, b) => a.clockHrs - b.clockHrs,
+ sortOrder:
+ state.sortedInfo.columnKey === "clockHrs" && state.sortedInfo.order,
+ render: (text, record) => record.clockHrs.toFixed(2),
+ },
+ {
+ title: t("general.labels.actions"),
+ dataIndex: "actions",
+ key: "actions",
+ render: (text, record) => (
+
+ ),
+ },
+ ];
+
+ const handleTableChange = (pagination, filters, sorter) => {
+ setState({ ...state, filteredInfo: filters, sortedInfo: sorter });
+ };
+
+ return (
+
+
+
+ );
+};
diff --git a/client/src/components/time-tickets-summary/time-tickets-summary.component.jsx b/client/src/components/time-tickets-summary/time-tickets-summary.component.jsx
deleted file mode 100644
index 766df4c39..000000000
--- a/client/src/components/time-tickets-summary/time-tickets-summary.component.jsx
+++ /dev/null
@@ -1,20 +0,0 @@
-import React from "react";
-import TimeTicketsSummaryEmployees from "../time-tickets-summary-employees/time-tickets-summary-employees.component";
-
-export default function TimeTicketsSummary({
- loading,
- timetickets,
- startDate,
- endDate,
-}) {
- return (
-
-
-
- );
-}
diff --git a/client/src/pages/payments-all/payments-all.container.page.jsx b/client/src/pages/payments-all/payments-all.container.page.jsx
index fc4a41343..e71833d3b 100644
--- a/client/src/pages/payments-all/payments-all.container.page.jsx
+++ b/client/src/pages/payments-all/payments-all.container.page.jsx
@@ -60,15 +60,13 @@ export function AllJobs({ bodyshop, setBreadcrumbs, setSelectedHeader }) {
if (error) return ;
return (
-
+
);
}
diff --git a/client/src/pages/time-tickets/time-tickets.container.jsx b/client/src/pages/time-tickets/time-tickets.container.jsx
index 19b7c0f7c..9c12460e4 100644
--- a/client/src/pages/time-tickets/time-tickets.container.jsx
+++ b/client/src/pages/time-tickets/time-tickets.container.jsx
@@ -1,4 +1,5 @@
import { useQuery } from "@apollo/client";
+import { Col, Row } from "antd";
import moment from "moment";
import queryString from "query-string";
import React, { useEffect } from "react";
@@ -10,7 +11,7 @@ import AlertComponent from "../../components/alert/alert.component";
import RbacWrapper from "../../components/rbac-wrapper/rbac-wrapper.component";
import TimeTicketsDatesSelector from "../../components/ticket-tickets-dates-selector/time-tickets-dates-selector.component";
import TimeTicketList from "../../components/time-ticket-list/time-ticket-list.component";
-import TimeTicketsSummary from "../../components/time-tickets-summary/time-tickets-summary.component";
+import TimeTicketsSummaryEmployees from "../../components/time-tickets-summary-employees/time-tickets-summary-employees.component";
import { QUERY_TIME_TICKETS_IN_RANGE } from "../../graphql/timetickets.queries";
import {
setBreadcrumbs,
@@ -60,20 +61,23 @@ export function TimeTicketsContainer({
return (
-
-
-
-
-
-
+
+
+ }
+ />
+
+
+
+
+
);
}
diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json
index 1168f070f..31f75e069 100644
--- a/client/src/translations/en_us/common.json
+++ b/client/src/translations/en_us/common.json
@@ -671,7 +671,8 @@
"notsent": "Email not sent. Error encountered while sending {{message}}"
},
"labels": {
- "attachments": "Attachments"
+ "attachments": "Attachments",
+ "preview": "Email Preview"
},
"successes": {
"sent": "Email sent successfully."
@@ -999,12 +1000,12 @@
"employee_body": "Body",
"employee_prep": "Prep",
"employee_refinish": "Refinish",
- "est_addr1": "Appraiser Address",
- "est_co_nm": "Appraiser Company",
- "est_ct_fn": "Appraiser First Name",
- "est_ct_ln": "Appraiser Last Name",
- "est_ea": "Appraiser Email",
- "est_ph1": "Appraiser Phone #",
+ "est_addr1": "Estimator Address",
+ "est_co_nm": "Estimator Company",
+ "est_ct_fn": "Estimator First Name",
+ "est_ct_ln": "Estimator Last Name",
+ "est_ea": "Estimator Email",
+ "est_ph1": "Estimator Phone #",
"federal_tax_payable": "Federal Tax Payable",
"federal_tax_rate": "Federal Tax Rate",
"ins_addr1": "Insurance Co. Address",
@@ -1137,7 +1138,7 @@
},
"forms": {
"admindates": "Administrative Dates",
- "appraiserinfo": "Appraiser Info",
+ "appraiserinfo": "Estimator Info",
"claiminfo": "Claim Information",
"estdates": "Estimate Dates",
"laborrates": "Labor Rates",
@@ -1585,6 +1586,7 @@
"casl_authorization": "CASL Authorization",
"coversheet_landscape": "Coversheet (Landscape)",
"coversheet_portrait": "Coversheet Portrait",
+ "csi_invitation": "CSI Invitation",
"diagnostic_authorization": "Diagnostic Authorization",
"estimate": "Estimate Only",
"estimate_detail": "Estimate Details",
@@ -1620,6 +1622,14 @@
"worksheet_sorted_by_operation_part_type": "Worksheet by Operation & Part Type"
},
"labels": {
+ "groups": {
+ "authorization": "Authorization",
+ "financial": "Financial",
+ "post": "Post-Production",
+ "pre": "Pre-Production",
+ "ro": "Repair Order",
+ "worksheet": "Worksheets"
+ },
"misc": "Miscellaneous Documents",
"repairorder": "Repair Order Related",
"reportcentermodal": "Report Center",
@@ -1687,6 +1697,8 @@
"vendor": "Vendor"
},
"templates": {
+ "estimator_detail": "Jobs by Estimator (Detail)",
+ "estimator_summary": "Jobs by Estimator (Summary)",
"hours_sold_detail_closed": "Hours Sold Detail - Closed",
"hours_sold_detail_closed_source": "Hours Sold Detail - Closed by Source",
"hours_sold_detail_open": "Hours Sold Detail - Open",
diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json
index 53d5ea7dd..63d1e8887 100644
--- a/client/src/translations/es/common.json
+++ b/client/src/translations/es/common.json
@@ -671,7 +671,8 @@
"notsent": "Correo electrónico no enviado Se encontró un error al enviar {{message}}"
},
"labels": {
- "attachments": ""
+ "attachments": "",
+ "preview": ""
},
"successes": {
"sent": "Correo electrónico enviado con éxito."
@@ -1585,6 +1586,7 @@
"casl_authorization": "",
"coversheet_landscape": "",
"coversheet_portrait": "",
+ "csi_invitation": "",
"diagnostic_authorization": "",
"estimate": "",
"estimate_detail": "",
@@ -1620,6 +1622,14 @@
"worksheet_sorted_by_operation_part_type": ""
},
"labels": {
+ "groups": {
+ "authorization": "",
+ "financial": "",
+ "post": "",
+ "pre": "",
+ "ro": "",
+ "worksheet": ""
+ },
"misc": "",
"repairorder": "",
"reportcentermodal": "",
@@ -1687,6 +1697,8 @@
"vendor": ""
},
"templates": {
+ "estimator_detail": "",
+ "estimator_summary": "",
"hours_sold_detail_closed": "",
"hours_sold_detail_closed_source": "",
"hours_sold_detail_open": "",
diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json
index 1f21fe26d..2684ce231 100644
--- a/client/src/translations/fr/common.json
+++ b/client/src/translations/fr/common.json
@@ -671,7 +671,8 @@
"notsent": "Courriel non envoyé. Erreur rencontrée lors de l'envoi de {{message}}"
},
"labels": {
- "attachments": ""
+ "attachments": "",
+ "preview": ""
},
"successes": {
"sent": "E-mail envoyé avec succès."
@@ -1585,6 +1586,7 @@
"casl_authorization": "",
"coversheet_landscape": "",
"coversheet_portrait": "",
+ "csi_invitation": "",
"diagnostic_authorization": "",
"estimate": "",
"estimate_detail": "",
@@ -1620,6 +1622,14 @@
"worksheet_sorted_by_operation_part_type": ""
},
"labels": {
+ "groups": {
+ "authorization": "",
+ "financial": "",
+ "post": "",
+ "pre": "",
+ "ro": "",
+ "worksheet": ""
+ },
"misc": "",
"repairorder": "",
"reportcentermodal": "",
@@ -1687,6 +1697,8 @@
"vendor": ""
},
"templates": {
+ "estimator_detail": "",
+ "estimator_summary": "",
"hours_sold_detail_closed": "",
"hours_sold_detail_closed_source": "",
"hours_sold_detail_open": "",
diff --git a/client/src/utils/TemplateConstants.js b/client/src/utils/TemplateConstants.js
index 6a52f1810..6ba044339 100644
--- a/client/src/utils/TemplateConstants.js
+++ b/client/src/utils/TemplateConstants.js
@@ -18,6 +18,7 @@ export const TemplateList = (type, context) => {
subject: i18n.t("printcenter.jobs.casl_authorization"),
key: "casl_authorization",
disabled: false,
+ group: "authorization",
},
diagnostic_authorization: {
title: i18n.t("printcenter.jobs.diagnostic_authorization"),
@@ -25,34 +26,7 @@ export const TemplateList = (type, context) => {
subject: i18n.t("printcenter.jobs.diagnostic_authorization"),
key: "diagnostic_authorization",
disabled: false,
- },
- job_notes: {
- title: i18n.t("printcenter.jobs.job_notes"),
- description: "All Jobs Notes",
- subject: i18n.t("printcenter.jobs.job_notes"),
- key: "job_notes",
- disabled: false,
- },
- ro_with_description: {
- title: i18n.t("printcenter.jobs.ro_with_description"),
- description: "All Jobs Notes",
- subject: i18n.t("printcenter.jobs.ro_with_description"),
- key: "ro_with_description",
- disabled: false,
- },
- window_tag: {
- title: i18n.t("printcenter.jobs.window_tag"),
- description: "All Jobs Notes",
- subject: i18n.t("printcenter.jobs.window_tag"),
- key: "window_tag",
- disabled: false,
- },
- payments_by_job: {
- title: i18n.t("printcenter.jobs.payments_by_job"),
- description: "All Jobs Notes",
- subject: i18n.t("printcenter.jobs.payments_by_job"),
- key: "payments_by_job",
- disabled: false,
+ group: "authorization",
},
appointment_reminder: {
title: i18n.t("printcenter.jobs.appointment_reminder"),
@@ -60,6 +34,112 @@ export const TemplateList = (type, context) => {
subject: i18n.t("printcenter.jobs.appointment_reminder"),
key: "appointment_reminder",
disabled: false,
+ group: "pre",
+ },
+ estimate_followup: {
+ title: i18n.t("printcenter.jobs.estimate_followup"),
+ description: "All Jobs Notes",
+ subject: i18n.t("printcenter.jobs.estimate_followup"),
+ key: "estimate_followup",
+ disabled: false,
+ group: "pre",
+ },
+ express_repair_checklist: {
+ title: i18n.t("printcenter.jobs.express_repair_checklist"),
+ description: "All Jobs Notes",
+ subject: i18n.t("printcenter.jobs.express_repair_checklist"),
+ key: "express_repair_checklist",
+ disabled: false,
+ group: "pre",
+ },
+ glass_express_checklist: {
+ title: i18n.t("printcenter.jobs.glass_express_checklist"),
+ description: "All Jobs Notes",
+ subject: i18n.t("printcenter.jobs.glass_express_checklist"),
+ key: "glass_express_checklist",
+ disabled: false,
+ group: "pre",
+ },
+ vehicle_check_in: {
+ title: i18n.t("printcenter.jobs.vehicle_check_in"),
+ description: "All Jobs Notes",
+ subject: i18n.t("printcenter.jobs.vehicle_check_in"),
+ key: "vehicle_check_in",
+ disabled: false,
+ group: "pre",
+ },
+ parts_order_history: {
+ title: i18n.t("printcenter.jobs.parts_order_history"),
+ description: "All Jobs Notes",
+ subject: i18n.t("printcenter.jobs.parts_order_history"),
+ key: "parts_order_history",
+ disabled: false,
+ group: "ro",
+ },
+
+ job_notes: {
+ title: i18n.t("printcenter.jobs.job_notes"),
+ description: "All Jobs Notes",
+ subject: i18n.t("printcenter.jobs.job_notes"),
+ key: "job_notes",
+ disabled: false,
+ group: "ro",
+ },
+ ro_with_description: {
+ title: i18n.t("printcenter.jobs.ro_with_description"),
+ description: "All Jobs Notes",
+ subject: i18n.t("printcenter.jobs.ro_with_description"),
+ key: "ro_with_description",
+ disabled: false,
+ group: "ro",
+ },
+ window_tag: {
+ title: i18n.t("printcenter.jobs.window_tag"),
+ description: "All Jobs Notes",
+ subject: i18n.t("printcenter.jobs.window_tag"),
+ key: "window_tag",
+ disabled: false,
+ group: "ro",
+ },
+ supplement_request: {
+ title: i18n.t("printcenter.jobs.supplement_request"),
+ description: "All Jobs Notes",
+ subject: i18n.t("printcenter.jobs.supplement_request"),
+ key: "supplement_request",
+ disabled: false,
+ group: "ro",
+ },
+ estimate: {
+ title: i18n.t("printcenter.jobs.estimate"),
+ description: "All Jobs Notes",
+ subject: i18n.t("printcenter.jobs.estimate"),
+ key: "estimate",
+ disabled: false,
+ group: "ro",
+ },
+ parts_list: {
+ title: i18n.t("printcenter.jobs.parts_list"),
+ description: "All Jobs Notes",
+ subject: i18n.t("printcenter.jobs.parts_list"),
+ key: "parts_list",
+ disabled: false,
+ group: "ro",
+ },
+ coversheet_portrait: {
+ title: i18n.t("printcenter.jobs.coversheet_portrait"),
+ description: "All Jobs Notes",
+ subject: i18n.t("printcenter.jobs.coversheet_portrait"),
+ key: "coversheet_portrait",
+ disabled: false,
+ group: "ro",
+ },
+ coversheet_landscape: {
+ title: i18n.t("printcenter.jobs.coversheet_landscape"),
+ description: "All Jobs Notes",
+ subject: i18n.t("printcenter.jobs.coversheet_landscape"),
+ key: "coversheet_landscape",
+ disabled: false,
+ group: "ro",
},
worksheet_by_line_number: {
title: i18n.t("printcenter.jobs.worksheet_by_line_number"),
@@ -67,6 +147,7 @@ export const TemplateList = (type, context) => {
subject: i18n.t("printcenter.jobs.worksheet_by_line_number"),
key: "worksheet_by_line_number",
disabled: false,
+ group: "worksheet",
},
worksheet_sorted_by_operation: {
title: i18n.t("printcenter.jobs.worksheet_sorted_by_operation"),
@@ -74,6 +155,7 @@ export const TemplateList = (type, context) => {
subject: i18n.t("printcenter.jobs.worksheet_sorted_by_operation"),
key: "worksheet_sorted_by_operation",
disabled: false,
+ group: "worksheet",
},
worksheet_sorted_by_operation_no_hours: {
title: i18n.t(
@@ -85,6 +167,7 @@ export const TemplateList = (type, context) => {
),
key: "worksheet_sorted_by_operation_no_hours",
disabled: false,
+ group: "worksheet",
},
worksheet_sorted_by_operation_part_type: {
title: i18n.t(
@@ -96,13 +179,15 @@ export const TemplateList = (type, context) => {
),
key: "worksheet_sorted_by_operation_part_type",
disabled: false,
+ group: "worksheet",
},
- supplement_request: {
- title: i18n.t("printcenter.jobs.supplement_request"),
+ payments_by_job: {
+ title: i18n.t("printcenter.jobs.payments_by_job"),
description: "All Jobs Notes",
- subject: i18n.t("printcenter.jobs.supplement_request"),
- key: "supplement_request",
+ subject: i18n.t("printcenter.jobs.payments_by_job"),
+ key: "payments_by_job",
disabled: false,
+ group: "financial",
},
final_invoice: {
title: i18n.t("printcenter.jobs.final_invoice"),
@@ -110,6 +195,7 @@ export const TemplateList = (type, context) => {
subject: i18n.t("printcenter.jobs.final_invoice"),
key: "final_invoice",
disabled: false,
+ group: "financial",
},
payment_request: {
title: i18n.t("printcenter.jobs.payment_request"),
@@ -117,6 +203,7 @@ export const TemplateList = (type, context) => {
subject: i18n.t("printcenter.jobs.payment_request"),
key: "payment_request",
disabled: false,
+ group: "financial",
},
invoice_total_payable: {
title: i18n.t("printcenter.jobs.invoice_total_payable"),
@@ -124,6 +211,7 @@ export const TemplateList = (type, context) => {
subject: i18n.t("printcenter.jobs.invoice_total_payable"),
key: "invoice_total_payable",
disabled: false,
+ group: "financial",
},
invoice_customer_payable: {
title: i18n.t("printcenter.jobs.invoice_customer_payable"),
@@ -131,55 +219,16 @@ export const TemplateList = (type, context) => {
subject: i18n.t("printcenter.jobs.invoice_customer_payable"),
key: "invoice_customer_payable",
disabled: false,
+ group: "financial",
},
- parts_order_history: {
- title: i18n.t("printcenter.jobs.parts_order_history"),
- description: "All Jobs Notes",
- subject: i18n.t("printcenter.jobs.parts_order_history"),
- key: "parts_order_history",
- disabled: false,
- },
- glass_express_checklist: {
- title: i18n.t("printcenter.jobs.glass_express_checklist"),
- description: "All Jobs Notes",
- subject: i18n.t("printcenter.jobs.glass_express_checklist"),
- key: "glass_express_checklist",
- disabled: false,
- },
- estimate: {
- title: i18n.t("printcenter.jobs.estimate"),
- description: "All Jobs Notes",
- subject: i18n.t("printcenter.jobs.estimate"),
- key: "estimate",
- disabled: false,
- },
- parts_list: {
- title: i18n.t("printcenter.jobs.parts_list"),
- description: "All Jobs Notes",
- subject: i18n.t("printcenter.jobs.parts_list"),
- key: "parts_list",
- disabled: false,
- },
- coversheet_portrait: {
- title: i18n.t("printcenter.jobs.coversheet_portrait"),
- description: "All Jobs Notes",
- subject: i18n.t("printcenter.jobs.coversheet_portrait"),
- key: "coversheet_portrait",
- disabled: false,
- },
- coversheet_landscape: {
- title: i18n.t("printcenter.jobs.coversheet_landscape"),
- description: "All Jobs Notes",
- subject: i18n.t("printcenter.jobs.coversheet_landscape"),
- key: "coversheet_landscape",
- disabled: false,
- },
+
filing_coversheet_portrait: {
title: i18n.t("printcenter.jobs.filing_coversheet_portrait"),
description: "All Jobs Notes",
subject: i18n.t("printcenter.jobs.filing_coversheet_portrait"),
key: "filing_coversheet_portrait",
disabled: false,
+ group: "post",
},
qc_sheet: {
title: i18n.t("printcenter.jobs.qc_sheet"),
@@ -187,41 +236,25 @@ export const TemplateList = (type, context) => {
subject: i18n.t("printcenter.jobs.qc_sheet"),
key: "qc_sheet",
disabled: false,
+ group: "post",
},
- estimate_followup: {
- title: i18n.t("printcenter.jobs.estimate_followup"),
- description: "All Jobs Notes",
- subject: i18n.t("printcenter.jobs.estimate_followup"),
- key: "estimate_followup",
- disabled: false,
- },
+
vehicle_delivery_check: {
title: i18n.t("printcenter.jobs.vehicle_delivery_check"),
description: "All Jobs Notes",
subject: i18n.t("printcenter.jobs.vehicle_delivery_check"),
key: "vehicle_delivery_check",
disabled: false,
+ group: "post",
},
- express_repair_checklist: {
- title: i18n.t("printcenter.jobs.express_repair_checklist"),
- description: "All Jobs Notes",
- subject: i18n.t("printcenter.jobs.express_repair_checklist"),
- key: "express_repair_checklist",
- disabled: false,
- },
+
guarantee: {
title: i18n.t("printcenter.jobs.guarantee"),
description: "All Jobs Notes",
subject: i18n.t("printcenter.jobs.guarantee"),
key: "guarantee",
disabled: false,
- },
- vehicle_check_in: {
- title: i18n.t("printcenter.jobs.vehicle_check_in"),
- description: "All Jobs Notes",
- subject: i18n.t("printcenter.jobs.vehicle_check_in"),
- key: "vehicle_check_in",
- disabled: false,
+ group: "post",
},
}
: {}),
@@ -462,6 +495,22 @@ export const TemplateList = (type, context) => {
//idtype: "vendor",
disabled: false,
},
+ estimator_detail: {
+ title: i18n.t("reportcenter.templates.estimator_detail"),
+ description: "",
+ subject: i18n.t("reportcenter.templates.estimator_detail"),
+ key: "estimator_detail",
+ //idtype: "vendor",
+ disabled: false,
+ },
+ estimator_summary: {
+ title: i18n.t("reportcenter.templates.estimator_summary"),
+ description: "",
+ subject: i18n.t("reportcenter.templates.estimator_summary"),
+ key: "estimator_summary",
+ //idtype: "vendor",
+ disabled: false,
+ },
}
: {}),
...(!type || type === "courtesycarcontract"
diff --git a/client/yarn.lock b/client/yarn.lock
index 07cec907e..d6e8aa390 100644
--- a/client/yarn.lock
+++ b/client/yarn.lock
@@ -2178,14 +2178,6 @@
prop-types "^15.7.2"
react-use "^17.2.1"
-"@tinymce/tinymce-react@^3.10.3":
- version "3.12.0"
- resolved "https://registry.yarnpkg.com/@tinymce/tinymce-react/-/tinymce-react-3.12.0.tgz#165f197011b0fef3178f82168735e18ee28bd38a"
- integrity sha512-Mi/nOsJ8CAVlcX+6YuvSvlFzJ2/n9rZ4iDrU2WX2u1wBTugHvKGca26JGEIT5wKRlfXGv49ymriWQz7w00v0NA==
- dependencies:
- prop-types "^15.6.2"
- tinymce "^5.7.1"
-
"@types/anymatch@*":
version "1.3.1"
resolved "https://registry.yarnpkg.com/@types/anymatch/-/anymatch-1.3.1.tgz#336badc1beecb9dacc38bea2cf32adf627a8421a"
@@ -12852,11 +12844,6 @@ tinycolor2@^1.4.1:
resolved "https://registry.yarnpkg.com/tinycolor2/-/tinycolor2-1.4.2.tgz#3f6a4d1071ad07676d7fa472e1fac40a719d8803"
integrity sha512-vJhccZPs965sV/L2sU4oRQVAos0pQXwsvTLkWYdqJ+a8Q5kPFzJTuOFwy7UniPli44NKQGAglksjvOcpo95aZA==
-tinymce@^5.7.1:
- version "5.7.1"
- resolved "https://registry.yarnpkg.com/tinymce/-/tinymce-5.7.1.tgz#658a6fb4c7d53a8496cc00f8da33f4b8290da06d"
- integrity sha512-1gY8RClc734srSlkYwY0MQzmkS1j73PuPC+nYtNtrrQVPY9VNcZ4bOiRwzTbdjPPD8GOtv6BAk8Ww/H2RiqKpA==
-
tmpl@1.0.x:
version "1.0.4"
resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1"
diff --git a/package-lock.json b/package-lock.json
index 8ee2eaa28..29265dc0d 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -29,7 +29,7 @@
"phone": "^2.4.20",
"stripe": "^8.137.0",
"twilio": "^3.56.0",
- "xmlbuilder": "^15.1.1"
+ "xmlbuilder2": "^2.4.0"
},
"devDependencies": {
"concurrently": "^6.0.0",
@@ -332,9 +332,9 @@
}
},
"node_modules/@google-cloud/storage": {
- "version": "5.8.2",
- "resolved": "https://registry.npmjs.org/@google-cloud/storage/-/storage-5.8.2.tgz",
- "integrity": "sha512-R4MOLHhIbsQUqfQufV9QmYfxPE3TDJD+nwVOoN8mOKOx+XoVRm1ZoXaN5vwUMCBCHsDsgpWu7y9d6YvA+POXrg==",
+ "version": "5.8.3",
+ "resolved": "https://registry.npmjs.org/@google-cloud/storage/-/storage-5.8.3.tgz",
+ "integrity": "sha512-g++NTmpmwbZZEnBhJi3y1D3YyZ2Y+1xL5blp96eeJhffginMym5tRw/AGNZblDI35U2K1FTJEYqIZ31tbEzs8w==",
"optional": true,
"dependencies": {
"@google-cloud/common": "^3.6.0",
@@ -424,6 +424,50 @@
"resolved": "https://registry.npmjs.org/@jonkemp/package-utils/-/package-utils-1.0.7.tgz",
"integrity": "sha512-OoK+K1RmhtS8SlORrlH7sW0CNdrnm0BxKNcv4pQIk6y6VORsHiX91gV3dh6XD2eS7J+iCXROcu5sGuH0tjmNEQ=="
},
+ "node_modules/@oozcitak/dom": {
+ "version": "1.15.8",
+ "resolved": "https://registry.npmjs.org/@oozcitak/dom/-/dom-1.15.8.tgz",
+ "integrity": "sha512-MoOnLBNsF+ok0HjpAvxYxR4piUhRDCEWK0ot3upwOOHYudJd30j6M+LNcE8RKpwfnclAX9T66nXXzkytd29XSw==",
+ "dependencies": {
+ "@oozcitak/infra": "1.0.8",
+ "@oozcitak/url": "1.0.4",
+ "@oozcitak/util": "8.3.8"
+ },
+ "engines": {
+ "node": ">=8.0"
+ }
+ },
+ "node_modules/@oozcitak/infra": {
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/@oozcitak/infra/-/infra-1.0.8.tgz",
+ "integrity": "sha512-JRAUc9VR6IGHOL7OGF+yrvs0LO8SlqGnPAMqyzOuFZPSZSXI7Xf2O9+awQPSMXgIWGtgUf/dA6Hs6X6ySEaWTg==",
+ "dependencies": {
+ "@oozcitak/util": "8.3.8"
+ },
+ "engines": {
+ "node": ">=6.0"
+ }
+ },
+ "node_modules/@oozcitak/url": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/@oozcitak/url/-/url-1.0.4.tgz",
+ "integrity": "sha512-kDcD8y+y3FCSOvnBI6HJgl00viO/nGbQoCINmQ0h98OhnGITrWR3bOGfwYCthgcrV8AnTJz8MzslTQbC3SOAmw==",
+ "dependencies": {
+ "@oozcitak/infra": "1.0.8",
+ "@oozcitak/util": "8.3.8"
+ },
+ "engines": {
+ "node": ">=8.0"
+ }
+ },
+ "node_modules/@oozcitak/util": {
+ "version": "8.3.8",
+ "resolved": "https://registry.npmjs.org/@oozcitak/util/-/util-8.3.8.tgz",
+ "integrity": "sha512-T8TbSnGsxo6TDBJx/Sgv/BlVJL3tshxZP7Aq5R1mSnM5OcHY2dQaxLMu2+E8u3gN0MLOzdjurqN4ZRVuzQycOQ==",
+ "engines": {
+ "node": ">=8.0"
+ }
+ },
"node_modules/@protobufjs/aspromise": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz",
@@ -572,9 +616,9 @@
"peer": true
},
"node_modules/@types/node": {
- "version": "14.14.35",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.35.tgz",
- "integrity": "sha512-Lt+wj8NVPx0zUmUwumiVXapmaLUcAk3yPuHCFVXras9k5VT9TdhJqKqGVUQCD60OTMCl0qxJ57OiTL0Mic3Iag=="
+ "version": "14.14.37",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.37.tgz",
+ "integrity": "sha512-XYmBiy+ohOR4Lh5jE379fV2IU+6Jn4g5qASinhitfyO71b/sCo6MKsMLF5tc7Zf2CE8hViVQyYSobJNke8OvUw=="
},
"node_modules/@types/normalize-package-data": {
"version": "2.4.0",
@@ -739,7 +783,6 @@
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
"integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
- "dev": true,
"dependencies": {
"sprintf-js": "~1.0.2"
}
@@ -1327,9 +1370,9 @@
}
},
"node_modules/cross-fetch": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.2.tgz",
- "integrity": "sha512-+JhD65rDNqLbGmB3Gzs3HrEKC0aQnD+XA3SY6RjgkF88jV2q5cTc5+CwxlS3sdmLk98gpPt5CF9XRnPdlxZe6w==",
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.3.tgz",
+ "integrity": "sha512-2i6v88DTqVBNODyjD9U6Ycn/uSZNvyHe25cIbo2fFnAACAsaLTJsd23miRWiR5NuiGXR9wpJ9d40/9WAhjDIrw==",
"dependencies": {
"node-fetch": "2.6.1"
}
@@ -1797,9 +1840,9 @@
}
},
"node_modules/eslint": {
- "version": "7.22.0",
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.22.0.tgz",
- "integrity": "sha512-3VawOtjSJUQiiqac8MQc+w457iGLfuNGLFn8JmF051tTKbh5/x/0vlcEj8OgDCaw7Ysa2Jn8paGshV7x2abKXg==",
+ "version": "7.23.0",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.23.0.tgz",
+ "integrity": "sha512-kqvNVbdkjzpFy0XOszNwjkKzZ+6TcwCQ/h+ozlcIWwaimBBuhlQ4nN6kbiM2L+OjDcznkTJxzYfRFH92sx4a0Q==",
"dev": true,
"dependencies": {
"@babel/code-frame": "7.12.11",
@@ -2201,9 +2244,9 @@
}
},
"node_modules/firebase-admin": {
- "version": "9.5.0",
- "resolved": "https://registry.npmjs.org/firebase-admin/-/firebase-admin-9.5.0.tgz",
- "integrity": "sha512-OPXFOTDcAE+NORpfhq7YMEDk+vFClBtjfpkrjm2JHRxb8DpMm+K3AcusonFPU/WOH4FhiVN9JHB0+NPE20S3gQ==",
+ "version": "9.6.0",
+ "resolved": "https://registry.npmjs.org/firebase-admin/-/firebase-admin-9.6.0.tgz",
+ "integrity": "sha512-GNrxsQsZ6alz9u+uYmX84qcixxYQnfOrByxVgEHWiCI9JSCbMOQ/1Px2A6+Coz5zzFokTgXsHnIg+Qz7hMlNZg==",
"dependencies": {
"@firebase/database": "^0.8.1",
"@firebase/database-types": "^0.6.1",
@@ -2221,9 +2264,9 @@
}
},
"node_modules/firebase-admin/node_modules/@types/node": {
- "version": "10.17.55",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.55.tgz",
- "integrity": "sha512-koZJ89uLZufDvToeWO5BrC4CR4OUfHnUz2qoPs/daQH6qq3IN62QFxCTZ+bKaCE0xaoCAJYE4AXre8AbghCrhg=="
+ "version": "10.17.56",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.56.tgz",
+ "integrity": "sha512-LuAa6t1t0Bfw4CuSR0UITsm1hP17YL+u82kfHGrHUWdhlBtH7sa7jGY5z7glGaIj/WDYDkRtgGd+KCjCzxBW1w=="
},
"node_modules/flat-cache": {
"version": "3.0.4",
@@ -2920,6 +2963,21 @@
"integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=",
"dev": true
},
+ "node_modules/is-boolean-object": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.0.tgz",
+ "integrity": "sha512-a7Uprx8UtD+HWdyYwnD1+ExtTgqQtD2k/1yJgtXP6wnMm8byhkoTZRl+95LLThpzNZJ5aEvi46cdH+ayMFRwmA==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/is-core-module": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz",
@@ -2977,6 +3035,18 @@
"node": ">=0.10.0"
}
},
+ "node_modules/is-number-object": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.4.tgz",
+ "integrity": "sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/is-obj": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz",
@@ -3000,6 +3070,18 @@
"integrity": "sha512-xj0XPvmr7bQFTvirqnFr50o0hQIh6ZItDqloxt5aJrR4NQsYeSsyFQERYGCAzfindAcnKjINnwEEgLx4IqVzQw==",
"optional": true
},
+ "node_modules/is-string": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz",
+ "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/is-typedarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
@@ -3291,6 +3373,12 @@
"integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=",
"optional": true
},
+ "node_modules/lodash.clonedeep": {
+ "version": "4.5.0",
+ "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz",
+ "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=",
+ "dev": true
+ },
"node_modules/lodash.defaults": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz",
@@ -3376,6 +3464,12 @@
"resolved": "https://registry.npmjs.org/lodash.some/-/lodash.some-4.6.0.tgz",
"integrity": "sha1-G7nzFO9ri63tE7VJFpsqlF62jk0="
},
+ "node_modules/lodash.truncate": {
+ "version": "4.4.2",
+ "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz",
+ "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=",
+ "dev": true
+ },
"node_modules/logform": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/logform/-/logform-2.2.0.tgz",
@@ -3997,9 +4091,9 @@
}
},
"node_modules/protobufjs/node_modules/@types/node": {
- "version": "13.13.47",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.47.tgz",
- "integrity": "sha512-R6851wTjN1YJza8ZIeX6puNBSi/ZULHVh4WVleA7q256l+cP2EtXnKbO455fTs2ytQk3dL9qkU+Wh8l/uROdKg==",
+ "version": "13.13.48",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.48.tgz",
+ "integrity": "sha512-z8wvSsgWQzkr4sVuMEEOvwMdOQjiRY2Y/ZW4fDfjfe3+TfQrZqFKOthBgk2RnVEmtOKrkwdZ7uTvsxTBLjKGDQ==",
"optional": true
},
"node_modules/proxy-addr": {
@@ -4349,6 +4443,14 @@
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
+ "node_modules/remote-content/node_modules/netmask": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.1.tgz",
+ "integrity": "sha512-gB8eG6ubxz67c7O2gaGiyWdRUIbH61q7anjgueDqCC9kvIs/b4CTtCMaQKeJbv1/Y7FT19I4zKwYmjnjInRQsg==",
+ "engines": {
+ "node": ">= 0.4.0"
+ }
+ },
"node_modules/remote-content/node_modules/pac-proxy-agent": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-4.1.0.tgz",
@@ -4369,13 +4471,13 @@
}
},
"node_modules/remote-content/node_modules/pac-resolver": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-4.1.0.tgz",
- "integrity": "sha512-d6lf2IrZJJ7ooVHr7BfwSjRO1yKSJMaiiWYSHcrxSIUtZrCa4KKGwcztdkZ/E9LFleJfjoi1yl+XLR7AX24nbQ==",
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-4.2.0.tgz",
+ "integrity": "sha512-rPACZdUyuxT5Io/gFKUeeZFfE5T7ve7cAkE5TUZRRfuKP0u5Hocwe48X7ZEm6mYB+bTB0Qf+xlVlA/RM/i6RCQ==",
"dependencies": {
"degenerator": "^2.2.0",
"ip": "^1.1.5",
- "netmask": "^1.0.6"
+ "netmask": "^2.0.1"
},
"engines": {
"node": ">= 6"
@@ -4622,9 +4724,9 @@
"integrity": "sha1-NipCxtMEBW1JOz8SvOq7LGV2ptQ="
},
"node_modules/rxjs": {
- "version": "6.6.6",
- "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.6.tgz",
- "integrity": "sha512-/oTwee4N4iWzAMAL9xdGKjkEHmIwupR3oXbQjCKywF1BeFohswF3vZdogbmEF6pZkOsXTzWkrZszrWpQTByYVg==",
+ "version": "6.6.7",
+ "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz",
+ "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==",
"dev": true,
"dependencies": {
"tslib": "^1.9.0"
@@ -4940,8 +5042,7 @@
"node_modules/sprintf-js": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
- "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
- "dev": true
+ "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw="
},
"node_modules/stack-trace": {
"version": "0.0.10",
@@ -5056,9 +5157,9 @@
}
},
"node_modules/stripe": {
- "version": "8.139.0",
- "resolved": "https://registry.npmjs.org/stripe/-/stripe-8.139.0.tgz",
- "integrity": "sha512-3Lggs0mgy8gPzIDvLGYmx5ghQuTu+nvSUBCv9Di4FekvJ5iP7nenlrOk7A4cidF1nokamKm/bCIRYxIeDv5xYQ==",
+ "version": "8.141.0",
+ "resolved": "https://registry.npmjs.org/stripe/-/stripe-8.141.0.tgz",
+ "integrity": "sha512-CRGmx1WYENj16L37TujJg+KscGn8LbYbXqRCPdaepr7BzHIdAFJfQhNfdFkShW5Z9rbmo6mA2fiAOf1S3FIoSw==",
"dependencies": {
"@types/node": ">=8.1.0",
"qs": "^6.6.0"
@@ -5203,13 +5304,18 @@
}
},
"node_modules/table": {
- "version": "6.0.7",
- "resolved": "https://registry.npmjs.org/table/-/table-6.0.7.tgz",
- "integrity": "sha512-rxZevLGTUzWna/qBLObOe16kB2RTnnbhciwgPbMMlazz1yZGVEgnZK762xyVdVznhqxrfCeBMmMkgOOaPwjH7g==",
+ "version": "6.0.9",
+ "resolved": "https://registry.npmjs.org/table/-/table-6.0.9.tgz",
+ "integrity": "sha512-F3cLs9a3hL1Z7N4+EkSscsel3z55XT950AvB05bwayrNg5T1/gykXtigioTAjbltvbMSJvvhFCbnf6mX+ntnJQ==",
"dev": true,
"dependencies": {
- "ajv": "^7.0.2",
- "lodash": "^4.17.20",
+ "ajv": "^8.0.1",
+ "is-boolean-object": "^1.1.0",
+ "is-number-object": "^1.0.4",
+ "is-string": "^1.0.5",
+ "lodash.clonedeep": "^4.5.0",
+ "lodash.flatten": "^4.4.0",
+ "lodash.truncate": "^4.4.2",
"slice-ansi": "^4.0.0",
"string-width": "^4.2.0"
},
@@ -5218,9 +5324,9 @@
}
},
"node_modules/table/node_modules/ajv": {
- "version": "7.2.3",
- "resolved": "https://registry.npmjs.org/ajv/-/ajv-7.2.3.tgz",
- "integrity": "sha512-idv5WZvKVXDqKralOImQgPM9v6WOdLNa0IY3B3doOjw/YxRGT8I+allIJ6kd7Uaj+SF1xZUSU+nPM5aDNBVtnw==",
+ "version": "8.0.2",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.0.2.tgz",
+ "integrity": "sha512-V0HGxJd0PiDF0ecHYIesTOqfd1gJguwQUOYfMfAWnRsWQEXfc5ifbUFhD3Wjc+O+y7VAqL+g07prq9gHQ/JOZQ==",
"dev": true,
"dependencies": {
"fast-deep-equal": "^3.1.1",
@@ -5741,12 +5847,36 @@
"node": ">=8"
}
},
- "node_modules/xmlbuilder": {
- "version": "15.1.1",
- "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-15.1.1.tgz",
- "integrity": "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg==",
+ "node_modules/xmlbuilder2": {
+ "version": "2.4.0",
+ "resolved": "https://registry.npmjs.org/xmlbuilder2/-/xmlbuilder2-2.4.0.tgz",
+ "integrity": "sha512-KrOVUGD65xTQ7ZA+GMQGdBSpe1Ufu5ylCQSYVk6QostySDkxPmAQ0WWIu7dR3JjLfVbF22RFQX7KyrZ6VTLcQg==",
+ "dependencies": {
+ "@oozcitak/dom": "1.15.8",
+ "@oozcitak/infra": "1.0.8",
+ "@oozcitak/util": "8.3.8",
+ "@types/node": "14.6.2",
+ "js-yaml": "3.14.0"
+ },
"engines": {
- "node": ">=8.0"
+ "node": ">=10.0"
+ }
+ },
+ "node_modules/xmlbuilder2/node_modules/@types/node": {
+ "version": "14.6.2",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-14.6.2.tgz",
+ "integrity": "sha512-onlIwbaeqvZyniGPfdw/TEhKIh79pz66L1q06WUQqJLnAb6wbjvOtepLYTGHTqzdXgBYIE3ZdmqHDGsRsbBz7A=="
+ },
+ "node_modules/xmlbuilder2/node_modules/js-yaml": {
+ "version": "3.14.0",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz",
+ "integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==",
+ "dependencies": {
+ "argparse": "^1.0.7",
+ "esprima": "^4.0.0"
+ },
+ "bin": {
+ "js-yaml": "bin/js-yaml.js"
}
},
"node_modules/xregexp": {
@@ -6053,9 +6183,9 @@
"optional": true
},
"@google-cloud/storage": {
- "version": "5.8.2",
- "resolved": "https://registry.npmjs.org/@google-cloud/storage/-/storage-5.8.2.tgz",
- "integrity": "sha512-R4MOLHhIbsQUqfQufV9QmYfxPE3TDJD+nwVOoN8mOKOx+XoVRm1ZoXaN5vwUMCBCHsDsgpWu7y9d6YvA+POXrg==",
+ "version": "5.8.3",
+ "resolved": "https://registry.npmjs.org/@google-cloud/storage/-/storage-5.8.3.tgz",
+ "integrity": "sha512-g++NTmpmwbZZEnBhJi3y1D3YyZ2Y+1xL5blp96eeJhffginMym5tRw/AGNZblDI35U2K1FTJEYqIZ31tbEzs8w==",
"optional": true,
"requires": {
"@google-cloud/common": "^3.6.0",
@@ -6132,6 +6262,38 @@
"resolved": "https://registry.npmjs.org/@jonkemp/package-utils/-/package-utils-1.0.7.tgz",
"integrity": "sha512-OoK+K1RmhtS8SlORrlH7sW0CNdrnm0BxKNcv4pQIk6y6VORsHiX91gV3dh6XD2eS7J+iCXROcu5sGuH0tjmNEQ=="
},
+ "@oozcitak/dom": {
+ "version": "1.15.8",
+ "resolved": "https://registry.npmjs.org/@oozcitak/dom/-/dom-1.15.8.tgz",
+ "integrity": "sha512-MoOnLBNsF+ok0HjpAvxYxR4piUhRDCEWK0ot3upwOOHYudJd30j6M+LNcE8RKpwfnclAX9T66nXXzkytd29XSw==",
+ "requires": {
+ "@oozcitak/infra": "1.0.8",
+ "@oozcitak/url": "1.0.4",
+ "@oozcitak/util": "8.3.8"
+ }
+ },
+ "@oozcitak/infra": {
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/@oozcitak/infra/-/infra-1.0.8.tgz",
+ "integrity": "sha512-JRAUc9VR6IGHOL7OGF+yrvs0LO8SlqGnPAMqyzOuFZPSZSXI7Xf2O9+awQPSMXgIWGtgUf/dA6Hs6X6ySEaWTg==",
+ "requires": {
+ "@oozcitak/util": "8.3.8"
+ }
+ },
+ "@oozcitak/url": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/@oozcitak/url/-/url-1.0.4.tgz",
+ "integrity": "sha512-kDcD8y+y3FCSOvnBI6HJgl00viO/nGbQoCINmQ0h98OhnGITrWR3bOGfwYCthgcrV8AnTJz8MzslTQbC3SOAmw==",
+ "requires": {
+ "@oozcitak/infra": "1.0.8",
+ "@oozcitak/util": "8.3.8"
+ }
+ },
+ "@oozcitak/util": {
+ "version": "8.3.8",
+ "resolved": "https://registry.npmjs.org/@oozcitak/util/-/util-8.3.8.tgz",
+ "integrity": "sha512-T8TbSnGsxo6TDBJx/Sgv/BlVJL3tshxZP7Aq5R1mSnM5OcHY2dQaxLMu2+E8u3gN0MLOzdjurqN4ZRVuzQycOQ=="
+ },
"@protobufjs/aspromise": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz",
@@ -6277,9 +6439,9 @@
"peer": true
},
"@types/node": {
- "version": "14.14.35",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.35.tgz",
- "integrity": "sha512-Lt+wj8NVPx0zUmUwumiVXapmaLUcAk3yPuHCFVXras9k5VT9TdhJqKqGVUQCD60OTMCl0qxJ57OiTL0Mic3Iag=="
+ "version": "14.14.37",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.37.tgz",
+ "integrity": "sha512-XYmBiy+ohOR4Lh5jE379fV2IU+6Jn4g5qASinhitfyO71b/sCo6MKsMLF5tc7Zf2CE8hViVQyYSobJNke8OvUw=="
},
"@types/normalize-package-data": {
"version": "2.4.0",
@@ -6405,7 +6567,6 @@
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
"integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
- "dev": true,
"requires": {
"sprintf-js": "~1.0.2"
}
@@ -6885,9 +7046,9 @@
}
},
"cross-fetch": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.2.tgz",
- "integrity": "sha512-+JhD65rDNqLbGmB3Gzs3HrEKC0aQnD+XA3SY6RjgkF88jV2q5cTc5+CwxlS3sdmLk98gpPt5CF9XRnPdlxZe6w==",
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.3.tgz",
+ "integrity": "sha512-2i6v88DTqVBNODyjD9U6Ycn/uSZNvyHe25cIbo2fFnAACAsaLTJsd23miRWiR5NuiGXR9wpJ9d40/9WAhjDIrw==",
"requires": {
"node-fetch": "2.6.1"
}
@@ -7267,9 +7428,9 @@
}
},
"eslint": {
- "version": "7.22.0",
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.22.0.tgz",
- "integrity": "sha512-3VawOtjSJUQiiqac8MQc+w457iGLfuNGLFn8JmF051tTKbh5/x/0vlcEj8OgDCaw7Ysa2Jn8paGshV7x2abKXg==",
+ "version": "7.23.0",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.23.0.tgz",
+ "integrity": "sha512-kqvNVbdkjzpFy0XOszNwjkKzZ+6TcwCQ/h+ozlcIWwaimBBuhlQ4nN6kbiM2L+OjDcznkTJxzYfRFH92sx4a0Q==",
"dev": true,
"requires": {
"@babel/code-frame": "7.12.11",
@@ -7588,9 +7749,9 @@
}
},
"firebase-admin": {
- "version": "9.5.0",
- "resolved": "https://registry.npmjs.org/firebase-admin/-/firebase-admin-9.5.0.tgz",
- "integrity": "sha512-OPXFOTDcAE+NORpfhq7YMEDk+vFClBtjfpkrjm2JHRxb8DpMm+K3AcusonFPU/WOH4FhiVN9JHB0+NPE20S3gQ==",
+ "version": "9.6.0",
+ "resolved": "https://registry.npmjs.org/firebase-admin/-/firebase-admin-9.6.0.tgz",
+ "integrity": "sha512-GNrxsQsZ6alz9u+uYmX84qcixxYQnfOrByxVgEHWiCI9JSCbMOQ/1Px2A6+Coz5zzFokTgXsHnIg+Qz7hMlNZg==",
"requires": {
"@firebase/database": "^0.8.1",
"@firebase/database-types": "^0.6.1",
@@ -7603,9 +7764,9 @@
},
"dependencies": {
"@types/node": {
- "version": "10.17.55",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.55.tgz",
- "integrity": "sha512-koZJ89uLZufDvToeWO5BrC4CR4OUfHnUz2qoPs/daQH6qq3IN62QFxCTZ+bKaCE0xaoCAJYE4AXre8AbghCrhg=="
+ "version": "10.17.56",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.56.tgz",
+ "integrity": "sha512-LuAa6t1t0Bfw4CuSR0UITsm1hP17YL+u82kfHGrHUWdhlBtH7sa7jGY5z7glGaIj/WDYDkRtgGd+KCjCzxBW1w=="
}
}
},
@@ -8154,6 +8315,15 @@
"integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=",
"dev": true
},
+ "is-boolean-object": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.0.tgz",
+ "integrity": "sha512-a7Uprx8UtD+HWdyYwnD1+ExtTgqQtD2k/1yJgtXP6wnMm8byhkoTZRl+95LLThpzNZJ5aEvi46cdH+ayMFRwmA==",
+ "dev": true,
+ "requires": {
+ "call-bind": "^1.0.0"
+ }
+ },
"is-core-module": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz",
@@ -8190,6 +8360,12 @@
"is-extglob": "^2.1.1"
}
},
+ "is-number-object": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.4.tgz",
+ "integrity": "sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw==",
+ "dev": true
+ },
"is-obj": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz",
@@ -8207,6 +8383,12 @@
"integrity": "sha512-xj0XPvmr7bQFTvirqnFr50o0hQIh6ZItDqloxt5aJrR4NQsYeSsyFQERYGCAzfindAcnKjINnwEEgLx4IqVzQw==",
"optional": true
},
+ "is-string": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz",
+ "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==",
+ "dev": true
+ },
"is-typedarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
@@ -8468,6 +8650,12 @@
"integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=",
"optional": true
},
+ "lodash.clonedeep": {
+ "version": "4.5.0",
+ "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz",
+ "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=",
+ "dev": true
+ },
"lodash.defaults": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz",
@@ -8553,6 +8741,12 @@
"resolved": "https://registry.npmjs.org/lodash.some/-/lodash.some-4.6.0.tgz",
"integrity": "sha1-G7nzFO9ri63tE7VJFpsqlF62jk0="
},
+ "lodash.truncate": {
+ "version": "4.4.2",
+ "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz",
+ "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=",
+ "dev": true
+ },
"logform": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/logform/-/logform-2.2.0.tgz",
@@ -9052,9 +9246,9 @@
},
"dependencies": {
"@types/node": {
- "version": "13.13.47",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.47.tgz",
- "integrity": "sha512-R6851wTjN1YJza8ZIeX6puNBSi/ZULHVh4WVleA7q256l+cP2EtXnKbO455fTs2ytQk3dL9qkU+Wh8l/uROdKg==",
+ "version": "13.13.48",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.48.tgz",
+ "integrity": "sha512-z8wvSsgWQzkr4sVuMEEOvwMdOQjiRY2Y/ZW4fDfjfe3+TfQrZqFKOthBgk2RnVEmtOKrkwdZ7uTvsxTBLjKGDQ==",
"optional": true
}
}
@@ -9335,6 +9529,11 @@
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
+ "netmask": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.1.tgz",
+ "integrity": "sha512-gB8eG6ubxz67c7O2gaGiyWdRUIbH61q7anjgueDqCC9kvIs/b4CTtCMaQKeJbv1/Y7FT19I4zKwYmjnjInRQsg=="
+ },
"pac-proxy-agent": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-4.1.0.tgz",
@@ -9352,13 +9551,13 @@
}
},
"pac-resolver": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-4.1.0.tgz",
- "integrity": "sha512-d6lf2IrZJJ7ooVHr7BfwSjRO1yKSJMaiiWYSHcrxSIUtZrCa4KKGwcztdkZ/E9LFleJfjoi1yl+XLR7AX24nbQ==",
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-4.2.0.tgz",
+ "integrity": "sha512-rPACZdUyuxT5Io/gFKUeeZFfE5T7ve7cAkE5TUZRRfuKP0u5Hocwe48X7ZEm6mYB+bTB0Qf+xlVlA/RM/i6RCQ==",
"requires": {
"degenerator": "^2.2.0",
"ip": "^1.1.5",
- "netmask": "^1.0.6"
+ "netmask": "^2.0.1"
}
},
"proxy-agent": {
@@ -9547,9 +9746,9 @@
"integrity": "sha1-NipCxtMEBW1JOz8SvOq7LGV2ptQ="
},
"rxjs": {
- "version": "6.6.6",
- "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.6.tgz",
- "integrity": "sha512-/oTwee4N4iWzAMAL9xdGKjkEHmIwupR3oXbQjCKywF1BeFohswF3vZdogbmEF6pZkOsXTzWkrZszrWpQTByYVg==",
+ "version": "6.6.7",
+ "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz",
+ "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==",
"dev": true,
"requires": {
"tslib": "^1.9.0"
@@ -9804,8 +10003,7 @@
"sprintf-js": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
- "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
- "dev": true
+ "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw="
},
"stack-trace": {
"version": "0.0.10",
@@ -9884,9 +10082,9 @@
"dev": true
},
"stripe": {
- "version": "8.139.0",
- "resolved": "https://registry.npmjs.org/stripe/-/stripe-8.139.0.tgz",
- "integrity": "sha512-3Lggs0mgy8gPzIDvLGYmx5ghQuTu+nvSUBCv9Di4FekvJ5iP7nenlrOk7A4cidF1nokamKm/bCIRYxIeDv5xYQ==",
+ "version": "8.141.0",
+ "resolved": "https://registry.npmjs.org/stripe/-/stripe-8.141.0.tgz",
+ "integrity": "sha512-CRGmx1WYENj16L37TujJg+KscGn8LbYbXqRCPdaepr7BzHIdAFJfQhNfdFkShW5Z9rbmo6mA2fiAOf1S3FIoSw==",
"requires": {
"@types/node": ">=8.1.0",
"qs": "^6.6.0"
@@ -10011,21 +10209,26 @@
}
},
"table": {
- "version": "6.0.7",
- "resolved": "https://registry.npmjs.org/table/-/table-6.0.7.tgz",
- "integrity": "sha512-rxZevLGTUzWna/qBLObOe16kB2RTnnbhciwgPbMMlazz1yZGVEgnZK762xyVdVznhqxrfCeBMmMkgOOaPwjH7g==",
+ "version": "6.0.9",
+ "resolved": "https://registry.npmjs.org/table/-/table-6.0.9.tgz",
+ "integrity": "sha512-F3cLs9a3hL1Z7N4+EkSscsel3z55XT950AvB05bwayrNg5T1/gykXtigioTAjbltvbMSJvvhFCbnf6mX+ntnJQ==",
"dev": true,
"requires": {
- "ajv": "^7.0.2",
- "lodash": "^4.17.20",
+ "ajv": "^8.0.1",
+ "is-boolean-object": "^1.1.0",
+ "is-number-object": "^1.0.4",
+ "is-string": "^1.0.5",
+ "lodash.clonedeep": "^4.5.0",
+ "lodash.flatten": "^4.4.0",
+ "lodash.truncate": "^4.4.2",
"slice-ansi": "^4.0.0",
"string-width": "^4.2.0"
},
"dependencies": {
"ajv": {
- "version": "7.2.3",
- "resolved": "https://registry.npmjs.org/ajv/-/ajv-7.2.3.tgz",
- "integrity": "sha512-idv5WZvKVXDqKralOImQgPM9v6WOdLNa0IY3B3doOjw/YxRGT8I+allIJ6kd7Uaj+SF1xZUSU+nPM5aDNBVtnw==",
+ "version": "8.0.2",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.0.2.tgz",
+ "integrity": "sha512-V0HGxJd0PiDF0ecHYIesTOqfd1gJguwQUOYfMfAWnRsWQEXfc5ifbUFhD3Wjc+O+y7VAqL+g07prq9gHQ/JOZQ==",
"dev": true,
"requires": {
"fast-deep-equal": "^3.1.1",
@@ -10443,10 +10646,33 @@
"integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==",
"optional": true
},
- "xmlbuilder": {
- "version": "15.1.1",
- "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-15.1.1.tgz",
- "integrity": "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg=="
+ "xmlbuilder2": {
+ "version": "2.4.0",
+ "resolved": "https://registry.npmjs.org/xmlbuilder2/-/xmlbuilder2-2.4.0.tgz",
+ "integrity": "sha512-KrOVUGD65xTQ7ZA+GMQGdBSpe1Ufu5ylCQSYVk6QostySDkxPmAQ0WWIu7dR3JjLfVbF22RFQX7KyrZ6VTLcQg==",
+ "requires": {
+ "@oozcitak/dom": "1.15.8",
+ "@oozcitak/infra": "1.0.8",
+ "@oozcitak/util": "8.3.8",
+ "@types/node": "14.6.2",
+ "js-yaml": "3.14.0"
+ },
+ "dependencies": {
+ "@types/node": {
+ "version": "14.6.2",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-14.6.2.tgz",
+ "integrity": "sha512-onlIwbaeqvZyniGPfdw/TEhKIh79pz66L1q06WUQqJLnAb6wbjvOtepLYTGHTqzdXgBYIE3ZdmqHDGsRsbBz7A=="
+ },
+ "js-yaml": {
+ "version": "3.14.0",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz",
+ "integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==",
+ "requires": {
+ "argparse": "^1.0.7",
+ "esprima": "^4.0.0"
+ }
+ }
+ }
},
"xregexp": {
"version": "2.0.0",
diff --git a/package.json b/package.json
index 269814541..a678254b7 100644
--- a/package.json
+++ b/package.json
@@ -37,7 +37,7 @@
"phone": "^2.4.20",
"stripe": "^8.137.0",
"twilio": "^3.56.0",
- "xmlbuilder": "^15.1.1"
+ "xmlbuilder2": "^2.4.0"
},
"devDependencies": {
"concurrently": "^6.0.0",
diff --git a/server/accounting/qbxml/qbxml-payables.js b/server/accounting/qbxml/qbxml-payables.js
index 1c2dc3d2a..1c5571403 100644
--- a/server/accounting/qbxml/qbxml-payables.js
+++ b/server/accounting/qbxml/qbxml-payables.js
@@ -3,7 +3,7 @@ const path = require("path");
const DineroQbFormat = require("../accounting-constants").DineroQbFormat;
const queries = require("../../graphql-client/queries");
const Dinero = require("dinero.js");
-var builder = require("xmlbuilder");
+var builder = require("xmlbuilder2");
const QbXmlUtils = require("./qbxml-utils");
const moment = require("moment");
diff --git a/server/accounting/qbxml/qbxml-payments.js b/server/accounting/qbxml/qbxml-payments.js
index 522fad375..9d7c8b852 100644
--- a/server/accounting/qbxml/qbxml-payments.js
+++ b/server/accounting/qbxml/qbxml-payments.js
@@ -3,7 +3,7 @@ const path = require("path");
const DineroQbFormat = require("../accounting-constants").DineroQbFormat;
const queries = require("../../graphql-client/queries");
const Dinero = require("dinero.js");
-var builder = require("xmlbuilder");
+var builder = require("xmlbuilder2");
const moment = require("moment");
const QbXmlUtils = require("./qbxml-utils");
const QbxmlReceivables = require("./qbxml-receivables");
diff --git a/server/accounting/qbxml/qbxml-receivables.js b/server/accounting/qbxml/qbxml-receivables.js
index cb1c6a6e6..fd885695b 100644
--- a/server/accounting/qbxml/qbxml-receivables.js
+++ b/server/accounting/qbxml/qbxml-receivables.js
@@ -4,7 +4,7 @@ const DineroQbFormat = require("../accounting-constants").DineroQbFormat;
const queries = require("../../graphql-client/queries");
const Dinero = require("dinero.js");
const moment = require("moment");
-var builder = require("xmlbuilder");
+var builder = require("xmlbuilder2");
const QbXmlUtils = require("./qbxml-utils");
require("dotenv").config({
path: path.resolve(
diff --git a/server/data/autohouse.js b/server/data/autohouse.js
index 8a8c00553..3d4b70abf 100644
--- a/server/data/autohouse.js
+++ b/server/data/autohouse.js
@@ -1,9 +1,9 @@
-const GraphQLClient = require("graphql-request").GraphQLClient;
const path = require("path");
const queries = require("../graphql-client/queries");
const Dinero = require("dinero.js");
const moment = require("moment");
-var builder = require("xmlbuilder");
+var builder = require("xmlbuilder2");
+const _ = require("lodash");
require("dotenv").config({
path: path.resolve(
@@ -11,325 +11,386 @@ require("dotenv").config({
`.env.${process.env.NODE_ENV || "development"}`
),
});
+
const client = require("../graphql-client/graphql-client").client;
-
+const AHDineroFormat = "0.00";
const AhDateFormat = "MMDDYYYY";
-
exports.default = async (req, res) => {
//Get Client Dataset.
const { jobs } = await client.request(queries.AUTOHOUSE_QUERY);
+ const erroredJobs = [];
+
const autoHouseObject = {
- AutoHouseExport: { RepairOrder: jobs.map((j) => CreateRepairOrderTag(j)) },
- };
-
- var ret = builder
- .create(autoHouseObject, {
- version: "1.0",
- encoding: "UTF-8",
- headless: false,
- })
- .end({ pretty: true });
-
- res.type("application/xml");
- res.send(ret);
-};
-
-const CreateRepairOrderTag = (job) => {
- //Level 2
- const ret = {
- RepairOrderInformation: {
- ShopInternalName: job.bodyshop.autohouseid,
- ID: job.id,
- RO: job.ro_number,
- Est: job.id, //We no longer use estimate id.
- GUID: job.id,
- TransType: StatusMapping(job.status, job.bodyshop.md_ro_statuses),
- ShopName: job.bodyshop.shopname,
- ShopAddress: job.bodyshop.address1,
- ShopCity: job.bodyshop.city,
- ShopState: job.bodyshop.state,
- ShopZip: job.bodyshop.zip_post,
- ShopPhone: job.bodyshop.phone,
- EstimatorID: `${job.est_ct_fn} ${job.est_ct_ln}`,
- EstimatorName: `${job.est_ct_fn} ${job.est_ct_ln}`,
- },
- CustomerInformation: {
- FirstName: null,
- LastName: null,
- Street: null,
- City: null,
- State: null,
- Zip: "N6G",
- Phone1: null,
- Phone2: null,
- Phone2Extension: null,
- Phone3: null,
- Phone3Extension: null,
- FileComments: null,
- Source: null,
- Email: null,
- RetWhsl: null,
- Cat: null,
- InsuredorClaimantFlag: null,
- },
- VehicleInformation: {
- Year: job.v_model_yr,
- Make: job.v_make_desc,
- Model: job.v_model_desc,
- VIN: job.v_vin,
- License: job.plate_no,
- MileageIn: job.kmin,
- Vehiclecolor: job.v_color,
- VehicleProductionDate: null,
- VehiclePaintCode: null,
- VehicleTrimCode: null,
- VehicleBodyStyle: null,
- DriveableFlag: job.tlos_ind ? "Y" : "N",
- },
-
- InsuranceInformation: {
- InsuranceCo: job.ins_co_nm,
- CompanyName: job.ins_co_nm,
- Address: job.ins_addr1,
- City: job.ins_addr1,
- State: job.ins_city,
- Zip: job.ins_zip,
- Phone: job.ins_ph1,
- Fax: null,
- ClaimType: null,
- LossType: null,
- Policy: null,
- Claim: job.clm_no,
- InsuredLastName: null,
- InsuredFirstName: null,
- ClaimantLastName: null,
- ClaimantFirstName: null,
- Assignment: null,
- InsuranceAgentLastName: null,
- InsuranceAgentFirstName: null,
- InsAgentPhone: null,
- InsideAdjuster: null,
- OutsideAdjuster: null,
- },
- Dates: {
- DateofLoss: job.loss_date && moment(job.loss_date).format(AhDateFormat),
- InitialCustomerContactDate: null,
- FirstFollowUpDate: null,
- ReferralDate: null,
- EstimateAppointmentDate: null,
- SecondFollowUpDate: null,
- AssignedDate: null,
- EstComplete: null,
- CustomerAuthorizationDate: null,
- InsuranceAuthorizationDate: null,
- DateOpened: job.date_open && moment(job.date_open).format(AhDateFormat),
- ScheduledArrivalDate:
- job.scheduled_in && moment(job.scheduled_in).format(AhDateFormat),
- CarinShop: job.actual_in && moment(job.actual_in).format(AhDateFormat),
- InsInspDate: null,
- StartDate: null,
- PartsOrder: null,
- TeardownHold: null,
- SupplementSubmittedDate: null,
- SupplementApprovedDate: null,
- AssntoBody: null,
- AssntoMech: null,
- AssntoPaint: null,
- AssntoDetail: null,
- PromiseDate:
- job.scheduled_completion &&
- moment(job.scheduled_completion).format(AhDateFormat),
- InsuranceTargetOut: null,
- CarComplete:
- job.actual_completion &&
- moment(job.actual_completion).format(AhDateFormat),
- DeliveryAppointmentDate:
- job.scheduled_delivery &&
- moment(job.scheduled_delivery).format(AhDateFormat),
- DateClosed:
- job.date_invoiced && moment(job.date_invoiced).format(AhDateFormat),
- CustomerPaidInFullDate: null,
- InsurancePaidInFullDate: null,
- CustPickup:
- job.actual_delivery && moment(job.actual_delivery).format(AhDateFormat),
- AccountPostedDate:
- job.date_exported && moment(job.date_exported).format(AhDateFormat),
- CSIProcessedDate: null,
- ThankYouLetterSent: null,
- AdditionalFollowUpDate: null,
- },
- Rates: {
- BodyRate: job.rate_lab,
- RefinishRate: job.rate_lar,
- MechanicalRate: job.rate_lam,
- StructuralRate: job.rate_las,
- PMRate: job.rate_mapa,
- BMRate: job.rate_mash,
- TaxRate: null,
- StorageRateperDay: null,
- DaysStored: null,
- },
- EstimateTotals: {
- BodyHours: null,
- RefinishHours: null,
- MechanicalHours: null,
- StructuralHours: null,
- PartsTotal: null,
- PartsOEM: null,
- PartsAM: null,
- PartsReconditioned: null,
- PartsRecycled: null,
- PartsOther: null,
- SubletTotal: null,
- BodyLaborTotal: null,
- RefinishLaborTotal: null,
- MechanicalLaborTotal: null,
- StructuralLaborTotal: null,
- MiscellaneousChargeTotal: null,
- PMTotal: null,
- BMTotal: null,
- MiscTotal: null,
- TowingTotal: null,
- StorageTotal: null,
- DetailTotal: null,
- SalesTaxTotal: null,
- GrossTotal: null,
- DeductibleTotal: null,
- DepreciationTotal: null,
- Discount: null,
- CustomerPay: null,
- InsurancePay: null,
- Deposit: null,
- AmountDue: null,
- },
- SupplementTotals: {
- BodyHours: null,
- RefinishHours: null,
- MechanicalHours: null,
- StructuralHours: null,
- PartsTotal: null,
- PartsOEM: null,
- PartsAM: null,
- PartsReconditioned: null,
- PartsRecycled: null,
- PartsOther: null,
- SubletTotal: null,
- BodyLaborTotal: null,
- RefinishLaborTotal: null,
- MechanicalLaborTotal: null,
- StructuralLaborTotal: null,
- MiscellaneousChargeTotal: null,
- PMTotal: null,
- BMTotal: null,
- MiscTotal: null,
- TowingTotal: null,
- StorageTotal: null,
- DetailTotal: null,
- SalesTaxTotal: null,
- GrossTotal: null,
- DeductibleTotal: null,
- DepreciationTotal: null,
- Discount: null,
- CustomerPay: null,
- InsurancePay: null,
- Deposit: null,
- AmountDue: null,
- },
- RevisedTotals: {
- BodyHours: "10.10",
- RefinishHours: "4.70",
- MechanicalHours: "2.90",
- StructuralHours: null,
- PartsTotal: "2630.24",
- PartsTotalCost: "1655.67",
- PartsOEM: "969.49",
- PartsOEMCost: "761.91",
- PartsAM: "1660.75",
- PartsAMCost: "893.76",
- PartsReconditioned: null,
- PartsReconditionedCost: null,
- PartsRecycled: null,
- PartsRecycledCost: null,
- PartsOther: null,
- PartsOtherCost: null,
- SubletTotal: "139.95",
- SubletTotalCost: "0.00",
- BodyLaborTotal: "642.46",
- BodyLaborTotalCost: "0.00",
- RefinishLaborTotal: "298.97",
- RefinishLaborTotalCost: "0.00",
- MechanicalLaborTotal: "276.69",
- MechanicalLaborTotalCost: "0.00",
- StructuralLaborTotal: null,
- StructuralLaborTotalCost: null,
- MiscellaneousChargeTotal: null,
- MiscellaneousChargeTotalCost: null,
- PMTotal: "159.42",
- PMTotalCost: "0.00",
- BMTotal: "40.30",
- BMTotalCost: "36.27",
- MiscTotal: "60.00",
- MiscTotalCost: "9.00",
- TowingTotal: null,
- TowingTotalCost: null,
- StorageTotal: null,
- StorageTotalCost: null,
- DetailTotal: null,
- DetailTotalCost: null,
- SalesTaxTotal: "552.24",
- SalesTaxTotalCost: null,
- GrossTotal: "4800.27",
- DeductibleTotal: "500.00",
- DepreciationTotal: "0.00",
- Discount: "0",
- CustomerPay: "500.00",
- InsurancePay: "4300.27",
- Deposit: null,
- AmountDue: "4800.27",
- },
- Misc: {
- ProductionStatus: null,
- StatusDescription: null,
- Hub50Comment: null,
- DateofChange: null,
- BodyTechName: null,
- TotalLossYN: null,
- InsScreenCommentsLine1: null,
- InsScreenCommentsLine2: null,
- AssignmentCaller: null,
- AssignmentDivision: null,
- LocationofPrimaryImpact: "12",
- LocationofSecondaryImpact: null,
- PaintTechID: null,
- PaintTechName: null,
- ImportType: null,
- ImportFile: null,
- GSTTax: null,
- RepairDelayStatusCode: null,
- RepairDelaycomment: null,
- AgentMktgID: null,
- AgentCity: null,
- Picture1: null,
- Picture2: null,
- ExtNoteDate: null,
- RentalOrdDate: null,
- RentalPUDate: null,
- RentalDueDate: null,
- RentalActRetDate: null,
- RentalCompanyID: null,
- CSIID: null,
- InsGroupCode: null,
- },
-
- DetailLines: {
- DetailLine: job.joblines.map((jl) =>
- GenerateDetailLines(jl, job.bodyshop.md_order_statuses)
+ AutoHouseExport: {
+ RepairOrder: jobs.map((j) =>
+ CreateRepairOrderTag(j, (job, error) => {
+ erroredJobs.push({ job, error });
+ })
),
},
};
- return ret;
+ console.log("***Number of Failed jobs***: ", erroredJobs.length);
+ var ret = builder
+ .create(autoHouseObject, {
+ version: "1.0",
+ encoding: "UTF-8",
+ })
+ .end({ pretty: true });
+
+ //***TODO Change filing naming when creating the cron job. IM_ShopInternalName_DDMMYYYY_HHMMSS.xml
+ res.type("application/xml");
+ //res.sendFile(ret);
+ res.send(ret);
+};
+
+const CreateRepairOrderTag = (job, errorCallback) => {
+ //Level 2
+
+ try {
+ const ret = {
+ RepairOrderInformation: {
+ ShopInternalName: job.bodyshop.autohouseid,
+ ID: job.id,
+ RO: job.ro_number,
+ Est: job.id, //We no longer use estimate id.
+ GUID: job.id,
+ TransType: StatusMapping(job.status, job.bodyshop.md_ro_statuses),
+ ShopName: job.bodyshop.shopname,
+ ShopAddress: job.bodyshop.address1,
+ ShopCity: job.bodyshop.city,
+ ShopState: job.bodyshop.state,
+ ShopZip: job.bodyshop.zip_post,
+ ShopPhone: job.bodyshop.phone,
+ EstimatorID: `${job.est_ct_fn} ${job.est_ct_ln}`,
+ EstimatorName: `${job.est_ct_fn} ${job.est_ct_ln}`,
+ },
+ CustomerInformation: {
+ FirstName: job.ownr_fn,
+ LastName: job.ownr_ln,
+ Street: job.ownr_addr1,
+ City: job.ownr_city,
+ State: job.ownr_st,
+ Zip: job.ownr_zip,
+ Phone1: job.ownr_ph1,
+ Phone2: null,
+ Phone2Extension: null,
+ Phone3: null,
+ Phone3Extension: null,
+ FileComments: null,
+ Source: null,
+ Email: job.ownr_ea,
+ RetWhsl: null,
+ Cat: null,
+ InsuredorClaimantFlag: null,
+ },
+ VehicleInformation: {
+ Year: job.v_model_yr,
+ Make: job.v_make_desc,
+ Model: job.v_model_desc,
+ VIN: job.v_vin,
+ License: job.plate_no,
+ MileageIn: job.kmin,
+ Vehiclecolor: job.v_color,
+ VehicleProductionDate: null,
+ VehiclePaintCode: null,
+ VehicleTrimCode: null,
+ VehicleBodyStyle: null,
+ DriveableFlag: job.tlos_ind ? "Y" : "N",
+ },
+
+ InsuranceInformation: {
+ InsuranceCo: job.ins_co_nm,
+ CompanyName: job.ins_co_nm,
+ Address: job.ins_addr1,
+ City: job.ins_addr1,
+ State: job.ins_city,
+ Zip: job.ins_zip,
+ Phone: job.ins_ph1,
+ Fax: null,
+ ClaimType: null,
+ LossType: null,
+ Policy: null,
+ Claim: job.clm_no,
+ InsuredLastName: null,
+ InsuredFirstName: null,
+ ClaimantLastName: null,
+ ClaimantFirstName: null,
+ Assignment: null,
+ InsuranceAgentLastName: null,
+ InsuranceAgentFirstName: null,
+ InsAgentPhone: null,
+ InsideAdjuster: null,
+ OutsideAdjuster: null,
+ },
+ Dates: {
+ DateofLoss: job.loss_date && moment(job.loss_date).format(AhDateFormat),
+ InitialCustomerContactDate: null,
+ FirstFollowUpDate: null,
+ ReferralDate: null,
+ EstimateAppointmentDate: null,
+ SecondFollowUpDate: null,
+ AssignedDate: null,
+ EstComplete: null,
+ CustomerAuthorizationDate: null,
+ InsuranceAuthorizationDate: null,
+ DateOpened: job.date_open && moment(job.date_open).format(AhDateFormat),
+ ScheduledArrivalDate:
+ job.scheduled_in && moment(job.scheduled_in).format(AhDateFormat),
+ CarinShop: job.actual_in && moment(job.actual_in).format(AhDateFormat),
+ InsInspDate: null,
+ StartDate: null,
+ PartsOrder: null,
+ TeardownHold: null,
+ SupplementSubmittedDate: null,
+ SupplementApprovedDate: null,
+ AssntoBody: null,
+ AssntoMech: null,
+ AssntoPaint: null,
+ AssntoDetail: null,
+ PromiseDate:
+ job.scheduled_completion &&
+ moment(job.scheduled_completion).format(AhDateFormat),
+ InsuranceTargetOut: null,
+ CarComplete:
+ job.actual_completion &&
+ moment(job.actual_completion).format(AhDateFormat),
+ DeliveryAppointmentDate:
+ job.scheduled_delivery &&
+ moment(job.scheduled_delivery).format(AhDateFormat),
+ DateClosed:
+ job.date_invoiced && moment(job.date_invoiced).format(AhDateFormat),
+ CustomerPaidInFullDate: null,
+ InsurancePaidInFullDate: null,
+ CustPickup:
+ job.actual_delivery &&
+ moment(job.actual_delivery).format(AhDateFormat),
+ AccountPostedDate:
+ job.date_exported && moment(job.date_exported).format(AhDateFormat),
+ CSIProcessedDate: null,
+ ThankYouLetterSent: null,
+ AdditionalFollowUpDate: null,
+ },
+ Rates: {
+ BodyRate: job.rate_lab,
+ RefinishRate: job.rate_lar,
+ MechanicalRate: job.rate_lam,
+ StructuralRate: job.rate_las,
+ PMRate: job.rate_mapa,
+ BMRate: job.rate_mash,
+ TaxRate: null,
+ StorageRateperDay: null,
+ DaysStored: null,
+ },
+ EstimateTotals: {
+ BodyHours: null,
+ RefinishHours: null,
+ MechanicalHours: null,
+ StructuralHours: null,
+ PartsTotal: null,
+ PartsOEM: null,
+ PartsAM: null,
+ PartsReconditioned: null,
+ PartsRecycled: null,
+ PartsOther: null,
+ SubletTotal: null,
+ BodyLaborTotal: null,
+ RefinishLaborTotal: null,
+ MechanicalLaborTotal: null,
+ StructuralLaborTotal: null,
+ MiscellaneousChargeTotal: null,
+ PMTotal: null,
+ BMTotal: null,
+ MiscTotal: null,
+ TowingTotal: null,
+ StorageTotal: null,
+ DetailTotal: null,
+ SalesTaxTotal: null,
+ GrossTotal: null,
+ DeductibleTotal: null,
+ DepreciationTotal: null,
+ Discount: null,
+ CustomerPay: null,
+ InsurancePay: null,
+ Deposit: null,
+ AmountDue: null,
+ },
+ SupplementTotals: {
+ BodyHours: null,
+ RefinishHours: null,
+ MechanicalHours: null,
+ StructuralHours: null,
+ PartsTotal: null,
+ PartsOEM: null,
+ PartsAM: null,
+ PartsReconditioned: null,
+ PartsRecycled: null,
+ PartsOther: null,
+ SubletTotal: null,
+ BodyLaborTotal: null,
+ RefinishLaborTotal: null,
+ MechanicalLaborTotal: null,
+ StructuralLaborTotal: null,
+ MiscellaneousChargeTotal: null,
+ PMTotal: null,
+ BMTotal: null,
+ MiscTotal: null,
+ TowingTotal: null,
+ StorageTotal: null,
+ DetailTotal: null,
+ SalesTaxTotal: null,
+ GrossTotal: null,
+ DeductibleTotal: null,
+ DepreciationTotal: null,
+ Discount: null,
+ CustomerPay: null,
+ InsurancePay: null,
+ Deposit: null,
+ AmountDue: null,
+ },
+ RevisedTotals: {
+ BodyHours: job.job_totals.rates.lab.hours,
+ RefinishHours: job.job_totals.rates.lar.hours,
+ MechanicalHours: job.job_totals.rates.lam.hours,
+ StructuralHours: job.job_totals.rates.las.hours,
+ PartsTotal: Dinero(job.job_totals.parts.parts.total).toFormat(
+ AHDineroFormat
+ ),
+ PartsTotalCost: 0,
+ PartsOEM: Dinero(
+ job.job_totals.parts.parts.list.PAN &&
+ job.job_totals.parts.parts.list.PAN.total
+ ).toFormat(AHDineroFormat),
+ PartsOEMCost: 0,
+ PartsAM: Dinero(
+ job.job_totals.parts.parts.list.PAA &&
+ job.job_totals.parts.parts.list.PAA.total
+ ).toFormat(AHDineroFormat),
+ PartsAMCost: 0,
+ PartsReconditioned: null,
+ PartsReconditionedCost: null,
+ PartsRecycled: Dinero(
+ job.job_totals.parts.parts.list.PAR &&
+ job.job_totals.parts.parts.list.PAR.total
+ ).toFormat(AHDineroFormat),
+ PartsRecycledCost: null,
+ PartsOther: Dinero(
+ job.job_totals.parts.parts.list.PAO &&
+ job.job_totals.parts.parts.list.PAO.total
+ ).toFormat(AHDineroFormat),
+ PartsOtherCost: null,
+ SubletTotal: Dinero(job.job_totals.parts.sublets.total).toFormat(
+ AHDineroFormat
+ ),
+ SubletTotalCost: 0,
+ BodyLaborTotal: Dinero(job.job_totals.rates.lab.total).toFormat(
+ AHDineroFormat
+ ),
+ BodyLaborTotalCost: 0,
+ RefinishLaborTotal: Dinero(job.job_totals.rates.lar.total).toFormat(
+ AHDineroFormat
+ ),
+ RefinishLaborTotalCost: 0,
+ MechanicalLaborTotal: Dinero(job.job_totals.rates.lam.total).toFormat(
+ AHDineroFormat
+ ),
+ MechanicalLaborTotalCost: 0,
+ StructuralLaborTotal: Dinero(job.job_totals.rates.las.total).toFormat(
+ AHDineroFormat
+ ),
+ StructuralLaborTotalCost: null,
+ MiscellaneousChargeTotal: null,
+ MiscellaneousChargeTotalCost: null,
+ PMTotal: Dinero(job.job_totals.rates.mapa.total).toFormat(
+ AHDineroFormat
+ ),
+ PMTotalCost: 0,
+ BMTotal: Dinero(job.job_totals.rates.mash.total).toFormat(
+ AHDineroFormat
+ ),
+ BMTotalCost: 0,
+ MiscTotal: 0,
+ MiscTotalCost: 0,
+ TowingTotal: Dinero(job.job_totals.additional.towing).toFormat(
+ AHDineroFormat
+ ),
+ TowingTotalCost: null,
+ StorageTotal: Dinero(job.job_totals.additional.storage).toFormat(
+ AHDineroFormat
+ ),
+ StorageTotalCost: null,
+ DetailTotal: null,
+ DetailTotalCost: null,
+ SalesTaxTotal: Dinero(job.job_totals.totals.local_tax)
+ .add(Dinero(job.job_totals.totals.state_tax))
+ .add(Dinero(job.job_totals.totals.federal_tax))
+ .toFormat(AHDineroFormat),
+ SalesTaxTotalCost: null,
+ GrossTotal: Dinero(job.job_totals.totals.net_repairs).toFormat(
+ AHDineroFormat
+ ),
+ DeductibleTotal: job.ded_amt,
+ DepreciationTotal: Dinero(
+ job.job_totals.totals.custPayable.dep_taxes
+ ).toFormat(AHDineroFormat),
+ Discount: Dinero(job.job_totals.additional.adjustments).toFormat(
+ AHDineroFormat
+ ),
+ CustomerPay: Dinero(job.job_totals.totals.custPayable.total).toFormat(
+ AHDineroFormat
+ ),
+ InsurancePay: 0,
+ Deposit: 0,
+ AmountDue: 0,
+ },
+ Misc: {
+ ProductionStatus: null,
+ StatusDescription: null,
+ Hub50Comment: null,
+ DateofChange: null,
+ BodyTechName: null,
+ TotalLossYN: null,
+ InsScreenCommentsLine1: null,
+ InsScreenCommentsLine2: null,
+ AssignmentCaller: null,
+ AssignmentDivision: null,
+ LocationofPrimaryImpact: "12",
+ LocationofSecondaryImpact: null,
+ PaintTechID: null,
+ PaintTechName: null,
+ ImportType: null,
+ ImportFile: null,
+ GSTTax: null,
+ RepairDelayStatusCode: null,
+ RepairDelaycomment: null,
+ AgentMktgID: null,
+ AgentCity: null,
+ Picture1: null,
+ Picture2: null,
+ ExtNoteDate: null,
+ RentalOrdDate: null,
+ RentalPUDate: null,
+ RentalDueDate: null,
+ RentalActRetDate: null,
+ RentalCompanyID: null,
+ CSIID: null,
+ InsGroupCode: null,
+ },
+
+ DetailLines: {
+ DetailLine:
+ job.joblines.length > 0
+ ? job.joblines.map((jl) =>
+ GenerateDetailLines(jl, job.bodyshop.md_order_statuses)
+ )
+ : [generateNullDetailLine()],
+ },
+ };
+ return ret;
+ } catch (error) {
+ errorCallback(job, error);
+ }
};
const StatusMapping = (status, md_ro_statuses) => {
@@ -367,7 +428,7 @@ const GenerateDetailLines = (line, statuses) => {
line.billlines[0] &&
(line.billlines[0].actual_cost * line.billlines[0].quantity).toFixed(2),
Critical: null,
- Description: line.desc,
+ Description: line.line_desc,
DiscountMarkup: null,
InvoiceNumber: line.billlines[0] && line.billlines[0].bill.invoice_number,
IOUPart: null,
@@ -377,7 +438,7 @@ const GenerateDetailLines = (line, statuses) => {
OriginalCost: null,
OriginalInvoiceNumber: null,
PriceEach: line.billlines[0] && line.billlines[0].actual_cost,
- PartNumber: line.oem_partno,
+ PartNumber: _.escape(line.oem_partno),
ProfitPercent: null,
PurchaseOrderNumber: null,
Qty: line.part_qty,
@@ -397,3 +458,38 @@ const GenerateDetailLines = (line, statuses) => {
};
return ret;
};
+
+const generateNullDetailLine = () => {
+ return {
+ BackOrdered: "0",
+ Cost: 0,
+ Critical: null,
+ Description: "No Lines on Estimate",
+ DiscountMarkup: null,
+ InvoiceNumber: null,
+ IOUPart: null,
+ LineNumber: 0,
+ MarkUp: null,
+ OrderedOn: null,
+ OriginalCost: null,
+ OriginalInvoiceNumber: null,
+ PriceEach: 0,
+ PartNumber: 0,
+ ProfitPercent: null,
+ PurchaseOrderNumber: null,
+ Qty: 0,
+ Status: null,
+ SupplementNumber: null,
+ Type: null,
+ Vendor: null,
+ VendorPaid: null,
+ VendorPrice: null,
+ Deleted: null,
+ ExpectedOn: null,
+ ReceivedOn: null,
+ OrderedBy: null,
+ ShipVia: null,
+ VendorContact: null,
+ EstimateAmount: null,
+ };
+};