37 lines
1.1 KiB
TypeScript
37 lines
1.1 KiB
TypeScript
import {
|
|
DateInput,
|
|
Edit,
|
|
NumberInput,
|
|
SelectInput,
|
|
SimpleForm,
|
|
} from "react-admin";
|
|
import {
|
|
equipmentStatusChoices,
|
|
equipmentTypeChoices,
|
|
laborOperationChoices,
|
|
periodicityChoices,
|
|
} from "../shared/enums";
|
|
import { PlainInput } from "../shared/inputs";
|
|
|
|
export const EquipmentEdit = () => (
|
|
<Edit>
|
|
<SimpleForm>
|
|
<PlainInput source="name" />
|
|
<PlainInput source="serialNumber" />
|
|
<PlainInput source="inventoryNumber" />
|
|
<SelectInput source="equipmentType" choices={equipmentTypeChoices} />
|
|
<DateInput source="dateOfInspection" />
|
|
<SelectInput source="periodicityTO" choices={periodicityChoices} />
|
|
<PlainInput source="location" />
|
|
<SelectInput source="status" choices={equipmentStatusChoices} />
|
|
<DateInput source="commissionedAt" />
|
|
<NumberInput source="totalEngineHours" />
|
|
<NumberInput source="engineHoursSinceLastRepair" />
|
|
<DateInput source="lastRepairAt" />
|
|
<PlainInput source="notes" multiline />
|
|
<SelectInput source="workAsPartOf" choices={laborOperationChoices} />
|
|
<NumberInput source="fuelConsumed" />
|
|
</SimpleForm>
|
|
</Edit>
|
|
);
|