kblincoe / QualOpt_SE701

2 stars 15 forks source link

#34 - link filtering of participants to studies #137

Closed jsoulsby closed 6 years ago

jsoulsby commented 6 years ago

This addresses the linkage of participants to the creation of studies by implementing filtering and sorting of participants.

Summary of changes image Added a "Participants" tab to the "Create a new Study" modal image The "Participants" tab features the same filter system from the participants page accessed via the QualOpt navbar at the top of the website. The only difference being a "Load Participants" button added to the modal as the participants table isn't populated when the modal is opened, this could be added as a feature request to dynamically populate the table on modal popup.

Prior to this, participants were selected via a 'select' class form input that was directly linked via ng-model to a participants array which were then used to populate a new study's participants field. I have since changed this to a group of checkboxes for an streamlined user experience that allows for a simpler identification of selected participants (a checkbox is easier to notice than a bunch of highlighted rows).

In saying so, there were difficulties in capturing checkbox selection for participants as well as importing the filter pipe from the participants page into the modal.

Some things to note The original issue - #34 suggests that there will be no use of the 'Participants" page once the filtering of participants has been linked to study creation and as such can be deleted. However, as many other features have been added since issue #34's creation (which have been listed on #34's issue page), with many of them dependent on the 'Participants' page, I have opted to leave it unchanged as to avoid tampering with the added features.

Last but not least, ideally the participants table would load automatically on tab change, so the user doesn't have to load them manually by clicking the 'Load Participants" button. However, I couldn't find the correct functionality supported with the ngb-tabset API and with my elementary knowledge of Angular 4 feel that it could be implemented better by someone more familiar with the tools available than I am.

jsoulsby commented 6 years ago

@Nateeo @Jcen902 Ready for review.

softeng-701 commented 6 years ago

@jsoulsby resolve conflicts, please!

jsoulsby commented 6 years ago

@softeng-701 All changes have and code reviews have been completed, ready for merge.