Resolve more Phone Lib issues.

This commit is contained in:
Patrick Fic
2021-07-30 10:23:57 -07:00
parent d8e8a8e4e9
commit d3c8b5d731
8 changed files with 47 additions and 7 deletions

View File

@@ -32872,6 +32872,27 @@
<folder_node>
<name>templates</name>
<children>
<concept_node>
<name>anticipated_revenue</name>
<definition_loaded>false</definition_loaded>
<description></description>
<comment></comment>
<default_text></default_text>
<translations>
<translation>
<language>en-US</language>
<approved>false</approved>
</translation>
<translation>
<language>es-MX</language>
<approved>false</approved>
</translation>
<translation>
<language>fr-CA</language>
<approved>false</approved>
</translation>
</translations>
</concept_node>
<concept_node>
<name>attendance_detail</name>
<definition_loaded>false</definition_loaded>

View File

@@ -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 } : {}),
},
},

View File

@@ -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)",

View File

@@ -1982,6 +1982,7 @@
"vendor": ""
},
"templates": {
"anticipated_revenue": "",
"attendance_detail": "",
"attendance_employee": "",
"attendance_summary": "",

View File

@@ -1982,6 +1982,7 @@
"vendor": ""
},
"templates": {
"anticipated_revenue": "",
"attendance_detail": "",
"attendance_employee": "",
"attendance_summary": "",

View File

@@ -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"

View File

@@ -26,7 +26,7 @@ exports.receive = (req, res) => {
client
.request(queries.FIND_BODYSHOP_BY_MESSAGING_SERVICE_SID, {
mssid: req.body.MessagingServiceSid,
phone: phone(req.body.From)[0],
phone: phone(req.body.From).phoneNumber,
})
.then((response) => {
console.log("re", req.body);
@@ -45,7 +45,7 @@ exports.receive = (req, res) => {
newMessage.conversation = {
data: {
bodyshopid: response.bodyshops[0].id,
phone_num: phone(req.body.From)[0],
phone_num: phone(req.body.From).phoneNumber,
},
};
} else if (response.bodyshops[0].conversations.length === 1) {
@@ -80,13 +80,13 @@ exports.receive = (req, res) => {
const uniqueTokens = [...new Set(allTokens)];
var message = {
notification: {
title: `SMS - ${phone(req.body.From)[0]}`,
title: `SMS - ${phone(req.body.From).phoneNumber}`,
body: req.body.Body,
click_action: "TEST CLICK ACTION",
},
data: {
jobid: "1234",
title: `New SMS From ${phone(req.body.From)[0]}`,
title: `New SMS From ${phone(req.body.From).phoneNumber}`,
body: req.body.Body,
},
tokens: uniqueTokens,

View File

@@ -30,7 +30,7 @@ exports.send = (req, res) => {
.create({
body: body,
messagingServiceSid: messagingServiceSid,
to: phone(to)[0],
to: phone(to).phoneNumber,
mediaUrl: selectedMedia.map((i) => i.src),
})
.then((message) => {