feat: add generated code
This commit is contained in:
20
frontend/src/resources/part/PartCreate.tsx
Normal file
20
frontend/src/resources/part/PartCreate.tsx
Normal file
@@ -0,0 +1,20 @@
|
||||
import { Create, SimpleForm, TextInput, SelectInput, NumberInput } from 'react-admin';
|
||||
|
||||
const categoryChoices = [
|
||||
{ id: 'Расходник', name: 'Расходник' },
|
||||
{ id: 'Запчасть', name: 'Запчасть' },
|
||||
{ id: 'Инструмент', name: 'Инструмент' },
|
||||
{ id: 'Спецодежда', name: 'Спецодежда' },
|
||||
];
|
||||
|
||||
export const PartCreate = () => (
|
||||
<Create>
|
||||
<SimpleForm>
|
||||
<TextInput source="name" label="Название" />
|
||||
<SelectInput source="categories" choices={categoryChoices} label="Категории" />
|
||||
<NumberInput source="price" label="Стоимость" step={0.01} />
|
||||
<TextInput multiline source="description" label="Описание" />
|
||||
<TextInput source="serialNumber" label="Серийный номер" />
|
||||
</SimpleForm>
|
||||
</Create>
|
||||
);
|
||||
Reference in New Issue
Block a user