Update FE case to match BE graphql case (camelCase) (#154)

This commit is contained in:
Charles Bochet
2023-05-29 19:45:55 +02:00
committed by GitHub
parent de9cf61689
commit 2f50cdc07e
27 changed files with 200 additions and 204 deletions

View File

@ -64,7 +64,7 @@ function People() {
phone: '',
company: null,
pipes: [],
creationDate: new Date(),
createdAt: new Date(),
city: '',
};

View File

@ -103,16 +103,16 @@ export const usePeopleColumns = () => {
),
size: 130,
}),
columnHelper.accessor('creationDate', {
columnHelper.accessor('createdAt', {
header: () => (
<ColumnHead viewName="Creation" viewIcon={<TbCalendar size={16} />} />
),
cell: (props) => (
<EditableDate
value={props.row.original.creationDate || new Date()}
value={props.row.original.createdAt || new Date()}
changeHandler={(value: Date) => {
const person = props.row.original;
person.creationDate = value;
person.createdAt = value;
updatePerson(person);
}}
/>

View File

@ -162,8 +162,8 @@ export const phoneFilter = {
],
} satisfies FilterConfigType<Person, string>;
export const creationDateFilter = {
key: 'person_created_at',
export const createdAtFilter = {
key: 'createdAt',
label: 'Created At',
icon: <TbCalendar size={16} />,
type: 'date',
@ -224,6 +224,6 @@ export const availableFilters = [
emailFilter,
companyFilter,
phoneFilter,
creationDateFilter,
createdAtFilter,
cityFilter,
] satisfies FilterConfigType<Person>[];