diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index 22f214543..8adbd10a7 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -32872,6 +32872,27 @@ templates + + anticipated_revenue + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + attendance_detail false diff --git a/client/src/components/report-center-modal/report-center-modal.component.jsx b/client/src/components/report-center-modal/report-center-modal.component.jsx index 75cbf0454..536d5deed 100644 --- a/client/src/components/report-center-modal/report-center-modal.component.jsx +++ b/client/src/components/report-center-modal/report-center-modal.component.jsx @@ -61,8 +61,12 @@ export function ReportCenterModalComponent({ reportCenterModal }) { { name: values.key, variables: { - ...(start ? { start: moment(start).format("YYYY-MM-DD") } : {}), - ...(end ? { end: moment(end).format("YYYY-MM-DD") } : {}), + ...(start + ? { start: moment(start).startOf("day").format("YYYY-MM-DD") } + : {}), + ...(end + ? { end: moment(end).endOf("day").format("YYYY-MM-DD") } + : {}), ...(id ? { id: id } : {}), }, }, diff --git a/client/src/redux/messaging/messaging.sagas.js b/client/src/redux/messaging/messaging.sagas.js index 8a6a9f10e..40b1f6e53 100644 --- a/client/src/redux/messaging/messaging.sagas.js +++ b/client/src/redux/messaging/messaging.sagas.js @@ -39,7 +39,7 @@ export function* openChatByPhone({ payload }) { data: { conversations }, } = yield client.query({ query: CONVERSATION_ID_BY_PHONE, - variables: { phone: phone(phone_num)[0] }, + variables: { phone: phone(phone_num).phoneNumber }, fetchPolicy: "network-only", }); @@ -53,7 +53,7 @@ export function* openChatByPhone({ payload }) { variables: { conversation: [ { - phone_num: phone(phone_num)[0], + phone_num: phone(phone_num).phoneNumber, bodyshopid: bodyshop.id, job_conversations: jobid ? { data: { jobid: jobid } } : null, }, diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json index 517dadfdd..579b39067 100644 --- a/client/src/translations/en_us/common.json +++ b/client/src/translations/en_us/common.json @@ -1982,6 +1982,7 @@ "vendor": "Vendor" }, "templates": { + "anticipated_revenue": "Anticipated Revenue", "attendance_detail": "Attendance (All Employees)", "attendance_employee": "Employee Attendance", "attendance_summary": "Attendance Summary (All Employees)", diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json index 881d830fc..c0a8a2919 100644 --- a/client/src/translations/es/common.json +++ b/client/src/translations/es/common.json @@ -1982,6 +1982,7 @@ "vendor": "" }, "templates": { + "anticipated_revenue": "", "attendance_detail": "", "attendance_employee": "", "attendance_summary": "", diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json index c4a9b0cc5..72f5c96a7 100644 --- a/client/src/translations/fr/common.json +++ b/client/src/translations/fr/common.json @@ -1982,6 +1982,7 @@ "vendor": "" }, "templates": { + "anticipated_revenue": "", "attendance_detail": "", "attendance_employee": "", "attendance_summary": "", diff --git a/client/src/utils/TemplateConstants.js b/client/src/utils/TemplateConstants.js index f3414e33a..6a6f8452d 100644 --- a/client/src/utils/TemplateConstants.js +++ b/client/src/utils/TemplateConstants.js @@ -1238,6 +1238,18 @@ export const TemplateList = (type, context) => { field: i18n.t("scoreboard.fields.date"), }, }, + anticipated_revenue: { + title: i18n.t("reportcenter.templates.anticipated_revenue"), + description: "", + subject: i18n.t("reportcenter.templates.anticipated_revenue"), + key: "anticipated_revenue", + //idtype: "vendor", + disabled: false, + rangeFilter: { + object: i18n.t("reportcenter.labels.objects.jobs"), + field: i18n.t("jobs.fields.scheduled_completion"), // Also date invoice. + }, + }, } : {}), ...(!type || type === "courtesycarcontract"