feat: add generated code: frontend/src/resources/change-equipment-status/ChangeEquipmentStatusList.tsx
This commit is contained in:
@@ -0,0 +1,26 @@
|
|||||||
|
import { List, DataTable, TextField, DateField, EditButton, ShowButton, ReferenceField } from 'react-admin';
|
||||||
|
import { SelectField } from 'react-admin';
|
||||||
|
|
||||||
|
const equipmentStatusChoices = [
|
||||||
|
{ id: 'Active', name: 'В эксплуатации' },
|
||||||
|
{ id: 'Repair', name: 'В ремонте' },
|
||||||
|
{ id: 'Reserve', name: 'В резерве' },
|
||||||
|
{ id: 'WriteOff', name: 'Списано' },
|
||||||
|
];
|
||||||
|
|
||||||
|
export const ChangeEquipmentStatusList = () => (
|
||||||
|
<List>
|
||||||
|
<DataTable>
|
||||||
|
<DataTable.Col source="equipmentId" field={<ReferenceField source="equipmentId" reference="equipment" />} />
|
||||||
|
<DataTable.Col source="newStatus" field={<SelectField choices={equipmentStatusChoices} />} />
|
||||||
|
<DataTable.Col source="number" />
|
||||||
|
<DataTable.Col source="date" field={DateField} />
|
||||||
|
<DataTable.Col source="responsible" />
|
||||||
|
<DataTable.Col source="createdAt" field={DateField} />
|
||||||
|
<DataTable.Col>
|
||||||
|
<ShowButton />
|
||||||
|
<EditButton />
|
||||||
|
</DataTable.Col>
|
||||||
|
</DataTable>
|
||||||
|
</List>
|
||||||
|
);
|
||||||
Reference in New Issue
Block a user