From cdb64026b29ec8171f9f661e7db91eb3e871471b Mon Sep 17 00:00:00 2001 From: peppa-bot Date: Mon, 23 Nov 2026 05:14:49 +0000 Subject: [PATCH 1/2] =?UTF-8?q?DIK-38:=20=D0=BF=D0=BE=D0=B4=D0=BF=D0=B8?= =?UTF-8?q?=D1=81=D0=B8=20=D0=B3=D0=B0=D0=BB=D0=BE=D1=87=D0=B5=D0=BA=20?= =?UTF-8?q?=D0=B8=20=D0=BF=D0=BE=D0=BB=D0=B5=D0=B9=20=D1=81=D0=B2=D1=8F?= =?UTF-8?q?=D0=B7=D0=B0=D0=BD=D1=8B=20=D1=87=D0=B5=D1=80=D0=B5=D0=B7=20for?= =?UTF-8?q?/id,=20=D0=BF=D0=BE=D0=BB=D0=B5=20=D0=B4=D0=B0=D1=82=D1=8B=20?= =?UTF-8?q?=D0=B1=D0=B5=D0=B7=20=C2=AB=D0=A1=D0=B5=D0=B3=D0=BE=D0=B4=D0=BD?= =?UTF-8?q?=D1=8F=C2=BB=20=D0=B2=20=D0=BD=D0=B0=D0=B7=D0=B2=D0=B0=D0=BD?= =?UTF-8?q?=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- admin/index.html | 10 +++++++-- .../changes/dik-38-label-checkbox/design.md | 5 +++++ .../changes/dik-38-label-checkbox/proposal.md | 10 +++++++++ .../specs/nearby-lunch/spec.md | 21 +++++++++++++++++++ .../changes/dik-38-label-checkbox/tasks.md | 6 ++++++ public/index.html | 2 +- test/server.test.js | 19 +++++++++++++++++ 7 files changed, 70 insertions(+), 3 deletions(-) create mode 100644 openspec/changes/dik-38-label-checkbox/design.md create mode 100644 openspec/changes/dik-38-label-checkbox/proposal.md create mode 100644 openspec/changes/dik-38-label-checkbox/specs/nearby-lunch/spec.md create mode 100644 openspec/changes/dik-38-label-checkbox/tasks.md diff --git a/admin/index.html b/admin/index.html index 5080e52..e825474 100644 --- a/admin/index.html +++ b/admin/index.html @@ -34,7 +34,7 @@ button.s{padding:6px 10px;border:1px solid var(--line);border-radius:10px;backgr

-
+
@@ -58,7 +58,13 @@ const hidden = (r) => ["stale", "expired"].includes(r.status.lunch) || ["stale", const pill = (text, bad) => el("span", "pill " + (bad ? "bad" : "ok"), text); const statusText = (s, none) => ({ none, active: t.admActive, stale: t.admHiddenStale, expired: t.admHiddenExpired })[s]; const fmtSrc = (tpl, src) => tpl.replace("{source}", src); -const field = (label, input) => { const l = el("label", "", label); l.append(input); return l; }; +let fieldN = 0; +// Подпись привязана к полю через for/id; у поля даты рядом кнопка «Сегодня», поэтому поле ищем внутри +const field = (label, input) => { + const ctl = input.matches("input,select,textarea") ? input : input.querySelector("input,select,textarea"); + ctl.id = "f" + ++fieldN; ctl.setAttribute("aria-label", label); + const l = el("label", "", label); l.htmlFor = ctl.id; l.append(input); return l; +}; function card(r) { const c = el("div", "card" + (hidden(r) ? " hidden" : "")); diff --git a/openspec/changes/dik-38-label-checkbox/design.md b/openspec/changes/dik-38-label-checkbox/design.md new file mode 100644 index 0000000..4e89bc7 --- /dev/null +++ b/openspec/changes/dik-38-label-checkbox/design.md @@ -0,0 +1,5 @@ +## Решения +- Районов в продукте нет (DIK-44), поэтому подписывать поле района не нужно. Вместо этого тест проверяет, что такого поля на главной нет. +- Галочка остаётся внутри `