Refactor/context and scopes (#1602)
* Put onImport in a context * Refactored RecoilScopeContexts * Refactored naming * Fix tests --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@ -44,7 +44,7 @@ export function Opportunities() {
|
||||
<PageContainer>
|
||||
<RecoilScope>
|
||||
<PageHeader title="Opportunities" Icon={IconTargetArrow}>
|
||||
<RecoilScope SpecificContext={DropdownRecoilScopeContext}>
|
||||
<RecoilScope CustomRecoilScopeContext={DropdownRecoilScopeContext}>
|
||||
<PipelineAddButton />
|
||||
</RecoilScope>
|
||||
</PageHeader>
|
||||
@ -52,7 +52,7 @@ export function Opportunities() {
|
||||
<BoardOptionsContext.Provider value={opportunitiesBoardOptions}>
|
||||
<RecoilScope
|
||||
scopeId="opportunities"
|
||||
SpecificContext={CompanyBoardRecoilScopeContext}
|
||||
CustomRecoilScopeContext={CompanyBoardRecoilScopeContext}
|
||||
>
|
||||
<CompanyBoard
|
||||
onColumnAdd={handlePipelineStageAdd}
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
import { FilterDropdownCompanySearchSelect } from '@/companies/components/FilterDropdownCompanySearchSelect';
|
||||
import { CompanyBoardRecoilScopeContext } from '@/companies/states/recoil-scope-contexts/CompanyBoardRecoilScopeContext';
|
||||
import {
|
||||
IconBuildingSkyscraper,
|
||||
IconCalendarEvent,
|
||||
@ -30,21 +29,13 @@ export const opportunitiesFilters: FilterDefinitionByEntity<PipelineProgress>[]
|
||||
label: 'Company',
|
||||
Icon: IconBuildingSkyscraper,
|
||||
type: 'entity',
|
||||
entitySelectComponent: (
|
||||
<FilterDropdownCompanySearchSelect
|
||||
context={CompanyBoardRecoilScopeContext}
|
||||
/>
|
||||
),
|
||||
entitySelectComponent: <FilterDropdownCompanySearchSelect />,
|
||||
},
|
||||
{
|
||||
key: 'pointOfContactId',
|
||||
label: 'Point of contact',
|
||||
Icon: IconUser,
|
||||
type: 'entity',
|
||||
entitySelectComponent: (
|
||||
<FilterDropdownPeopleSearchSelect
|
||||
context={CompanyBoardRecoilScopeContext}
|
||||
/>
|
||||
),
|
||||
entitySelectComponent: <FilterDropdownPeopleSearchSelect />,
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user