Compare commits
No commits in common. "6e2bb80690f13eabe75acb730e28b5e380965267" and "8751fe819b96261f537a9529b9ab6fb9ed217070" have entirely different histories.
6e2bb80690
...
8751fe819b
2 changed files with 6 additions and 25 deletions
|
|
@ -105,9 +105,6 @@ export function EstimateForm({
|
||||||
const [form, setForm] = useState<FormState>(INITIAL);
|
const [form, setForm] = useState<FormState>(INITIAL);
|
||||||
const [touched, setTouched] = useState(false);
|
const [touched, setTouched] = useState(false);
|
||||||
const [mapOpen, setMapOpen] = useState(false);
|
const [mapOpen, setMapOpen] = useState(false);
|
||||||
// CRM-блок свёрнут по умолчанию — экономит ~190px высоты, чтобы форма влезала
|
|
||||||
// на ноутбуки без скролла (поля для менеджера опциональны, открываются по клику).
|
|
||||||
const [crmOpen, setCrmOpen] = useState(false);
|
|
||||||
const valError = validate(form);
|
const valError = validate(form);
|
||||||
const canSubmit = !valError && !isPending && !blocked;
|
const canSubmit = !valError && !isPending && !blocked;
|
||||||
|
|
||||||
|
|
@ -331,24 +328,11 @@ export function EstimateForm({
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* CRM — для менеджера (#395) — сворачиваемый, по умолчанию закрыт */}
|
{/* CRM — для менеджера (#395) */}
|
||||||
<div style={{ borderTop: "1px solid var(--border, #e5e5e5)", paddingTop: 14, marginTop: 4 }}>
|
<div style={{ borderTop: "1px solid var(--border, #e5e5e5)", paddingTop: 14, marginTop: 4 }}>
|
||||||
<button
|
<div style={{ marginBottom: 10, fontSize: 11, fontWeight: 600, color: "var(--muted)", textTransform: "uppercase", letterSpacing: 0.4 }}>
|
||||||
type="button"
|
|
||||||
onClick={() => setCrmOpen((v) => !v)}
|
|
||||||
aria-expanded={crmOpen}
|
|
||||||
style={{ width: "100%", display: "flex", alignItems: "center", gap: 6, marginBottom: crmOpen ? 10 : 0, padding: 0, background: "none", border: "none", cursor: "pointer", fontSize: 11, fontWeight: 600, color: "var(--muted)", textTransform: "uppercase", letterSpacing: 0.4 }}
|
|
||||||
>
|
|
||||||
<svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.4" strokeLinecap="round" strokeLinejoin="round" style={{ transform: crmOpen ? "rotate(90deg)" : "none", transition: "transform .12s" }}>
|
|
||||||
<polyline points="9 6 15 12 9 18" />
|
|
||||||
</svg>
|
|
||||||
CRM — для менеджера
|
CRM — для менеджера
|
||||||
<span style={{ marginLeft: "auto", fontWeight: 400, textTransform: "none", letterSpacing: 0 }}>
|
</div>
|
||||||
{crmOpen ? "скрыть" : "опц."}
|
|
||||||
</span>
|
|
||||||
</button>
|
|
||||||
{crmOpen && (
|
|
||||||
<>
|
|
||||||
<div className="field">
|
<div className="field">
|
||||||
<label className="field-label" htmlFor="ownership">
|
<label className="field-label" htmlFor="ownership">
|
||||||
Тип собственности <span className="hint">опц.</span>
|
Тип собственности <span className="hint">опц.</span>
|
||||||
|
|
@ -399,8 +383,6 @@ export function EstimateForm({
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{touched && valError && (
|
{touched && valError && (
|
||||||
|
|
|
||||||
|
|
@ -267,14 +267,13 @@
|
||||||
letter-spacing: 0.08em;
|
letter-spacing: 0.08em;
|
||||||
}
|
}
|
||||||
.form-body {
|
.form-body {
|
||||||
padding: 14px 18px 6px;
|
padding: 16px 18px 8px;
|
||||||
/* overflow-y:visible — скроллом владеет .form-card целиком (см. выше); вложенный
|
/* overflow-y:visible — скроллом владеет .form-card целиком (см. выше); вложенный
|
||||||
auto-скролл тут не нужен (flex-shrink тела в max-height-контейнере не работал). */
|
auto-скролл тут не нужен (flex-shrink тела в max-height-контейнере не работал). */
|
||||||
overflow-y: visible;
|
overflow-y: visible;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
/* margin-bottom 12→9 — лёгкое уплотнение, чтобы форма помещалась на ноутбуках. */
|
.field { margin-bottom: 12px; }
|
||||||
.field { margin-bottom: 9px; }
|
|
||||||
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
|
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
|
||||||
.field-row.triple { grid-template-columns: 1fr 1fr 1fr; }
|
.field-row.triple { grid-template-columns: 1fr 1fr 1fr; }
|
||||||
label.field-label {
|
label.field-label {
|
||||||
|
|
@ -372,7 +371,7 @@
|
||||||
}
|
}
|
||||||
.file-drop b { color: var(--fg-2); font-weight: 500; }
|
.file-drop b { color: var(--fg-2); font-weight: 500; }
|
||||||
.form-foot {
|
.form-foot {
|
||||||
padding: 10px 18px 12px;
|
padding: 12px 18px 16px;
|
||||||
border-top: 1px solid var(--border);
|
border-top: 1px solid var(--border);
|
||||||
background: linear-gradient(to bottom, transparent, color-mix(in oklch, var(--surface-2) 60%, transparent) 40%);
|
background: linear-gradient(to bottom, transparent, color-mix(in oklch, var(--surface-2) 60%, transparent) 40%);
|
||||||
/* flex-shrink:0 — футер с кнопкой «Оценить» не сжимается при скролле карточки. */
|
/* flex-shrink:0 — футер с кнопкой «Оценить» не сжимается при скролле карточки. */
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue