add toggleCardVisibility action
Feature
Merge Request
Related Issue
resolves #280 (closed)
either THIS or !230 (merged) is to be merged
Description of Feature
- insert
if
condition inAssessmentList
component to route "Available" cards to new component (see next point) - create new stateful component (within AssessmentFilterView folder),
AssessmentListTabbed
, withactiveTab
property in its own component state -- clickinghidden
orunhidden
makes that theactiveTab
. -
AssessmentListTabbed
filters assessments according tohidden
property (true = 'hidden', false = 'unhidden') and renders only those assessment cards, according toactiveTab
- create
toggleCardVisibility
function inactions/assessmentActions
to update card'shidden
boolean property in Redux store -- by dispatching UPDATE_ASSESSMENT_VARIABLE action type -- and to toggle UI button text (on assessment card) between 'hide' and 'unhide' - change
AssessmentCard
component into connected component -- mapDispatchToProps connectstoggleCardVisibility
function
What's Next?
-
decide if this implementation is ideal, flexible, scalable -
modify assessment card UI according to AssessmentFilterView section? (e.g., 'Current' and 'Completed' assessment cards may not need the 'hide'-'unhide' button)
Edited by dju