mirror of
https://github.com/twentyhq/twenty.git
synced 2025-01-03 17:53:58 +03:00
feature: add email in sorts fields
This commit is contained in:
parent
a5909bd6ff
commit
6e353f590c
@ -59,7 +59,7 @@ function TableHeader({
|
||||
label: 'Created at',
|
||||
order: 'asc',
|
||||
id: sortId,
|
||||
} as SortType,
|
||||
} satisfies SortType,
|
||||
];
|
||||
setSorts(newSorts);
|
||||
onSortsUpdate && onSortsUpdate(newSorts);
|
||||
|
@ -1,4 +1,9 @@
|
||||
import { faUser, faList, faCalendar } from '@fortawesome/pro-regular-svg-icons';
|
||||
import {
|
||||
faUser,
|
||||
faList,
|
||||
faCalendar,
|
||||
faEnvelope,
|
||||
} from '@fortawesome/pro-regular-svg-icons';
|
||||
import WithTopBarContainer from '../../layout/containers/WithTopBarContainer';
|
||||
import Table from '../../components/table/Table';
|
||||
import styled from '@emotion/styled';
|
||||
@ -27,6 +32,21 @@ const reduceSortsToOrderBy = (sorts: Array<SortType>): OrderBy[] => {
|
||||
return [mappedSorts];
|
||||
};
|
||||
|
||||
const sortsAvailable: Array<SortType<keyof GraphqlPerson>> = [
|
||||
{
|
||||
id: 'created_at',
|
||||
label: 'Created at',
|
||||
order: 'asc',
|
||||
icon: faCalendar,
|
||||
},
|
||||
{
|
||||
id: 'email',
|
||||
label: 'Email',
|
||||
order: 'asc',
|
||||
icon: faEnvelope,
|
||||
},
|
||||
];
|
||||
|
||||
function People() {
|
||||
const [, setSorts] = useState([] as Array<SortType>);
|
||||
const [orderBy, setOrderBy] = useState(defaultOrderBy);
|
||||
@ -38,15 +58,6 @@ function People() {
|
||||
|
||||
const { data } = usePeopleQuery(orderBy);
|
||||
|
||||
const sortsAvailable: Array<SortType<keyof GraphqlPerson>> = [
|
||||
{
|
||||
id: 'created_at',
|
||||
label: 'Created at',
|
||||
order: 'asc',
|
||||
icon: faCalendar,
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
<WithTopBarContainer title="People" icon={faUser}>
|
||||
<StyledPeopleContainer>
|
||||
|
Loading…
Reference in New Issue
Block a user