Talent-Catalog / talentcatalog

https://tctalent.org
GNU Affero General Public License v3.0
12 stars 4 forks source link

Additional selected candidates in selections when saving to list #1492

Open cazcam34 opened 2 weeks ago

cazcam34 commented 2 weeks ago

Had a call with Naji to continue to discuss the additional candidates appearing in list when selecting.

Found the source of the issue. As mentioned in another issue here () the define search filter is always saving to the 'default' search upon every 'Search' button click. Even if I am in a saved search screen and the filter is populated with my saved search filters, if I change those filters and click 'Search' I am updating and saving my default search filters not the saved search filters UNLESS i click 'Update Search' button then it saves to my saved search.

In addition to the above upon each 'Search' button click we also are marking the selected candidates for that search. Each user has a different amount of selections for a search. HOWEVER we are marking the selected candidates for the default search and not the saved search!!

cazcam34 commented 1 week ago
Screen Shot 2024-10-21 at 3.47.54 pm.png Screen Shot 2024-10-21 at 3.48.04 pm.png
cazcam34 commented 1 week ago
cazcam34 commented 1 week ago

https://medium.com/@aregawihaileyesus/block-leaving-the-route-and-reload-the-page-if-there-are-unsaved-drafts-33102edf6d7d https://dev.to/netsi1964/create-a-guard-in-angular-to-handle-navigation-away-from-a-component-with-unsaved-changes-40i3

cazcam34 commented 1 week ago

https://www.tektutorialshub.com/angular/angular-candeactivate-guard/

cazcam34 commented 1 week ago

Moving away from saved search without saving changes (now we no longer are working with the default search) triggers a modal pop up to confirm

Screen Shot 2024-10-24 at 8.09.18 pm.png
camerojo commented 1 week ago

Thinking more about this following last night's team call I think we need the following new logic when a change is made to a search's filters:

@cazcam34