diff --git a/web/scripts/test-booking-flow.mjs b/web/scripts/test-booking-flow.mjs index 556c514..12af37c 100644 --- a/web/scripts/test-booking-flow.mjs +++ b/web/scripts/test-booking-flow.mjs @@ -69,6 +69,7 @@ try { assert.equal(container.querySelector('input[type="tel"]'), null); assert.deepEqual(times(), []); assert.match(text(), /Выберите дату или врача/); + assert.equal(container.querySelector('.lead-modal__availability--warning'), null, 'Selection instructions must not look like an unavailable-schedule warning'); assert.deepEqual(await availableDoctorIDs(), ['1','2','3']); await openPicker(); assert.equal(container.querySelectorAll('.doctor-picker__direction').length, 2); @@ -104,6 +105,7 @@ try { assert.equal(pending.length, 3, 'Clearing selection must not request an all-doctors schedule'); await chooseDoctor(3); assert.match(text(), /Свободные окна этого врача сейчас недоступны/); + assert.match(container.querySelector('.lead-modal__availability--warning').textContent, /Свободные окна этого врача сейчас недоступны/, 'The unavailable-schedule message has its own prominent warning style'); assert.deepEqual(times(), []); assert.equal(container.querySelectorAll('.slot-chip--time').length, 0, 'Fallback cannot offer invented times'); assert.ok(container.querySelector('input[type="tel"]')); diff --git a/web/src/components/LeadModal.css b/web/src/components/LeadModal.css index d993889..2aae07b 100644 --- a/web/src/components/LeadModal.css +++ b/web/src/components/LeadModal.css @@ -293,6 +293,15 @@ color: var(--navy); } +.lead-modal__availability--warning { + border: 1px solid #f3a398; + border-left: 4px solid var(--coral); + background: #ffe3df; + color: #92291f; + font-size: 14px; + font-weight: 600; +} + /* Расширяем окно только для реального расписания выбранного врача. */ .lead-modal--wide { width: 920px; diff --git a/web/src/components/LeadModal.jsx b/web/src/components/LeadModal.jsx index 70bde12..23df94a 100644 --- a/web/src/components/LeadModal.jsx +++ b/web/src/components/LeadModal.jsx @@ -292,7 +292,7 @@ export default function LeadModal({ form = 'appointment', doctor, slot, service, ) : (
{form === 'appointment' && ( -

+

Свободные окна этого врача сейчас недоступны для онлайн-записи. Оставьте контакты — администратор уточнит расписание.

)}