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 отправлены",
|
||||
manual_work: "Нужна ручная работа",
|
||||
ready_to_launch: "Готово к запуску",
|
||||
first_sms_sent: "1-е приглашение отправлено",
|
||||
second_sms_sent: "2-е приглашение отправлено",
|
||||
draft: "Черновик",
|
||||
};
|
||||
|
||||
export const ORDER_GROUP_DISPLAY_STATUS_OPTIONS = [
|
||||
|
|
@ -489,12 +492,16 @@ export const getOrderGroupStatusTone = (group) => {
|
|||
}
|
||||
|
||||
const notificationStatus = group?.notificationStatus || group?.notification_status;
|
||||
const groupStatus = group?.status;
|
||||
if (notificationStatus === "send_failed" || notificationStatus === "manual_required") {
|
||||
return "warning";
|
||||
}
|
||||
if (notificationStatus === "first_sms_sent" || notificationStatus === "second_sms_sent") {
|
||||
return "accent";
|
||||
}
|
||||
if (groupStatus === "first_sms_sent" || groupStatus === "second_sms_sent") {
|
||||
return "accent";
|
||||
}
|
||||
|
||||
if (group.smsSentAt) {
|
||||
return "accent";
|
||||
|
|
|
|||
Loading…
Reference in New Issue