Add useGroupBy hook + update calendar view to use groupBy (#15439)
## Context Took inspiration from findMany + kanban => Implemented a hook for the new groupBy API endpoints Fixed an issue when DnD to an empty day
This commit is contained in:
+9
@@ -0,0 +1,9 @@
|
||||
import { type RecordGqlConnection } from '@/object-record/graphql/types/RecordGqlConnection';
|
||||
|
||||
export type RecordGqlGroupByConnection = RecordGqlConnection & {
|
||||
groupByDimensionValues: string[];
|
||||
};
|
||||
|
||||
export type RecordGqlOperationGroupByResult = {
|
||||
[objectNamePlural: string]: RecordGqlGroupByConnection[];
|
||||
};
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
import { type RecordGqlOperationOrderBy } from '@/object-record/graphql/types/RecordGqlOperationOrderBy';
|
||||
import { type RecordGqlOperationFilter } from 'twenty-shared/types';
|
||||
|
||||
export type RecordGqlOperationGroupByVariables = {
|
||||
groupBy: Record<string, any>[];
|
||||
filter?: RecordGqlOperationFilter;
|
||||
orderBy?: Record<string, any>[];
|
||||
orderByForRecords?: RecordGqlOperationOrderBy;
|
||||
viewId?: string;
|
||||
};
|
||||
Reference in New Issue
Block a user