Files
toir-light/client/src/resources/equipment/EquipmentEdit.tsx
Первов Артем b1aefae2fa Add support for file attachments in equipment status changes
- Introduced functionality for uploading and managing attachments in the ChangeEquipmentStatus module.
- Added new endpoints for uploading and deleting attachments, as well as for downloading them.
- Updated the ChangeEquipmentStatusService to handle attachment storage and retrieval using the new storage service methods.
- Enhanced the ChangeEquipmentStatusEdit and ChangeEquipmentStatusShow components to support attachment input and display.
- Removed deprecated attachment handling from Equipment module to streamline functionality.
- Updated Prisma schema to reflect changes in attachment management.
2026-04-21 12:19:49 +03:00

25 lines
925 B
TypeScript

import { DateInput, Edit, SelectInput, SimpleForm, TextInput as RaTextInput } from 'react-admin';
import { equipmentStatusChoices } from './shared';
const equipmentLabels = {
dateOfInspection: 'Дата поверки',
commissionedAt: 'Дата изготовления',
name: 'Название',
serialNumber: 'Серийный номер',
status: 'Статус',
};
export function EquipmentEdit() {
return (
<Edit>
<SimpleForm>
<DateInput source="dateOfInspection" label={equipmentLabels.dateOfInspection} />
<DateInput source="commissionedAt" label={equipmentLabels.commissionedAt} />
<RaTextInput source="name" label={equipmentLabels.name} />
<RaTextInput source="serialNumber" label={equipmentLabels.serialNumber} />
<SelectInput source="status" label={equipmentLabels.status} choices={equipmentStatusChoices} />
</SimpleForm>
</Edit>
);
}