feat: add generated code: frontend/src/resources/change-equipment-status/ChangeEquipmentStatusList.tsx
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
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={(props) => <ReferenceField {...props} reference="equipment" source="equipmentId" />} />
|
||||
<DataTable.Col source="newStatus" field={(props) => <SelectField {...props} choices={equipmentStatusChoices} />} />
|
||||
<DataTable.Col source="number" />
|
||||
<DataTable.Col source="date" field={DateField} />
|
||||
<DataTable.Col source="responsible" />
|
||||
<DataTable.Col source="createdAt" field={DateField} />
|
||||
<DataTable.Col source="updatedAt" field={DateField} />
|
||||
<DataTable.Col>
|
||||
<EditButton />
|
||||
<ShowButton />
|
||||
</DataTable.Col>
|
||||
</DataTable>
|
||||
</List>
|
||||
);
|
||||
Reference in New Issue
Block a user