Standardize order status visualization and refine seller dashboard UI - #18
Merged
Conversation
…shboard UI
This commit introduces a centralized `OrderStatusBadge` component to provide consistent, semantically colored status indicators across the application and performs a comprehensive UI/UX overhaul of the seller dashboard to align with the design system.
Key changes:
- **Order Status System**:
- Implemented `OrderStatusBadge` to handle status coloring: Red (Cancelled/Failed), Purple (Returned), Green (Completed/Delivered), Blue (Awaiting Confirmation), and Orange (In-Transit/Processing).
- Integrated the new badge into `OrderDetailScreen` and `SellerOrdersScreen` for consistent status display.
- Updated `OrdersList` to highlight cancelled and failed orders with specific typography and color treatments.
- **Seller Dashboard Refinement**:
- **Typography & Branding**: Applied `Manrope` font for titles and `Inter` for body text across all seller components for better readability.
- **Visual Consistency**: Standardized colors using `theme.colorScheme` and `AppColors.darkSurface`, replacing hardcoded hex values to improve dark mode support.
- **Component Updates**: Refined `SellerStatCard`, `SellerMenuItemTile`, and `SalesPerformanceChart` with updated border radii, shadows, and semantic icon colors.
- **AI Posting Banner**: Enhanced the "AI Posting" banner with improved gradients, updated iconography, and refined button styling.
- **Functionality & Navigation**:
- Updated dashboard navigation to use tab-based routing for orders (e.g., navigating to specific tabs for "Đang xử lý" or "Hoàn thành").
- Improved `RefreshIndicator` logic in the seller dashboard to invalidate both order and refund providers simultaneously.
- **UI Cleanup**: Standardized back navigation icons to `arrow_back_ios_new_rounded` and updated various menu icons (e.g., using `local_shipping_outlined` for in-transit items).
…ering
This commit improves the logout process by ensuring all local user data and associated states are properly cleared. It also refactors the order status filtering logic across the buyer and seller interfaces for consistency.
Key changes:
- **Session Management**:
- Centralized local data cleanup in `HiveService.clearUserData`, which clears authentication, cart, and search history boxes while optionally preserving user preferences like theme mode.
- Updated `AuthProvider` to invalidate multiple providers (cart, wishlist, recent searches, and profile) upon logout or session expiration to ensure the UI resets correctly.
- Switched from manual box clearing to the new `clearUserData` method in `api_interceptors.dart` and `auth_repository.dart`.
- **Order Filtering Refinement**:
- Standardized order status logic in `OrdersList`, `ProfileScreen`, and Seller dashboard screens.
- Introduced a unified `hasRefund` check to handle declined, returned, or refunded orders consistently across "Processing", "Completed", and "Refund" tabs.
- **Data Repositories**:
- Added `clearCachedCart` to `CartRepository`.
- Added `clearRecentlyViewed` and `clearCachedListings` to `CatalogRepository` to support complete session wipes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.