import { Show, SimpleShowLayout, TextField, DateField, BooleanField, ReferenceField } from 'react-admin';

export const RepairOrderShow = () => (
  <Show>
    <SimpleShowLayout>
      <TextField source="id" />
      <TextField source="number" />
      <DateField source="date" />
      <ReferenceField source="equipmentId" reference="equipment">
        <TextField source="name" />
      </ReferenceField>
      <TextField source="repairKind" />
      <TextField source="status" />
      <DateField source="plannedAt" />
      <DateField source="startedAt" />
      <DateField source="completedAt" />
      <TextField source="contractor" />
      <TextField source="engineHoursAtRepair" />
      <TextField source="description" />
      <TextField source="notes" />
      <BooleanField source="confirmed" />
      <DateField source="createdAt" showTime />
      <DateField source="updatedAt" showTime />
    </SimpleShowLayout>
  </Show>
);