IO-586 Resolve CSI texting issues.
This commit is contained in:
@@ -10759,6 +10759,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>copylink</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>
|
<concept_node>
|
||||||
<name>create</name>
|
<name>create</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -14292,6 +14313,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>generatecsi</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>
|
<concept_node>
|
||||||
<name>gotojob</name>
|
<name>gotojob</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -21932,6 +21974,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>rescueme</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>
|
<concept_node>
|
||||||
<name>schedule</name>
|
<name>schedule</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ export function ChatMediaSelector({
|
|||||||
conversation,
|
conversation,
|
||||||
}) {
|
}) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
console.log("conversation", conversation);
|
|
||||||
const { loading, error, data } = useQuery(GET_DOCUMENTS_BY_JOB, {
|
const { loading, error, data } = useQuery(GET_DOCUMENTS_BY_JOB, {
|
||||||
variables: {
|
variables: {
|
||||||
jobId:
|
jobId:
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ export function JobsDetailHeaderCsi({
|
|||||||
logImEXEvent("job_create_csi");
|
logImEXEvent("job_create_csi");
|
||||||
|
|
||||||
//Is tehre already a CSI?
|
//Is tehre already a CSI?
|
||||||
if (job.csi_invites.length === 0) {
|
if (!job.csiinvites || job.csiinvites.length === 0) {
|
||||||
const questionSetResult = await client.query({
|
const questionSetResult = await client.query({
|
||||||
query: GET_CURRENT_QUESTIONSET_ID,
|
query: GET_CURRENT_QUESTIONSET_ID,
|
||||||
});
|
});
|
||||||
@@ -110,10 +110,10 @@ export function JobsDetailHeaderCsi({
|
|||||||
if (e.key === "text") {
|
if (e.key === "text") {
|
||||||
const p = parsePhoneNumber(job.ownr_ph1, "CA");
|
const p = parsePhoneNumber(job.ownr_ph1, "CA");
|
||||||
if (p && p.isValid()) {
|
if (p && p.isValid()) {
|
||||||
// openChatByPhone({
|
openChatByPhone({
|
||||||
// phone_num: p.formatInternational(),
|
phone_num: p.formatInternational(),
|
||||||
// jobid: job.id,
|
jobid: job.id,
|
||||||
// });
|
});
|
||||||
setMessage(
|
setMessage(
|
||||||
`${window.location.protocol}//${window.location.host}/csi/${result.data.insert_csi.returning[0].id}`
|
`${window.location.protocol}//${window.location.host}/csi/${result.data.insert_csi.returning[0].id}`
|
||||||
);
|
);
|
||||||
@@ -123,6 +123,12 @@ export function JobsDetailHeaderCsi({
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (e.key === "generate") {
|
||||||
|
//copy it to clipboard.
|
||||||
|
navigator.clipboard.writeText(
|
||||||
|
`${window.location.protocol}//${window.location.host}/csi/${result.data.insert_csi.returning[0].id}`
|
||||||
|
);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
notification["error"]({
|
notification["error"]({
|
||||||
message: t("csi.errors.notconfigured"),
|
message: t("csi.errors.notconfigured"),
|
||||||
@@ -138,7 +144,7 @@ export function JobsDetailHeaderCsi({
|
|||||||
template: {
|
template: {
|
||||||
name: TemplateList("job").csi_invitation.key,
|
name: TemplateList("job").csi_invitation.key,
|
||||||
variables: {
|
variables: {
|
||||||
id: job.csi_invites[0].id,
|
id: job.csiinvites[0].id,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@@ -146,12 +152,12 @@ export function JobsDetailHeaderCsi({
|
|||||||
if (e.key === "text") {
|
if (e.key === "text") {
|
||||||
const p = parsePhoneNumber(job.ownr_ph1, "CA");
|
const p = parsePhoneNumber(job.ownr_ph1, "CA");
|
||||||
if (p && p.isValid()) {
|
if (p && p.isValid()) {
|
||||||
// openChatByPhone({
|
openChatByPhone({
|
||||||
// phone_num: p.formatInternational(),
|
phone_num: p.formatInternational(),
|
||||||
// jobid: job.id,
|
jobid: job.id,
|
||||||
// });
|
});
|
||||||
setMessage(
|
setMessage(
|
||||||
`${window.location.protocol}//${window.location.host}/csi/${job.csi_invites[0].id}`
|
`${window.location.protocol}//${window.location.host}/csi/${job.csiinvites[0].id}`
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
notification["error"]({
|
notification["error"]({
|
||||||
@@ -159,6 +165,13 @@ export function JobsDetailHeaderCsi({
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (e.key === "generate") {
|
||||||
|
//copy it to clipboard.
|
||||||
|
navigator.clipboard.writeText(
|
||||||
|
`${window.location.protocol}//${window.location.host}/csi/${job.csiinvites[0].id}`
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -178,6 +191,13 @@ export function JobsDetailHeaderCsi({
|
|||||||
>
|
>
|
||||||
{t("general.labels.text")}
|
{t("general.labels.text")}
|
||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
|
<Menu.Item
|
||||||
|
onClick={handleCreateCsi}
|
||||||
|
key="generate"
|
||||||
|
disabled={job.csiinvites && job.csiinvites.length > 0}
|
||||||
|
>
|
||||||
|
{t("jobs.actions.generatecsi")}
|
||||||
|
</Menu.Item>
|
||||||
<Menu.Divider />
|
<Menu.Divider />
|
||||||
{job.csiinvites.map((item, idx) => {
|
{job.csiinvites.map((item, idx) => {
|
||||||
return item.completedon ? (
|
return item.completedon ? (
|
||||||
|
|||||||
@@ -707,6 +707,7 @@
|
|||||||
"calculate": "Calculate",
|
"calculate": "Calculate",
|
||||||
"cancel": "Cancel",
|
"cancel": "Cancel",
|
||||||
"close": "Close",
|
"close": "Close",
|
||||||
|
"copylink": "Copy Link",
|
||||||
"create": "Create",
|
"create": "Create",
|
||||||
"delete": "Delete",
|
"delete": "Delete",
|
||||||
"deleteall": "Delete All",
|
"deleteall": "Delete All",
|
||||||
@@ -914,6 +915,7 @@
|
|||||||
"export": "Export",
|
"export": "Export",
|
||||||
"exportselected": "Export Selected",
|
"exportselected": "Export Selected",
|
||||||
"filterpartsonly": "Filter Parts Only",
|
"filterpartsonly": "Filter Parts Only",
|
||||||
|
"generatecsi": "Generate CSI & Copy Link",
|
||||||
"gotojob": "Go to Job",
|
"gotojob": "Go to Job",
|
||||||
"intake": "Intake",
|
"intake": "Intake",
|
||||||
"manualnew": "Create New Job Manually",
|
"manualnew": "Create New Job Manually",
|
||||||
@@ -1306,6 +1308,7 @@
|
|||||||
"productionlist": "Production Board - List",
|
"productionlist": "Production Board - List",
|
||||||
"recent": "Recent Items",
|
"recent": "Recent Items",
|
||||||
"reportcenter": "Report Center",
|
"reportcenter": "Report Center",
|
||||||
|
"rescueme": "Rescue me!",
|
||||||
"schedule": "Schedule",
|
"schedule": "Schedule",
|
||||||
"scoreboard": "Scoreboard",
|
"scoreboard": "Scoreboard",
|
||||||
"search": {
|
"search": {
|
||||||
|
|||||||
@@ -707,6 +707,7 @@
|
|||||||
"calculate": "",
|
"calculate": "",
|
||||||
"cancel": "",
|
"cancel": "",
|
||||||
"close": "",
|
"close": "",
|
||||||
|
"copylink": "",
|
||||||
"create": "",
|
"create": "",
|
||||||
"delete": "Borrar",
|
"delete": "Borrar",
|
||||||
"deleteall": "",
|
"deleteall": "",
|
||||||
@@ -914,6 +915,7 @@
|
|||||||
"export": "",
|
"export": "",
|
||||||
"exportselected": "",
|
"exportselected": "",
|
||||||
"filterpartsonly": "",
|
"filterpartsonly": "",
|
||||||
|
"generatecsi": "",
|
||||||
"gotojob": "",
|
"gotojob": "",
|
||||||
"intake": "",
|
"intake": "",
|
||||||
"manualnew": "",
|
"manualnew": "",
|
||||||
@@ -1306,6 +1308,7 @@
|
|||||||
"productionlist": "",
|
"productionlist": "",
|
||||||
"recent": "",
|
"recent": "",
|
||||||
"reportcenter": "",
|
"reportcenter": "",
|
||||||
|
"rescueme": "",
|
||||||
"schedule": "Programar",
|
"schedule": "Programar",
|
||||||
"scoreboard": "",
|
"scoreboard": "",
|
||||||
"search": {
|
"search": {
|
||||||
|
|||||||
@@ -707,6 +707,7 @@
|
|||||||
"calculate": "",
|
"calculate": "",
|
||||||
"cancel": "",
|
"cancel": "",
|
||||||
"close": "",
|
"close": "",
|
||||||
|
"copylink": "",
|
||||||
"create": "",
|
"create": "",
|
||||||
"delete": "Effacer",
|
"delete": "Effacer",
|
||||||
"deleteall": "",
|
"deleteall": "",
|
||||||
@@ -914,6 +915,7 @@
|
|||||||
"export": "",
|
"export": "",
|
||||||
"exportselected": "",
|
"exportselected": "",
|
||||||
"filterpartsonly": "",
|
"filterpartsonly": "",
|
||||||
|
"generatecsi": "",
|
||||||
"gotojob": "",
|
"gotojob": "",
|
||||||
"intake": "",
|
"intake": "",
|
||||||
"manualnew": "",
|
"manualnew": "",
|
||||||
@@ -1306,6 +1308,7 @@
|
|||||||
"productionlist": "",
|
"productionlist": "",
|
||||||
"recent": "",
|
"recent": "",
|
||||||
"reportcenter": "",
|
"reportcenter": "",
|
||||||
|
"rescueme": "",
|
||||||
"schedule": "Programme",
|
"schedule": "Programme",
|
||||||
"scoreboard": "",
|
"scoreboard": "",
|
||||||
"search": {
|
"search": {
|
||||||
|
|||||||
Reference in New Issue
Block a user