fix: handle status=first_sms_sent when notification_status=link_ready
n8n workflow writes status='first_sms_sent' but leaves notification_status='link_ready'. Added first_sms_sent/second_sms_sent to ORDER_GROUP_STATUS_LABELS and tone logic.
This commit is contained in:
parent
a55e5857f8
commit
b0370ed03e
|
|
@ -335,6 +335,9 @@ export const ORDER_GROUP_STATUS_LABELS = {
|
||||||
sms_sent: "SMS отправлены",
|
sms_sent: "SMS отправлены",
|
||||||
manual_work: "Нужна ручная работа",
|
manual_work: "Нужна ручная работа",
|
||||||
ready_to_launch: "Готово к запуску",
|
ready_to_launch: "Готово к запуску",
|
||||||
|
first_sms_sent: "1-е приглашение отправлено",
|
||||||
|
second_sms_sent: "2-е приглашение отправлено",
|
||||||
|
draft: "Черновик",
|
||||||
};
|
};
|
||||||
|
|
||||||
export const ORDER_GROUP_DISPLAY_STATUS_OPTIONS = [
|
export const ORDER_GROUP_DISPLAY_STATUS_OPTIONS = [
|
||||||
|
|
@ -489,12 +492,16 @@ export const getOrderGroupStatusTone = (group) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const notificationStatus = group?.notificationStatus || group?.notification_status;
|
const notificationStatus = group?.notificationStatus || group?.notification_status;
|
||||||
|
const groupStatus = group?.status;
|
||||||
if (notificationStatus === "send_failed" || notificationStatus === "manual_required") {
|
if (notificationStatus === "send_failed" || notificationStatus === "manual_required") {
|
||||||
return "warning";
|
return "warning";
|
||||||
}
|
}
|
||||||
if (notificationStatus === "first_sms_sent" || notificationStatus === "second_sms_sent") {
|
if (notificationStatus === "first_sms_sent" || notificationStatus === "second_sms_sent") {
|
||||||
return "accent";
|
return "accent";
|
||||||
}
|
}
|
||||||
|
if (groupStatus === "first_sms_sent" || groupStatus === "second_sms_sent") {
|
||||||
|
return "accent";
|
||||||
|
}
|
||||||
|
|
||||||
if (group.smsSentAt) {
|
if (group.smsSentAt) {
|
||||||
return "accent";
|
return "accent";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue