OpenTree-Education / rhizone-lms

A learning management system focused on self-reflection.
https://rhi.zone
BSD 3-Clause Clear License
14 stars 7 forks source link

The assessments list page component needs to be separated into individual components for better readability and maintainability #537

Closed mgasquez closed 1 year ago

mgasquez commented 1 year ago

Describe the Feature / Enhancement

The assessments list page (AssessmentsPage.tsx) should be broken down into components to better fit the pattern laid out in ProgramsPage.

This issue continues the work from issue #520.

Additional Details and Resources

AssessmentsListTable should be a child of MUI TabPanels, and AssessmentsListTabs should be a child of an MUI Box. Both the TabPanels and Box should be children of AssessmentsListPage.

Correct Project Selected

Labels

mgasquez commented 1 year ago

EOD update: Dummy data is finished in dataAssessment.ts

Overview There is one case Graded, Active and Upcoming. FacilitatorAssessmentSubmissionsSummary is commented because It gives and error when is in submissions_summary. Tomorrow I will start breaking down components.

mgasquez commented 1 year ago

EOD: I coded a simple Assessment List version. Tomorrow I will continue working on it, I don't think it is valuable to push them to the repository because I am still analyzing and testing a solution.

seidior commented 1 year ago

As per @mgasquez's request, I've helped along the process of splitting up the list page component into smaller, more management components.

The first step I took was to bring in the latest from #514 to better consolidate our example data for the list page.

Next, I took a look at the code that @mgasquez and @Paryssatis had written for component separation and used as much of it as I could in separating out the tabs component and the table component.

Here's what's left to do on the ticket:

After that, I think it'll be ready for a pull request!

mgasquez commented 1 year ago

EOD: Tomorrow I will work on them.

mgasquez commented 1 year ago

EOD: Button was removed. Tomorrow I am continuing working in the logic for the table data.

mgasquez commented 1 year ago

EOD: Added filtering logic for the table.

Overview: I didn't delete the useEffect() originals. I want to mention that I am using numbers to reference 0-All and 2 for Past(it is Graded at the dataBase). I am not sure if there is a properties file to add these ones. When there is no data to show for one state(in this case Past Assessment). Screenshot below. Nav for Assessment List doesn't redirect to the initial Assessment List Page. So, you are forced to go to another page and click again the Assessment List Nav option if you want to see the Upcoming, Active assessments or All.

image

mgasquez commented 1 year ago

EOD: Created const and it was added to useEffect(). It kept only [currentStatusTab] as well.

seidior commented 1 year ago

Hi @mgasquez! Here are your remaining tasks:

Once you complete those tasks, you'll be able to open a pull request against the #520 branch, completing this task.