Update FE case to match BE graphql case (camelCase) (#154)
This commit is contained in:
@ -64,7 +64,7 @@ function People() {
|
||||
phone: '',
|
||||
company: null,
|
||||
pipes: [],
|
||||
creationDate: new Date(),
|
||||
createdAt: new Date(),
|
||||
city: '',
|
||||
};
|
||||
|
||||
|
||||
@ -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);
|
||||
}}
|
||||
/>
|
||||
|
||||
@ -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>[];
|
||||
|
||||
Reference in New Issue
Block a user