Closed dan-tang-ssd closed 1 year ago
By the way, I would expect this handling may create user confusion. Some users may select a portfolio, then keep clicking "Initiatives" and asking where are my other initiatives...
Perhaps, though here we're addressing requests from some users who were confused that this filter was not retained, so swings and roundabouts, perhaps.
I'm currently considering options to retain all the filters and searches, due to various pieces of feedback I've received. See - #140. Perhaps including a "current active filters" section just above the list, and highlighting the "remove filter" or "reset" options would help with this potential confusion?
I'm currently considering options to retain all the filters and searches, due to various pieces of feedback I've received. See - #140. Perhaps including a "current active filters" section just above the list, and highlighting the "remove filter" or "reset" options would help with this potential confusion?
OK, let me do some changes to tackle #140.
The program change is 90% ready, just remain the last bit about setting integer value for sortDir...
The Vue component now sends ajax call to store settings in session when any settings changed.
Stored settings in session will be retrieved and applied in Vue component when user enter initiative page.
By clicking "Reset" link, user can reset all settings in Vue component and also in session.
In "My Institution" > portfolio list > click "SHOW INITIATIVES" button, it will reset all settings but only keep user selected portfolio in settings.
Some more technical details:
Vue component, add a flag to indicate whether initialisation is completed (fill in settings from session).
Vue component, send ajax call to store latest settings only if initialisation is completed. This is to avoid Vue component to send empty settings at the very beginning to overwrite settings stored in session.
Vue component, enhance function to convert query string parameter values into Vue component settings
Vue component, apply string value for string type variables, e.g. sortBy, portfolioFilter, searchString Vue component, apply JSON value for status selection box option, e.g. red flag status, principle status TODO: Vue component, apply integer value for toggle button, e.g. sortDir
SessionController.store(), receive settings via ajax call, store them in session SessionController.reset(), reset all settings
ProjectController.index(), add final processing to convert settings as a query string to visit initiative page again
The last bit is completed. Now integer type parameter "sortDir" works properly.
This is now ready for review.
Screen shots:
Login, go to Initiatives page directly
Sort by name in ascending order, by default All other filters are empty
Change sorting to Descending Enter search string as "aa" Then go to "My Institution" page
Do nothing, go back to "Initiatives" page
Previous settings are kept and applied
Click "Reset" link to reset all settings
All settings removed and reset to default values
Apply all settings Then go to "My Institution" page
Go to "Initiatives" page
All settings kept and applied
Go to "My Institution" page Click "SHOW INITIATIVES" button of one of the portfolios
All previous settings are reset Only apply portfolioFilter to show all initiatives of selected portfolio
Looks like some merge issues here - this branch overwrote all the changes to InitiativesList.vue from #139. I've added them back in here.
I can pass session variable value from session to Vue component tag. The value can be showed in front-end.
But... some questions...
This PR fixes #111.
User can select a portfolio by below action: My Institution > click "SHOW INITIATIVES" button of a portfolio
The corresponding portfolio is considered as user selected portfolio. When user clicks "Initiatives", initiative page will only show all initiatives of the selected portfolio.
User can reset the selected portfolio by clicking "My Institution", as this action means user wants to select another portfolio.
By the way, I would expect this handling may create user confusion. Some users may select a portfolio, then keep clicking "Initiatives" and asking where are my other initiatives...
Screen shots:
Select a portfolio
Assess red flags for one of the initiatives
Finish assessing red flags
Initiatives page shows initiatives of user selected portfolio only