-
- {t("messaging.labels.messaging")}
-
+
+
+ {t("messaging.labels.messaging")}
+
+
+
toggleChatVisible()}
style={{ position: "absolute", right: ".5rem", top: ".5rem" }}
diff --git a/client/src/components/chat-tag-ro/chat-tag-ro.container.jsx b/client/src/components/chat-tag-ro/chat-tag-ro.container.jsx
index 6a84cd2a1..9abdfef20 100644
--- a/client/src/components/chat-tag-ro/chat-tag-ro.container.jsx
+++ b/client/src/components/chat-tag-ro/chat-tag-ro.container.jsx
@@ -20,7 +20,7 @@ export default function ChatTagRoContainer({ conversation }) {
loadRo(v);
};
- const debouncedExecuteSearch = _.debounce(executeSearch, 800);
+ const debouncedExecuteSearch = _.debounce(executeSearch, 500);
const handleSearch = (value) => {
debouncedExecuteSearch({ variables: { search: value } });
diff --git a/client/src/components/job-search-select/job-search-select.component.jsx b/client/src/components/job-search-select/job-search-select.component.jsx
index 1db4244b4..3f239bf01 100644
--- a/client/src/components/job-search-select/job-search-select.component.jsx
+++ b/client/src/components/job-search-select/job-search-select.component.jsx
@@ -23,7 +23,7 @@ const JobSearchSelect = ({ value, onChange, onBlur, disabled }, ref) => {
const executeSearch = (v) => {
callSearch(v);
};
- const debouncedExecuteSearch = _.debounce(executeSearch, 800);
+ const debouncedExecuteSearch = _.debounce(executeSearch, 500);
const handleSearch = (value) => {
debouncedExecuteSearch({ variables: { search: value } });
diff --git a/client/src/components/jobs-change-status/jobs-change-status.component.jsx b/client/src/components/jobs-change-status/jobs-change-status.component.jsx
index 61d35290e..04cba9d62 100644
--- a/client/src/components/jobs-change-status/jobs-change-status.component.jsx
+++ b/client/src/components/jobs-change-status/jobs-change-status.component.jsx
@@ -44,6 +44,9 @@ export function JobsChangeStatus({ job, bodyshop }) {
)
setAvailableStatuses(bodyshop.md_ro_statuses.post_production_statuses);
else {
+ console.log(
+ "Status didn't match any restrictions. Allowing all status changes."
+ );
setAvailableStatuses(bodyshop.statuses);
}
}
diff --git a/client/src/redux/messaging/messaging.sagas.js b/client/src/redux/messaging/messaging.sagas.js
index a63a9e065..8d45112a6 100644
--- a/client/src/redux/messaging/messaging.sagas.js
+++ b/client/src/redux/messaging/messaging.sagas.js
@@ -32,6 +32,7 @@ export function* onOpenChatByPhone() {
export function* openChatByPhone({ payload }) {
logImEXEvent("messaging_open_by_phone");
const { phone_num, jobid } = payload;
+
const bodyshop = yield select(selectBodyshop);
try {
const {
@@ -39,7 +40,9 @@ export function* openChatByPhone({ payload }) {
} = yield client.query({
query: CONVERSATION_ID_BY_PHONE,
variables: { phone: phone(phone_num)[0] },
+ fetchPolicy: "network-only",
});
+
if (conversations.length === 0) {
const {
data: {
@@ -61,13 +64,14 @@ export function* openChatByPhone({ payload }) {
} else if (conversations.length === 1) {
//got the ID. Open it.
yield put(setSelectedConversation(conversations[0].id));
- yield client.mutate({
- mutation: INSERT_CONVERSATION_TAG,
- variables: {
- conversationId: conversations[0].id,
- jobId: jobid,
- },
- });
+ if (jobid)
+ yield client.mutate({
+ mutation: INSERT_CONVERSATION_TAG,
+ variables: {
+ conversationId: conversations[0].id,
+ jobId: jobid,
+ },
+ });
} else {
console.log("ERROR: Multiple conversations found. "); //TODO Graceful handling of this situation
}
diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json
index 5c090b59e..81fd5bf61 100644
--- a/client/src/translations/en_us/common.json
+++ b/client/src/translations/en_us/common.json
@@ -1106,11 +1106,13 @@
},
"messaging": {
"actions": {
- "link": "Link to Job"
+ "link": "Link to Job",
+ "new": "New Conversation"
},
"labels": {
"messaging": "Messaging",
"nojobs": "Not associated to any job.",
+ "phonenumber": "Phone #",
"presets": "Presets",
"typeamessage": "Send a message..."
}
diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json
index 22a63d8f1..fab6b1612 100644
--- a/client/src/translations/es/common.json
+++ b/client/src/translations/es/common.json
@@ -1106,11 +1106,13 @@
},
"messaging": {
"actions": {
- "link": ""
+ "link": "",
+ "new": ""
},
"labels": {
"messaging": "MensajerÃa",
"nojobs": "",
+ "phonenumber": "",
"presets": "",
"typeamessage": "Enviar un mensaje..."
}
diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json
index 9f8aa9083..5aaf6d46d 100644
--- a/client/src/translations/fr/common.json
+++ b/client/src/translations/fr/common.json
@@ -1106,11 +1106,13 @@
},
"messaging": {
"actions": {
- "link": ""
+ "link": "",
+ "new": ""
},
"labels": {
"messaging": "Messagerie",
"nojobs": "",
+ "phonenumber": "",
"presets": "",
"typeamessage": "Envoyer un message..."
}