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" />