Files
light-toir-v2/frontend/src/resources/change-equipment-status/ChangeEquipmentStatusShow.tsx

22 lines
789 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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>
);