import { Edit, SimpleForm, TextInput, DateInput, NumberInput, ReferenceInput, SelectInput } from 'react-admin';

export const ConsumptionRegistrationEdit = () => (
  <Edit>
    <SimpleForm>
      <TextInput disabled source="id" />
      <TextInput source="number" />
      <DateInput source="date" />
      <ReferenceInput source="equipmentId" reference="equipment">
        <SelectInput optionText="name" />
      </ReferenceInput>
      <NumberInput source="totalEngineHours" step={0.01} />
      <NumberInput source="fuelConsumption" step={0.01} />
    </SimpleForm>
  </Edit>
);