diff --git a/src/components/admin/autocall/AutocallChannelTab.jsx b/src/components/admin/autocall/AutocallChannelTab.jsx index 4571925..9b26481 100644 --- a/src/components/admin/autocall/AutocallChannelTab.jsx +++ b/src/components/admin/autocall/AutocallChannelTab.jsx @@ -12,6 +12,7 @@ import { useAuth } from "../../../context/AuthContext"; import { TestCallPanel } from "./TestCallPanel"; import { AutocallExclusionsPanel } from "./AutocallExclusionsPanel"; import { AutocallLocationsPanel } from "./AutocallLocationsPanel"; +import { autocallSlotText } from "../../orders/autocallSlot"; // ── Кампании звонков ───────────────────────────────────────────────────────── const CAMPAIGNS = [ @@ -33,9 +34,6 @@ const OUTCOME_META = { error: { label: "Ошибка", tone: "danger", icon: "⚠️" }, }; -const DAY_LABEL = { 1: "завтра", 2: "послезавтра" }; -const HALF_LABEL = { 1: "первая половина дня", 2: "вторая половина дня" }; - const fmtTime = (ts) => { if (!ts) return "—"; try { @@ -55,14 +53,9 @@ const fmtPhone = (phone) => { return phone; }; -const slotText = (l) => { - if (!l) return null; - const day = DAY_LABEL[l.dtmf_day]; - const half = HALF_LABEL[l.dtmf_half]; - if (day && half) return `${day}, ${half}`; - if (day) return day; - return null; -}; +// Слот — общей функцией из карточки заказа: она показывает реальную дату, +// а не «завтра» (цифра дня — это первый рабочий день окна, а не завтрашний день). +const slotText = (l) => autocallSlotText(l, null); const SettingField = ({ label, value, onChange, hint }) => (