Skip to content

Standardize order status visualization and refine seller dashboard UI - #18

Merged
TanKhoa1709 merged 3 commits into
mainfrom
fix/chore
Aug 15, 2026
Merged

Standardize order status visualization and refine seller dashboard UI#18
TanKhoa1709 merged 3 commits into
mainfrom
fix/chore

Conversation

@TanKhoa1709

Copy link
Copy Markdown
Collaborator

No description provided.

…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.
@TanKhoa1709
TanKhoa1709 merged commit 3c50f0d into main Aug 15, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant