From a9454912deb2edfccb0d4de8c9eb4706c473f479 Mon Sep 17 00:00:00 2001 From: Bivekich Date: Thu, 24 Jul 2025 13:02:13 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=BB=D1=83=D1=87=D1=88=D0=B5=D0=BD?= =?UTF-8?q?=D0=B0=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BA=D0=B0=20?= =?UTF-8?q?=D0=BD=D0=B0=D0=BB=D0=B8=D1=87=D0=B8=D1=8F=20=D0=B0=D0=B2=D0=B0?= =?UTF-8?q?=D1=82=D0=B0=D1=80=D0=B0=20=D0=B8=20=D1=84=D0=BE=D1=82=D0=BE?= =?UTF-8?q?=D0=B3=D1=80=D0=B0=D1=84=D0=B8=D0=B8=20=D0=BF=D0=B0=D1=81=D0=BF?= =?UTF-8?q?=D0=BE=D1=80=D1=82=D0=B0=20=D0=B2=20=D0=BA=D0=BE=D0=BC=D0=BF?= =?UTF-8?q?=D0=BE=D0=BD=D0=B5=D0=BD=D1=82=D0=B0=D1=85=20EmployeeEditInline?= =?UTF-8?q?Form,=20EmployeeForm=20=D0=B8=20EmployeeInlineForm.=20=D0=94?= =?UTF-8?q?=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D1=8B=20=D1=83=D1=81?= =?UTF-8?q?=D0=BB=D0=BE=D0=B2=D0=B8=D1=8F=20=D0=B4=D0=BB=D1=8F=20=D0=BF?= =?UTF-8?q?=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BA=D0=B8=20=D0=BF=D1=83=D1=81?= =?UTF-8?q?=D1=82=D1=8B=D1=85=20=D1=81=D1=82=D1=80=D0=BE=D0=BA=20=D0=BF?= =?UTF-8?q?=D0=B5=D1=80=D0=B5=D0=B4=20=D0=BE=D1=82=D0=BE=D0=B1=D1=80=D0=B0?= =?UTF-8?q?=D0=B6=D0=B5=D0=BD=D0=B8=D0=B5=D0=BC=20=D0=B8=D0=B7=D0=BE=D0=B1?=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D1=81=D1=82?= =?UTF-8?q?=D0=B2=D0=B8=D0=B8=20=D0=B8=D0=B7=D0=BE=D0=B1=D1=80=D0=B0=D0=B6?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D1=8F,=20=D0=B5=D1=81=D0=BB=D0=B8=20=D0=BE?= =?UTF-8?q?=D0=BD=D0=BE=20=D0=BD=D0=B5=20=D0=B7=D0=B0=D0=B3=D1=80=D1=83?= =?UTF-8?q?=D0=B6=D0=B5=D0=BD=D0=BE.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../employees/employee-edit-inline-form.tsx | 20 ++++++++++--------- src/components/employees/employee-form.tsx | 2 +- .../employees/employee-inline-form.tsx | 20 ++++++++++--------- .../create-consumables-supply-page.tsx | 15 +++++++++++--- src/components/warehouse/product-form.tsx | 6 +++++- 5 files changed, 40 insertions(+), 23 deletions(-) diff --git a/src/components/employees/employee-edit-inline-form.tsx b/src/components/employees/employee-edit-inline-form.tsx index 73551b6..ef09daa 100644 --- a/src/components/employees/employee-edit-inline-form.tsx +++ b/src/components/employees/employee-edit-inline-form.tsx @@ -227,7 +227,7 @@ export function EmployeeEditInlineForm({ employee, onSave, onCancel, isLoading =
- {formData.avatar ? ( + {formData.avatar && formData.avatar.trim() !== '' ? (
- {formData.passportPhoto ? ( + {formData.passportPhoto && formData.passportPhoto.trim() !== '' ? (
Фото паспорта
- Паспорт + {formData.passportPhoto && formData.passportPhoto.trim() !== '' && ( + Паспорт + )}
diff --git a/src/components/employees/employee-form.tsx b/src/components/employees/employee-form.tsx index cd3ebf3..a77fc7b 100644 --- a/src/components/employees/employee-form.tsx +++ b/src/components/employees/employee-form.tsx @@ -351,7 +351,7 @@ export function EmployeeForm({ employee, onSave, onCancel }: EmployeeFormProps)
- {formData.avatar ? ( + {formData.avatar && formData.avatar.trim() !== '' ? ( ) : null} diff --git a/src/components/employees/employee-inline-form.tsx b/src/components/employees/employee-inline-form.tsx index 9bd128a..d2c3b83 100644 --- a/src/components/employees/employee-inline-form.tsx +++ b/src/components/employees/employee-inline-form.tsx @@ -338,7 +338,7 @@ export function EmployeeInlineForm({ onSave, onCancel, isLoading = false }: Empl
- {formData.avatar ? ( + {formData.avatar && formData.avatar.trim() !== '' ? ( ) : null} @@ -391,7 +391,7 @@ export function EmployeeInlineForm({ onSave, onCancel, isLoading = false }: Empl
- {formData.passportPhoto ? ( + {formData.passportPhoto && formData.passportPhoto.trim() !== '' ? (
Фото паспорта
- Паспорт + {formData.passportPhoto && formData.passportPhoto.trim() !== '' && ( + Паспорт + )}
diff --git a/src/components/supplies/create-consumables-supply-page.tsx b/src/components/supplies/create-consumables-supply-page.tsx index 9ce164d..1c967b1 100644 --- a/src/components/supplies/create-consumables-supply-page.tsx +++ b/src/components/supplies/create-consumables-supply-page.tsx @@ -49,7 +49,8 @@ interface ConsumableProduct { description?: string; price: number; category?: { name: string }; - images?: Array<{ url: string }>; + images: string[]; + mainImage?: string; organization: { id: string; name: string; @@ -439,9 +440,17 @@ export function CreateConsumablesSupplyPage() {
{/* Изображение товара */}
- {product.images && product.images.length > 0 ? ( + {product.images && product.images.length > 0 && product.images[0] ? ( {product.name} + ) : product.mainImage ? ( + {product.name}
- ) : ( + ) : imageUrl ? ( <>
+ ) : ( +
+
Нет изображения
+
)}
))}