Description:
The Completion Percentage card on the top right does not sync properly with course progress when navigating between tabs (Available, Enrolled, Completed).
Steps to Reproduce:
- Open Dashboard.
- Observe Completion Percentage card → Initially shows 0%.
- Navigate to "Completed" tab → Completion percentage updates to actual value.
- Navigate back to "Available" tab → Completion percentage still shows the same value instead of updating based on current state.
Expected Behavior:
The Completion Percentage card should always reflect the correct and current progress regardless of which tab is selected. The value should be synchronized with the course data globally, not updated only when visiting the Completed tab.
Actual Behavior:
The percentage updates only after visiting the Completed tab and does not reset or recalculate when navigating between tabs.
Possible Cause:
This may be a state management issue where the completion percentage is being calculated only when the Completed tab is rendered, instead of being derived from the global course state.
Suggested Fix:
- Move completion percentage calculation to a global state (context/store).
- Recalculate percentage whenever course state changes.
- Ensure the Completion Percentage card listens to the same state as Enrolled/Completed tabs.
Environment:
- OS: Windows
- Browser: Chrome
Impact:
This causes inconsistent UI data and may confuse users as the dashboard statistics do not reflect real-time data.
I would like to work on this issue and submit a PR if assigned.
Description:
The Completion Percentage card on the top right does not sync properly with course progress when navigating between tabs (Available, Enrolled, Completed).
Steps to Reproduce:
Expected Behavior:
The Completion Percentage card should always reflect the correct and current progress regardless of which tab is selected. The value should be synchronized with the course data globally, not updated only when visiting the Completed tab.
Actual Behavior:
The percentage updates only after visiting the Completed tab and does not reset or recalculate when navigating between tabs.
Possible Cause:
This may be a state management issue where the completion percentage is being calculated only when the Completed tab is rendered, instead of being derived from the global course state.
Suggested Fix:
Environment:
Impact:
This causes inconsistent UI data and may confuse users as the dashboard statistics do not reflect real-time data.
I would like to work on this issue and submit a PR if assigned.