feat: add generated code

This commit is contained in:
aid-orchestrator
2026-04-25 13:53:55 +00:00
parent 011fbe8ef3
commit c05e6941b3
119 changed files with 2989 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
import { Edit, SimpleForm, TextInput, DateInput, SelectInput, BooleanInput, ReferenceInput, NumberInput } from 'react-admin';
const repairKindChoices = [
{ id: 'TO', name: 'Техническое обслуживание' },
{ id: 'TR', name: 'Текущий ремонт' },
{ id: 'TRE', name: 'Текущий расширенный ремонт' },
{ id: 'KR', name: 'Капитальный ремонт' },
{ id: 'AR', name: 'Аварийный ремонт' },
{ id: 'MP', name: 'Метрологическая поверка' },
];
const statusChoices = [
{ id: 'Draft', name: 'Черновик' },
{ id: 'Approved', name: 'Утверждена' },
{ id: 'InWork', name: 'В работе' },
{ id: 'Done', name: 'Выполнена' },
{ id: 'Cancelled', name: 'Отменена' },
];
export const RepairOrderEdit = () => (
<Edit>
<SimpleForm>
<TextInput disabled source="id" label="ID" />
<TextInput source="number" label="Номер заявки" />
<DateInput source="date" label="Дата заявки" />
<ReferenceInput source="equipmentId" reference="equipment" label="Оборудование">
<SelectInput optionText="name" />
</ReferenceInput>
<SelectInput source="repairKind" choices={repairKindChoices} label="Вид ремонта" />
<SelectInput source="status" choices={statusChoices} label="Статус" />
<DateInput source="plannedAt" label="Плановая дата начала" />
<DateInput source="startedAt" label="Фактическая дата начала" />
<DateInput source="completedAt" label="Фактическая дата завершения" />
<TextInput source="contractor" label="Подрядная организация" />
<NumberInput source="engineHoursAtRepair" label="Наработка на момент ремонта" step={0.01} />
<TextInput multiline source="description" label="Описание работ" />
<TextInput multiline source="notes" label="Примечания" />
<BooleanInput source="confirmed" label="Согласовано" />
</SimpleForm>
</Edit>
);