From 0ad9bb87156809c94cb42408c194cacf6e280d14 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, 31 Aug 2026 17:02:56 +0300 Subject: [PATCH] =?UTF-8?q?fix(gps):=20=D1=83=D0=B1=D1=80=D0=B0=D0=BD=20?= =?UTF-8?q?=D1=81=D0=BB=D0=BE=D0=B9=20=D0=B4=D0=B5=D1=82=D0=B5=D0=BA=D1=86?= =?UTF-8?q?=D0=B8=D0=B8=20LBS=20=D0=BF=D0=BE=20stale=20re-send=20(=D0=BF?= =?UTF-8?q?=D0=BE=D0=BC=D0=B5=D1=87=D0=B0=D0=BB=20~100%=20=D1=82=D0=BE?= =?UTF-8?q?=D1=87=D0=B5=D0=BA);=20is=5Flbs=20=D1=82=D0=BE=D0=BB=D1=8C?= =?UTF-8?q?=D0=BA=D0=BE=20=D0=BF=D0=BE=20=D0=BF=D1=80=D0=BE=D1=82=D0=BE?= =?UTF-8?q?=D0=BA=D0=BE=D0=BB=D1=8C=D0=BD=D0=BE=D0=BC=D1=83=20=D1=84=D0=BB?= =?UTF-8?q?=D0=B0=D0=B3=D1=83=20valid=3Dfalse=20+=20=D1=84=D0=B8=D0=B7?= =?UTF-8?q?=D0=B8=D0=BA=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/components/CompanyFieldInput.tsx | 4 + client/src/components/ContactField.tsx | 16 ++-- client/src/components/CreateTaskDialog.tsx | 3 +- .../src/components/CreateTaskFormContent.tsx | 91 +++++++++++++++---- client/src/components/GeoField.tsx | 12 ++- client/src/components/RegistryCellEditor.tsx | 8 +- .../src/components/TableFieldMultiSelect.tsx | 7 +- client/src/components/TableFieldSelect.tsx | 7 +- .../components/TableFieldWithSubdirectory.tsx | 6 ++ client/src/components/TaskRegularTable.tsx | 43 ++++----- .../fields/SearchableMultiSelect.tsx | 5 +- .../components/fields/SearchableSelect.tsx | 5 +- client/src/components/fields/field-styles.ts | 27 ++++++ client/src/components/task-form-fields.tsx | 12 ++- client/src/components/ui/table.tsx | 8 +- client/src/pages/TaskDetail.tsx | 21 ++++- server/gps/geozone.service.ts | 27 ++---- 17 files changed, 208 insertions(+), 94 deletions(-) create mode 100644 client/src/components/fields/field-styles.ts diff --git a/client/src/components/CompanyFieldInput.tsx b/client/src/components/CompanyFieldInput.tsx index aa4fd36..b42bcf9 100644 --- a/client/src/components/CompanyFieldInput.tsx +++ b/client/src/components/CompanyFieldInput.tsx @@ -2,6 +2,7 @@ import { useState, useRef, useEffect, useCallback } from "react"; import { Input } from "@/components/ui/input"; import { Popover, PopoverAnchor, PopoverContent } from "@/components/ui/popover"; import { apiRequest } from "@/lib/queryClient"; +import { fieldControlClass, type FieldControlSize } from "@/components/fields/field-styles"; import { Loader2 } from "lucide-react"; export interface DadataCompany { @@ -34,6 +35,7 @@ interface CompanyFieldInputProps { onClear?: () => void; placeholder?: string; disabled?: boolean; + size?: FieldControlSize; } export default function CompanyFieldInput({ @@ -43,6 +45,7 @@ export default function CompanyFieldInput({ onClear, placeholder = "Начните вводить название компании", disabled = false, + size = 'form', }: CompanyFieldInputProps) { const [inputValue, setInputValue] = useState(value); const [suggestions, setSuggestions] = useState([]); @@ -118,6 +121,7 @@ export default function CompanyFieldInput({ onChange={handleInputChange} placeholder={placeholder} disabled={disabled} + className={fieldControlClass(size)} data-testid="input-company-search" /> {isLoading && ( diff --git a/client/src/components/ContactField.tsx b/client/src/components/ContactField.tsx index faebf80..1b609e5 100644 --- a/client/src/components/ContactField.tsx +++ b/client/src/components/ContactField.tsx @@ -1,6 +1,7 @@ import { useState, useEffect } from "react"; import { Input } from "@/components/ui/input"; import { Button } from "@/components/ui/button"; +import { fieldControlClass, type FieldControlSize } from "@/components/fields/field-styles"; import { Plus, X } from "lucide-react"; export interface ContactValue { @@ -14,6 +15,7 @@ interface ContactFieldProps { value: ContactValue | string | null; onChange: (value: ContactValue) => void; disabled?: boolean; + size?: FieldControlSize; } function safeParseContact(value: ContactValue | string | null): ContactValue { @@ -28,7 +30,7 @@ function safeParseContact(value: ContactValue | string | null): ContactValue { return value as ContactValue; } -export default function ContactField({ value, onChange, disabled = false }: ContactFieldProps) { +export default function ContactField({ value, onChange, disabled = false, size = 'form' }: ContactFieldProps) { const parsed = safeParseContact(value); const [name, setName] = useState(parsed.name || ""); const [position, setPosition] = useState(parsed.position || ""); @@ -101,7 +103,7 @@ export default function ContactField({ value, onChange, disabled = false }: Cont onChange={(e) => handleNameChange(e.target.value)} disabled={disabled} placeholder="ФИО (Иванов И.И.)" - className="h-8 flex-1 min-w-[140px]" + className={fieldControlClass(size, 'flex-1 min-w-[140px]')} /> {/* Должность */} handlePositionChange(e.target.value)} disabled={disabled} placeholder="Должность (Директор)" - className="h-8 flex-1 min-w-[140px]" + className={fieldControlClass(size, 'flex-1 min-w-[140px]')} /> {/* Телефон — первый + кнопка добавить */}
@@ -118,7 +120,7 @@ export default function ContactField({ value, onChange, disabled = false }: Cont onChange={(e) => changePhone(0, e.target.value)} disabled={disabled} placeholder="Телефон +7 (999) 123-45-67" - className="h-8 flex-1 min-w-0" + className={fieldControlClass(size, 'flex-1 min-w-0')} />