feat: add generated code: frontend/src/resources/change-equipment-status/ChangeEquipmentStatusShow.tsx
This commit is contained in:
@@ -0,0 +1,22 @@
|
|||||||
|
import { Show, SimpleShowLayout, TextField, DateField, ReferenceField, SelectField } from 'react-admin';
|
||||||
|
|
||||||
|
const equipmentStatusChoices = [
|
||||||
|
{ id: 'Active', name: 'В эксплуатации' },
|
||||||
|
{ id: 'Repair', name: 'В ремонте' },
|
||||||
|
{ id: 'Reserve', name: 'В резерве' },
|
||||||
|
{ id: 'WriteOff', name: 'Списано' },
|
||||||
|
];
|
||||||
|
|
||||||
|
export const ChangeEquipmentStatusShow = () => (
|
||||||
|
<Show>
|
||||||
|
<SimpleShowLayout>
|
||||||
|
<ReferenceField source="equipmentId" reference="equipment" />
|
||||||
|
<SelectField source="newStatus" choices={equipmentStatusChoices} />
|
||||||
|
<TextField source="number" />
|
||||||
|
<DateField source="date" />
|
||||||
|
<TextField source="responsible" />
|
||||||
|
<DateField source="createdAt" />
|
||||||
|
<DateField source="updatedAt" />
|
||||||
|
</SimpleShowLayout>
|
||||||
|
</Show>
|
||||||
|
);
|
||||||
Reference in New Issue
Block a user