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