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