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 ? ( <>
+ ) : ( +
+
Нет изображения
+
)}
))}