ClientProject #2978
Updated by Nazmul Hossain Shovon 8 months ago
**Page-Specific Filter Logic & Server Components**
* Introduced page-specific filter logic for truck and Korean stock pages.
* Added new server components: TruckFilterServer and KoreanFilterServer to fetch and provide relevant filter data for their respective pages.
* Updated main stock pages (all-stock, korean-stock, stock-list, truck-stock) to use these server components and display a loading skeleton (FilterSearchSkeleton) while loading.
**FilterSearch Component Enhancements**
* Refactored FilterSearch to support dynamic filter options and page-specific logic.
* Added a "3rd party" filter toggle (FilterCheck) that switches between bulk and order filter data.
* Disabled the "3rd party" toggle for truck and Korean stock pages.
* Improved comboboxes to show counts and support disabling, with better state management for all filter fields.
* Added a debounce/delay (500ms) to the filter toggle button to prevent rapid toggling.
**UI/UX Improvements**
* Added a new FilterSearchSkeleton for loading states.
* Improved grid/collapse logic for filter fields using a custom hook (useFilterSearchGrid).
* Enhanced combobox and filter input UX, including disabling and showing counts.
**Constants & Configs**
* Centralized page identifiers (TRUCK_PAGE, KOREAN_PAGE, HOME_PAGE) and filter toggle delay in constants.ts.
* Modularized filter configs in filterConfigs.ts for easier maintenance and extension.