25 lines
992 B
TypeScript
25 lines
992 B
TypeScript
import { Edit, SimpleForm, TextInput, DateInput, SelectInput, ReferenceInput } from 'react-admin';
|
||
|
||
const equipmentStatusChoices = [
|
||
{ id: 'Active', name: 'В эксплуатации' },
|
||
{ id: 'Repair', name: 'В ремонте' },
|
||
{ id: 'Reserve', name: 'В резерве' },
|
||
{ id: 'WriteOff', name: 'Списано' },
|
||
];
|
||
|
||
export const ChangeEquipmentStatusEdit = () => (
|
||
<Edit>
|
||
<SimpleForm>
|
||
<TextInput disabled source="id" label="Идентификатор" />
|
||
<ReferenceInput source="equipmentId" reference="equipment" label="Оборудование" />
|
||
<SelectInput
|
||
source="newStatus"
|
||
label="Новый статус"
|
||
choices={equipmentStatusChoices}
|
||
/>
|
||
<TextInput source="number" label="Номер" fullWidth />
|
||
<DateInput source="date" label="Дата изменения статуса" />
|
||
<TextInput source="responsible" label="Ответственный" fullWidth />
|
||
</SimpleForm>
|
||
</Edit>
|
||
); |