feat: persist view filters and sorts on Update View button click (#1290)

* feat: add viewFilters table

Closes #1121

* feat: add Update View button + Create View dropdown

Closes #1124, #1289

* feat: add View Filter resolvers

* feat: persist view filters and sorts on Update View button click

Closes #1123

* refactor: code review

- Rename recoil selectors
- Rename filters `field` property to `key`
This commit is contained in:
Thaïs
2023-08-23 18:20:43 +02:00
committed by GitHub
parent 76246ec880
commit 74ab0142c7
54 changed files with 1331 additions and 277 deletions

View File

@ -14,7 +14,7 @@ import { Company } from '~/generated/graphql';
export const companiesFilters: FilterDefinitionByEntity<Company>[] = [
{
field: 'name',
key: 'name',
label: 'Name',
icon: (
<IconBuildingSkyscraper size={icon.size.md} stroke={icon.stroke.sm} />
@ -22,31 +22,31 @@ export const companiesFilters: FilterDefinitionByEntity<Company>[] = [
type: 'text',
},
{
field: 'employees',
key: 'employees',
label: 'Employees',
icon: <IconUsers size={icon.size.md} stroke={icon.stroke.sm} />,
type: 'number',
},
{
field: 'domainName',
key: 'domainName',
label: 'URL',
icon: <IconLink size={icon.size.md} stroke={icon.stroke.sm} />,
type: 'text',
},
{
field: 'address',
key: 'address',
label: 'Address',
icon: <IconMap size={icon.size.md} stroke={icon.stroke.sm} />,
type: 'text',
},
{
field: 'createdAt',
key: 'createdAt',
label: 'Created at',
icon: <IconCalendarEvent size={icon.size.md} stroke={icon.stroke.sm} />,
type: 'date',
},
{
field: 'accountOwnerId',
key: 'accountOwnerId',
label: 'Account owner',
icon: <IconUser size={icon.size.md} stroke={icon.stroke.sm} />,
type: 'entity',

View File

@ -15,19 +15,19 @@ import { FilterDropdownPeopleSearchSelect } from '../../modules/people/component
export const opportunitiesFilters: FilterDefinitionByEntity<PipelineProgress>[] =
[
{
field: 'amount',
key: 'amount',
label: 'Amount',
icon: <IconCurrencyDollar size={icon.size.md} stroke={icon.stroke.sm} />,
type: 'number',
},
{
field: 'closeDate',
key: 'closeDate',
label: 'Close date',
icon: <IconCalendarEvent size={icon.size.md} stroke={icon.stroke.sm} />,
type: 'date',
},
{
field: 'companyId',
key: 'companyId',
label: 'Company',
icon: (
<IconBuildingSkyscraper size={icon.size.md} stroke={icon.stroke.sm} />
@ -40,7 +40,7 @@ export const opportunitiesFilters: FilterDefinitionByEntity<PipelineProgress>[]
),
},
{
field: 'pointOfContactId',
key: 'pointOfContactId',
label: 'Point of contact',
icon: <IconUser size={icon.size.md} stroke={icon.stroke.sm} />,
type: 'entity',

View File

@ -14,25 +14,25 @@ import { Person } from '~/generated/graphql';
export const peopleFilters: FilterDefinitionByEntity<Person>[] = [
{
field: 'firstName',
key: 'firstName',
label: 'First name',
icon: <IconUser size={icon.size.md} stroke={icon.stroke.sm} />,
type: 'text',
},
{
field: 'lastName',
key: 'lastName',
label: 'Last name',
icon: <IconUser size={icon.size.md} stroke={icon.stroke.sm} />,
type: 'text',
},
{
field: 'email',
key: 'email',
label: 'Email',
icon: <IconMail size={icon.size.md} stroke={icon.stroke.sm} />,
type: 'text',
},
{
field: 'companyId',
key: 'companyId',
label: 'Company',
icon: (
<IconBuildingSkyscraper size={icon.size.md} stroke={icon.stroke.sm} />
@ -43,19 +43,19 @@ export const peopleFilters: FilterDefinitionByEntity<Person>[] = [
),
},
{
field: 'phone',
key: 'phone',
label: 'Phone',
icon: <IconPhone size={icon.size.md} stroke={icon.stroke.sm} />,
type: 'text',
},
{
field: 'createdAt',
key: 'createdAt',
label: 'Created at',
icon: <IconCalendarEvent size={icon.size.md} stroke={icon.stroke.sm} />,
type: 'date',
},
{
field: 'city',
key: 'city',
label: 'City',
icon: <IconMap size={icon.size.md} stroke={icon.stroke.sm} />,
type: 'text',

View File

@ -7,7 +7,7 @@ import { Activity } from '~/generated/graphql';
export const tasksFilters: FilterDefinitionByEntity<Activity>[] = [
{
field: 'assigneeId',
key: 'assigneeId',
label: 'Assignee',
icon: <IconUser />,
type: 'entity',