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}
 | 
					                columns={columns}
 | 
				
			||||||
                restProps={
 | 
					                restProps={
 | 
				
			||||||
                    {
 | 
					                    {
 | 
				
			||||||
                        enablePagination: true,
 | 
					 | 
				
			||||||
                        enableRowActions: true,
 | 
					                        enableRowActions: true,
 | 
				
			||||||
 | 
					                        enableSorting: true,
 | 
				
			||||||
 | 
					                        enableColumnActions: false,
 | 
				
			||||||
                        renderRowActions: ({ row }) => (
 | 
					                        renderRowActions: ({ row }) => (
 | 
				
			||||||
                            <Flex gap="md">
 | 
					                            <Flex gap="md">
 | 
				
			||||||
                                <Tooltip label="Удалить">
 | 
					                                <Tooltip label="Удалить">
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -7,6 +7,7 @@ export const useActiveShiftsTableColumns = () => {
 | 
				
			|||||||
        () => [
 | 
					        () => [
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                header: "Начало смены",
 | 
					                header: "Начало смены",
 | 
				
			||||||
 | 
					                accessorKey: "startedAt",
 | 
				
			||||||
                Cell: ({ row }) =>
 | 
					                Cell: ({ row }) =>
 | 
				
			||||||
                    new Date(row.original.startedAt).toLocaleString("ru-RU"),
 | 
					                    new Date(row.original.startedAt).toLocaleString("ru-RU"),
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
@@ -18,10 +19,12 @@ export const useActiveShiftsTableColumns = () => {
 | 
				
			|||||||
            {
 | 
					            {
 | 
				
			||||||
                header: "Роль",
 | 
					                header: "Роль",
 | 
				
			||||||
                accessorKey: "user.role.name",
 | 
					                accessorKey: "user.role.name",
 | 
				
			||||||
 | 
					                enableSorting: false,
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                header: "Должность",
 | 
					                header: "Должность",
 | 
				
			||||||
                accessorKey: "user.position.name",
 | 
					                accessorKey: "user.position.name",
 | 
				
			||||||
 | 
					                enableSorting: false,
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        ],
 | 
					        ],
 | 
				
			||||||
        []
 | 
					        []
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user