Actions
ClientProject #3158
open[API] Dashboard api integration
Start date:
09/09/2025
Due date:
09/10/2025 (about 7 months late)
% Done:
100%
Estimated time:
8:00 h
Spent time:
Description
Description:
- Added API integration to fetch customer details in UserAccountInfo using Axios and React hooks (useEffect, useState).
- Replaced hardcoded name and email with dynamic values from the fetched customer data.
- Added loading and error states for better UX during data fetch.
- Created a new TypeScript type definition file customerDetails.ts to strongly type the customer details response.
- Purchase History Table Refactor: Broke down the large purchase history table into modular, reusable cell components (e.g., VehicleInfoCell, CurrencyCell, PaymentTransactionsCell, etc.) for improved readability and maintainability.
- Typed API Response: Introduced TypeScript types for purchase history API responses and related entities in dashboard.ts.
- Dynamic Data Fetching: Updated PurchaseHistory to fetch real data from the API and handle loading/error states.
- Componentization: Added new components for each table cell, including handling of document download buttons, status, and address details.
- UI Improvements: Table headers and rows are now generated via dedicated components, making the table structure clearer and easier to update.
- Invoice Address Details: Refactored to accept props and removed hardcoded dummy data.
- User Account Info: Now fetches and displays real customer balance and credit data from the backend.
- General Cleanup: Removed large blocks of commented-out or dummy code, improving code clarity and maintainability.
- Added skeleton loading components for user account info and purchase history table to improve UX during data fetch.
- Updated PurchaseHistory and UserAccountInfo to show skeletons while loading.
- Improved keyword input validation in FilterSection.
- Minor UI tweaks and code cleanup in dashboard components.
Actions