fix(autocall): сводка показывает последний успешный звонок; текст в сводке переносится вместо обрезки
This commit is contained in:
parent
f378fd05ef
commit
9d1c74eda0
|
|
@ -382,8 +382,12 @@ const StatusSummary = ({ order, smsLogs = [], autocallLogs = [] }) => {
|
||||||
items.push({ icon: "📞", label: "Звонок", value: "не звонили", tone: "muted" });
|
items.push({ icon: "📞", label: "Звонок", value: "не звонили", tone: "muted" });
|
||||||
}
|
}
|
||||||
|
|
||||||
// Автодозвон — итог по последнему звонку робота
|
// Автодозвон — итог: показываем последний УСПЕШНЫЙ звонок (confirmed),
|
||||||
const lastAutocall = autocallLogs && autocallLogs.length > 0 ? autocallLogs[0] : null;
|
// если его не было — последний звонок любым исходом.
|
||||||
|
const confirmedAutocall = autocallLogs?.find((l) =>
|
||||||
|
["confirmed", "confirmed_silent", "confirmed_kept_previous"].includes(l.outcome)
|
||||||
|
);
|
||||||
|
const lastAutocall = confirmedAutocall || (autocallLogs && autocallLogs.length > 0 ? autocallLogs[0] : null);
|
||||||
if (lastAutocall) {
|
if (lastAutocall) {
|
||||||
const acMeta = AUTOCALL_OUTCOME_LABELS[lastAutocall.outcome] || { label: lastAutocall.outcome || "—", tone: "muted" };
|
const acMeta = AUTOCALL_OUTCOME_LABELS[lastAutocall.outcome] || { label: lastAutocall.outcome || "—", tone: "muted" };
|
||||||
const acSlot = autocallSlotText(lastAutocall);
|
const acSlot = autocallSlotText(lastAutocall);
|
||||||
|
|
@ -442,7 +446,7 @@ const StatusSummary = ({ order, smsLogs = [], autocallLogs = [] }) => {
|
||||||
<span className="text-base flex-shrink-0">{item.icon}</span>
|
<span className="text-base flex-shrink-0">{item.icon}</span>
|
||||||
<div className="min-w-0 flex-1">
|
<div className="min-w-0 flex-1">
|
||||||
<p className="text-[11px] font-medium text-[var(--color-text-muted)] leading-tight">{item.label}</p>
|
<p className="text-[11px] font-medium text-[var(--color-text-muted)] leading-tight">{item.label}</p>
|
||||||
<p className={`text-sm font-semibold truncate ${textStyles[item.tone] || textStyles.muted}`}>
|
<p className={`text-sm font-semibold break-words ${textStyles[item.tone] || textStyles.muted}`}>
|
||||||
{item.value}
|
{item.value}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue