21 lines
642 B
TypeScript
21 lines
642 B
TypeScript
import { Edit, SimpleForm, TextInput, DateInput, SelectInput } from 'react-admin';
|
|
|
|
const equipmentStatusChoices = [
|
|
{ id: 'Active', name: 'Active' },
|
|
{ id: 'Repair', name: 'Repair' },
|
|
{ id: 'Reserve', name: 'Reserve' },
|
|
{ id: 'WriteOff', name: 'WriteOff' },
|
|
];
|
|
|
|
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>
|
|
); |