Feat/pin available submaps
1 unresolved thread
1 unresolved thread
Display Available in Submaps buttons and open submap on click.
There is a problem with test for displaying Available in Submaps, because I had to use two seperate datas for displaying these buttons (one is from chemical/drug, where we get list of submaps, and second is from models, where we get name of submaps). The problem is that if we use fixtures for both - data for chemicals and for models, then ids won't be equal.
Merge request reports
Activity
Filter activity
assigned to @MateuszBolewski
added 12 commits
-
6aa79c0c...342e71d0 - 11 commits from branch
development
- a43265ab - Merge branch 'development' of ssh://gitlab.lcsb.uni.lu:8022/minerva/frontend...
-
6aa79c0c...342e71d0 - 11 commits from branch
13 19 export const PinsListItem = ({ name, type, pin }: PinsListItemProps): JSX.Element => { 20 const dispatch = useAppDispatch(); 21 const openedMaps = useAppSelector(mapOpenedMapsSelector); 22 const models = useAppSelector(modelsDataSelector); 23 const availableSubmaps = getListOfAvailableSubmaps(pin, models); 24 25 const isMapAlreadyOpened = (modelId: number): boolean => 26 openedMaps.some(map => map.modelId === modelId); 27 28 const onSubmapClick = (map: AvailableSubmaps): void => { 29 if (isMapAlreadyOpened(map.modelId)) { 30 dispatch(setActiveMap({ modelId: map.modelId })); 31 } else { 32 dispatch(openMapAndSetActive({ modelId: map.modelId, modelName: map.name })); 33 } 34 }; mentioned in commit f51cab97
Please register or sign in to reply