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>
);