Load empty board if view type is kanban (#3605)

* Load empty board if view type is kanban

* Fix tests

* Revert
This commit is contained in:
Charles Bochet
2024-01-24 16:17:47 +01:00
committed by GitHub
parent c811206c47
commit ccbf773fd4
21 changed files with 210 additions and 124 deletions

View File

@ -13,7 +13,6 @@ import { filterAvailableTableColumns } from '@/object-record/utils/filterAvailab
import { useSetRecoilScopedStateV2 } from '@/ui/utilities/recoil-scope/hooks/useSetRecoilScopedStateV2';
import { useViewScopedStates } from '@/views/hooks/internal/useViewScopedStates';
import { useViewBar } from '@/views/hooks/useViewBar';
import { ViewType } from '@/views/types/ViewType';
import { mapViewFieldsToBoardFieldDefinitions } from '@/views/utils/mapViewFieldsToBoardFieldDefinitions';
type HooksCompanyBoardEffectProps = {
@ -30,7 +29,6 @@ export const HooksCompanyBoardEffect = ({
setAvailableSortDefinitions,
setAvailableFieldDefinitions,
setViewObjectMetadataId,
setViewType,
} = useViewBar({ viewBarId });
const { objectMetadataItem } = useObjectMetadataItem({
@ -75,8 +73,7 @@ export const HooksCompanyBoardEffect = ({
return;
}
setViewObjectMetadataId?.(objectMetadataItem.id);
setViewType?.(ViewType.Kanban);
}, [objectMetadataItem, setViewObjectMetadataId, setViewType]);
}, [objectMetadataItem, setViewObjectMetadataId]);
const {
currentViewFieldsState,