change position columns
This commit is contained in:
@@ -39,6 +39,25 @@ const OperatorList = () => {
|
|||||||
grow: false,
|
grow: false,
|
||||||
size: 100,
|
size: 100,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
accessorKey: "status",
|
||||||
|
header: "وضعیت",
|
||||||
|
id: "status",
|
||||||
|
enableColumnFilter: true,
|
||||||
|
datatype: "numeric",
|
||||||
|
filterMode: "equals",
|
||||||
|
grow: false,
|
||||||
|
size: 100,
|
||||||
|
columnSelectOption: () => {
|
||||||
|
return statusOptions.map((status) => ({
|
||||||
|
value: status.value,
|
||||||
|
label: status.label,
|
||||||
|
}));
|
||||||
|
},
|
||||||
|
Cell: ({ row }) => {
|
||||||
|
return <Typography variant={"body2"}>{row.original.status_fa}</Typography>;
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
header: "اطلاعات تصادف",
|
header: "اطلاعات تصادف",
|
||||||
id: "accidentInfo",
|
id: "accidentInfo",
|
||||||
@@ -422,25 +441,6 @@ const OperatorList = () => {
|
|||||||
grow: false,
|
grow: false,
|
||||||
size: 100,
|
size: 100,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
accessorKey: "status",
|
|
||||||
header: "وضعیت",
|
|
||||||
id: "status",
|
|
||||||
enableColumnFilter: true,
|
|
||||||
datatype: "numeric",
|
|
||||||
filterMode: "equals",
|
|
||||||
grow: false,
|
|
||||||
size: 100,
|
|
||||||
columnSelectOption: () => {
|
|
||||||
return statusOptions.map((status) => ({
|
|
||||||
value: status.value,
|
|
||||||
label: status.label,
|
|
||||||
}));
|
|
||||||
},
|
|
||||||
Cell: ({ row }) => {
|
|
||||||
return <Typography variant={"body2"}>{row.original.status_fa}</Typography>;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
@@ -456,7 +456,7 @@ const OperatorList = () => {
|
|||||||
sorting={[{ id: "id", desc: true }]}
|
sorting={[{ id: "id", desc: true }]}
|
||||||
TableToolbar={Toolbar}
|
TableToolbar={Toolbar}
|
||||||
enableRowActions
|
enableRowActions
|
||||||
positionActionsColumn={"last"}
|
positionActionsColumn={"first"}
|
||||||
RowActions={RowActions}
|
RowActions={RowActions}
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
Reference in New Issue
Block a user