Use aggregate operations in the widget configuration instead of extended aggregate operations (#15248)

- Use aggregate operations in the widget configuration instead of
extended aggregate operations
- Use aggregate operation from generated graphql in the frontend
This commit is contained in:
Raphaël Bosi
2025-10-22 14:19:02 +02:00
committed by GitHub
parent 0221ef991e
commit 1c27206b41
28 changed files with 118 additions and 207 deletions
@@ -7,6 +7,7 @@ import { useRefreshCoreViewsByObjectMetadataId } from '@/views/hooks/useRefreshC
import { useUpdateView } from '@/views/hooks/useUpdateView';
import { useCallback } from 'react';
import { useSetRecoilState } from 'recoil';
import { isDefined } from 'twenty-shared/utils';
export const useUpdateViewAggregate = () => {
const currentViewId = useRecoilComponentValue(
@@ -31,10 +32,13 @@ export const useUpdateViewAggregate = () => {
kanbanAggregateOperation: ExtendedAggregateOperations | null;
objectMetadataId: string;
}) => {
const convertedKanbanAggregateOperation =
convertExtendedAggregateOperationToAggregateOperation(
kanbanAggregateOperation,
);
const convertedKanbanAggregateOperation = isDefined(
kanbanAggregateOperation,
)
? convertExtendedAggregateOperationToAggregateOperation(
kanbanAggregateOperation,
)
: null;
updateView({
id: currentViewId,
kanbanAggregateOperationFieldMetadataId,