Files
toir-light-v4/frontend/src/resources/equipment/EquipmentCreate.tsx
2026-04-22 06:38:40 +00:00

24 lines
927 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { Create, SimpleForm, TextInput, DateInput, SelectInput } from 'react-admin';
const statusChoices = [
{ id: 'Active', name: 'В эксплуатации' },
{ id: 'Repair', name: 'В ремонте' },
{ id: 'Reserve', name: 'В резерве' },
{ id: 'WriteOff', name: 'Списано' },
];
export const EquipmentCreate = () => (
<Create>
<SimpleForm>
<TextInput source="name" label="Название оборудования" fullWidth required />
<TextInput source="serialNumber" label="Заводской (серийный) номер" fullWidth required />
<DateInput source="dateOfInspection" label="Дата поверки" />
<DateInput source="commissionedAt" label="Дата изготовления" />
<SelectInput
source="status"
label="Текущий статус"
choices={statusChoices}
/>
</SimpleForm>
</Create>
);