@ -1,13 +1,12 @@
|
||||
import {
|
||||
TbBuilding,
|
||||
TbCalendar,
|
||||
TbMail,
|
||||
TbMapPin,
|
||||
TbPhone,
|
||||
TbUser,
|
||||
} from 'react-icons/tb';
|
||||
|
||||
import { SortType } from '@/filters-and-sorts/interfaces/sorts/interface';
|
||||
import {
|
||||
IconBuilding,
|
||||
IconCalendar,
|
||||
IconMail,
|
||||
IconMapPin,
|
||||
IconPhone,
|
||||
IconUser,
|
||||
} from '@/ui/icons/index';
|
||||
import {
|
||||
PersonOrderByWithRelationInput as People_Order_By,
|
||||
SortOrder as Order_By,
|
||||
@ -17,7 +16,7 @@ export const availableSorts = [
|
||||
{
|
||||
key: 'fullname',
|
||||
label: 'People',
|
||||
icon: <TbUser size={16} />,
|
||||
icon: <IconUser size={16} />,
|
||||
_type: 'custom_sort',
|
||||
orderByTemplates: [
|
||||
(order: Order_By) => ({
|
||||
@ -31,32 +30,32 @@ export const availableSorts = [
|
||||
{
|
||||
key: 'company_name',
|
||||
label: 'Company',
|
||||
icon: <TbBuilding size={16} />,
|
||||
icon: <IconBuilding size={16} />,
|
||||
_type: 'custom_sort',
|
||||
orderByTemplates: [(order: Order_By) => ({ company: { name: order } })],
|
||||
},
|
||||
{
|
||||
key: 'email',
|
||||
label: 'Email',
|
||||
icon: <TbMail size={16} />,
|
||||
icon: <IconMail size={16} />,
|
||||
_type: 'default_sort',
|
||||
},
|
||||
{
|
||||
key: 'phone',
|
||||
label: 'Phone',
|
||||
icon: <TbPhone size={16} />,
|
||||
icon: <IconPhone size={16} />,
|
||||
_type: 'default_sort',
|
||||
},
|
||||
{
|
||||
key: 'createdAt',
|
||||
label: 'Created at',
|
||||
icon: <TbCalendar size={16} />,
|
||||
icon: <IconCalendar size={16} />,
|
||||
_type: 'default_sort',
|
||||
},
|
||||
{
|
||||
key: 'city',
|
||||
label: 'City',
|
||||
icon: <TbMapPin size={16} />,
|
||||
icon: <IconMapPin size={16} />,
|
||||
_type: 'default_sort',
|
||||
},
|
||||
] satisfies Array<SortType<People_Order_By>>;
|
||||
|
||||
Reference in New Issue
Block a user