import {
  DateField,
  NumberField,
  SelectField,
  Show,
  SimpleShowLayout,
  TextField,
} from "react-admin";
import {
  equipmentStatusChoices,
  equipmentTypeChoices,
  laborOperationChoices,
  periodicityChoices,
} from "../shared/enums";
export const EquipmentShow = () => (
  <Show>
    <SimpleShowLayout>
      <TextField source="inventoryNumber" />
      <TextField source="name" />
      <TextField source="serialNumber" />
      <SelectField source="equipmentType" choices={equipmentTypeChoices} />
      <DateField source="dateOfInspection" />
      <SelectField source="periodicityTO" choices={periodicityChoices} />
      <TextField source="location" />
      <SelectField source="status" choices={equipmentStatusChoices} />
      <DateField source="commissionedAt" />
      <NumberField source="totalEngineHours" />
      <NumberField source="engineHoursSinceLastRepair" />
      <DateField source="lastRepairAt" />
      <TextField source="notes" />
      <SelectField source="workAsPartOf" choices={laborOperationChoices} />
      <NumberField source="fuelConsumed" />
    </SimpleShowLayout>
  </Show>
);
