fix: sorting only by dates in active work shifts table
This commit is contained in:
@@ -83,8 +83,9 @@ export const ActiveShiftsTable = ({ activeShifts, fetchActiveShifts }: Props) =>
|
||||
columns={columns}
|
||||
restProps={
|
||||
{
|
||||
enablePagination: true,
|
||||
enableRowActions: true,
|
||||
enableSorting: true,
|
||||
enableColumnActions: false,
|
||||
renderRowActions: ({ row }) => (
|
||||
<Flex gap="md">
|
||||
<Tooltip label="Удалить">
|
||||
|
||||
@@ -7,6 +7,7 @@ export const useActiveShiftsTableColumns = () => {
|
||||
() => [
|
||||
{
|
||||
header: "Начало смены",
|
||||
accessorKey: "startedAt",
|
||||
Cell: ({ row }) =>
|
||||
new Date(row.original.startedAt).toLocaleString("ru-RU"),
|
||||
},
|
||||
@@ -18,10 +19,12 @@ export const useActiveShiftsTableColumns = () => {
|
||||
{
|
||||
header: "Роль",
|
||||
accessorKey: "user.role.name",
|
||||
enableSorting: false,
|
||||
},
|
||||
{
|
||||
header: "Должность",
|
||||
accessorKey: "user.position.name",
|
||||
enableSorting: false,
|
||||
}
|
||||
],
|
||||
[]
|
||||
|
||||
Reference in New Issue
Block a user