853 B
853 B
Walkthrough - Dynamic Team Members Count
I have updated the Dashboard to dynamically display the total number of team members fetched from the Employee Directory API.
Changes
Dashboard
dashboard_page.dart
- Converted
DashboardPageto aStatefulWidget. - Added logic to fetch subordinate data using
DirectoryApiduring initialization. - Replaced the hardcoded '24' with the actual count from the API.
- Added a loading state ('...') while data is being fetched.
Verification Results
Manual Verification
- The "Team Members" card on the dashboard now shows the count of employees retrieved from the backend API.
- If the API call fails or is loading, the UI handles it gracefully.