feat: add generated code: frontend/src/resources/equipment/EquipmentEdit.tsx
This commit is contained in:
21
frontend/src/resources/equipment/EquipmentEdit.tsx
Normal file
21
frontend/src/resources/equipment/EquipmentEdit.tsx
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
import { Edit, SimpleForm, TextInput, DateInput, SelectInput } from 'react-admin';
|
||||||
|
|
||||||
|
const equipmentStatusChoices = [
|
||||||
|
{ id: 'Active', name: 'В эксплуатации' },
|
||||||
|
{ id: 'Repair', name: 'В ремонте' },
|
||||||
|
{ id: 'Reserve', name: 'В резерве' },
|
||||||
|
{ id: 'WriteOff', name: 'Списано' },
|
||||||
|
];
|
||||||
|
|
||||||
|
export const EquipmentEdit = () => (
|
||||||
|
<Edit>
|
||||||
|
<SimpleForm>
|
||||||
|
<TextInput disabled source="id" />
|
||||||
|
<TextInput source="name" />
|
||||||
|
<TextInput source="serialNumber" />
|
||||||
|
<DateInput source="dateOfInspection" />
|
||||||
|
<DateInput source="commissionedAt" />
|
||||||
|
<SelectInput source="status" choices={equipmentStatusChoices} />
|
||||||
|
</SimpleForm>
|
||||||
|
</Edit>
|
||||||
|
);
|
||||||
Reference in New Issue
Block a user