From 9fff937209a6ff2e655cbc38df28742620bc89ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=98=D0=BB=D1=8C=D1=8F=D1=81=20=D0=A1=D1=83=D0=BB=D1=82?= =?UTF-8?q?=D0=B0=D0=BD=D0=BE=D0=B2?= Date: Mon, 20 Jul 2026 11:32:26 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20=D0=B3=D0=BE=D1=80=D0=B8=D0=B7=D0=BE?= =?UTF-8?q?=D0=BD=D1=82=D0=B0=D0=BB=D1=8C=D0=BD=D0=B0=D1=8F=20=D1=80=D0=B0?= =?UTF-8?q?=D1=81=D0=BA=D0=BB=D0=B0=D0=B4=D0=BA=D0=B0=20GeoField/ContactFi?= =?UTF-8?q?eld=20=D0=B8=20=D1=83=D0=B1=D1=80=D0=B0=D0=BD=20max-width=20?= =?UTF-8?q?=D1=83=20=D0=BE=D0=B1=D1=91=D1=80=D1=82=D0=BE=D0=BA=20=D0=B2=20?= =?UTF-8?q?TaskDetail?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/components/ContactField.tsx | 164 ++++++++++++++----------- client/src/components/GeoField.tsx | 11 +- client/src/pages/TaskDetail.tsx | 12 +- 3 files changed, 101 insertions(+), 86 deletions(-) diff --git a/client/src/components/ContactField.tsx b/client/src/components/ContactField.tsx index fda68a3..faebf80 100644 --- a/client/src/components/ContactField.tsx +++ b/client/src/components/ContactField.tsx @@ -93,107 +93,121 @@ export default function ContactField({ value, onChange, disabled = false }: Cont }; return ( -
-
- +
+
+ {/* ФИО */} handleNameChange(e.target.value)} disabled={disabled} - placeholder="Иванов И.И." - className="h-8" + placeholder="ФИО (Иванов И.И.)" + className="h-8 flex-1 min-w-[140px]" /> -
-
- + {/* Должность */} handlePositionChange(e.target.value)} disabled={disabled} - placeholder="Директор" - className="h-8" + placeholder="Должность (Директор)" + className="h-8 flex-1 min-w-[140px]" /> -
- -
- -
- {phones.map((phone, idx) => ( -
- changePhone(idx, e.target.value)} - disabled={disabled} - placeholder="+7 (999) 123-45-67" - className="h-8 flex-1" - /> - {phones.length > 1 && ( - - )} -
- ))} + {/* Телефон — первый + кнопка добавить */} +
+ changePhone(0, e.target.value)} + disabled={disabled} + placeholder="Телефон +7 (999) 123-45-67" + className="h-8 flex-1 min-w-0" + /> +
+ {/* Email — первый + кнопка добавить */} +
+ changeEmail(0, e.target.value)} + disabled={disabled} + placeholder="Email ivan@example.com" + className="h-8 flex-1 min-w-0" + /> +
-
- -
- {emails.map((email, idx) => ( -
+ {/* Дополнительные телефоны (если есть) */} + {phones.length > 1 && ( +
+ {phones.slice(1).map((phone, idx) => ( +
changeEmail(idx, e.target.value)} + value={phone} + onChange={(e) => changePhone(idx + 1, e.target.value)} disabled={disabled} - placeholder="ivan@example.com" - className="h-8 flex-1" + placeholder="+7 (999) 123-45-67" + className="h-8 flex-1 min-w-0" /> - {emails.length > 1 && ( - - )} +
))} -
-
+ )} + + {/* Дополнительные email (если есть) */} + {emails.length > 1 && ( +
+ {emails.slice(1).map((email, idx) => ( +
+ changeEmail(idx + 1, e.target.value)} + disabled={disabled} + placeholder="ivan@example.com" + className="h-8 flex-1 min-w-0" + /> + +
+ ))} +
+ )}
); } diff --git a/client/src/components/GeoField.tsx b/client/src/components/GeoField.tsx index 4ee6843..a12c76f 100644 --- a/client/src/components/GeoField.tsx +++ b/client/src/components/GeoField.tsx @@ -156,18 +156,18 @@ export default function GeoField({ value, onChange, disabled = false }: GeoField }; return ( -
+
{/* Адрес с подсказками */} -
+
handleAddressChange(e.target.value)} disabled={disabled} - className="pl-9" + className="pl-9 w-full" /> {isLoading && ( @@ -195,18 +195,19 @@ export default function GeoField({ value, onChange, disabled = false }: GeoField {/* Координаты — совмещённое поле */} -
+
handleCoordChange(e.target.value)} disabled={disabled} - className="flex-1 font-mono text-sm" + className="flex-1 font-mono text-sm min-w-0" />