feat: add generated code
This commit is contained in:
24
frontend/src/resources/equipment/EquipmentCreate.tsx
Normal file
24
frontend/src/resources/equipment/EquipmentCreate.tsx
Normal file
@@ -0,0 +1,24 @@
|
||||
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>
|
||||
);
|
||||
Reference in New Issue
Block a user