2426 timebox refactor board with the new scope architecture (#2789)

* scoped states: wip

* scoped states: wip

* wip

* wip

* create boardFiltersScopedState and boardSortsScopedState

* wip

* reorganize hooks

* update hooks

* wip

* wip

* fix options dropdown

* clean unused selectors

* fields are working

* fix filter an sort

* fix entity count

* rename hooks

* rename states

* clean unused context

* fix recoil scope bug

* objectNameSingular instead of objectNamePlural
This commit is contained in:
bosiraphael
2023-12-05 12:15:20 +01:00
committed by GitHub
parent 5c0ad30186
commit 95a1cfeec3
84 changed files with 1204 additions and 765 deletions

View File

@ -1,7 +1,6 @@
import { useCallback, useContext, useState } from 'react';
import { useQuery } from '@apollo/client';
import { useCreateOpportunity } from '@/companies/hooks/useCreateOpportunity';
import { useObjectMetadataItem } from '@/object-metadata/hooks/useObjectMetadataItem';
import { useFilteredSearchEntityQuery } from '@/search/hooks/useFilteredSearchEntityQuery';
import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar';
@ -11,6 +10,7 @@ import { relationPickerSearchFilterScopedState } from '@/ui/input/relation-picke
import { RelationPickerHotkeyScope } from '@/ui/input/relation-picker/types/RelationPickerHotkeyScope';
import { NewButton } from '@/ui/object/record-board/components/NewButton';
import { BoardColumnContext } from '@/ui/object/record-board/contexts/BoardColumnContext';
import { useCreateOpportunity } from '@/ui/object/record-board/hooks/internal/useCreateOpportunity';
import { usePreviousHotkeyScope } from '@/ui/utilities/hotkey/hooks/usePreviousHotkeyScope';
import { useRecoilScopedState } from '@/ui/utilities/recoil-scope/hooks/useRecoilScopedState';
@ -21,7 +21,7 @@ export const NewOpportunityButton = () => {
const pipelineStepId = column?.columnDefinition.id || '';
const { enqueueSnackBar } = useSnackBar();
const { createOpportunity } = useCreateOpportunity();
const createOpportunity = useCreateOpportunity();
const {
goBackToPreviousHotkeyScope,