Feature #10313
openAdmin Orders: cascading Fulfillment → Payment filters with corrected counts & UI
Start date:
08/10/2026
Due date:
08/10/2026 (39 days late)
% Done:
100%
Estimated time:
6:00 h
Spent time:
Description
Summary
Refactored the Admin Orders (Online Orders / Preorders) analytics filter cards so filters work in a clear hierarchy: Fulfillment first, then Payment within the selected fulfillment slice. Fixed mismatched counts, Cancelled analytics bugs, store/pickup meta showing 0, and UI polish issues.¶
Problem
- Selecting a fulfillment status (e.g. Picked) did not correctly scope payment filter counts (Payment All could still show the global total).
- Selecting a payment status incorrectly collapsed Fulfillment "All" counts (e.g. Fulfillment All 235 vs Payment All 239).
- Fulfillment and payment filters cleared each other (exclusive), which blocked AND filtering.
- Cancelled status produced empty metrics/payment counts because analytics excluded cancelled orders.
- Stores / pickup locations always showed 0 until "More Filters" was opened.
- UI issues: Cancelled wrapping to a second row, long labels, truncated search placeholder, redundant "Active filters: All…" text.
Solution
- Cascading filter model:
- Fulfillment is primary.
- Payment applies inside the selected fulfillment set (both can be active).
- Changing fulfillment resets payment so payment counts recompute for the new slice.
- Snapshot fulfillment status counts (not narrowed by payment) and payment breakdown counts (scoped to fulfillment).
- Metrics bar follows the current combined selection.
- Backend analytics: when the filtered set is cancelled-only, count those orders so Cancelled tab metrics/payment are not zeroed.
- Always load pickup-location summary for preorders so store/location counts populate on the cards.
- UI: single-row fulfillment tabs with Cancelled visually separated (divider + rose active state); shorter payment "Canceled" label; clearer helper text; cleaner empty-filter state.
- Fulfillment is primary.
- Payment applies inside the selected fulfillment set (both can be active).
- Changing fulfillment resets payment so payment counts recompute for the new slice.
Files
evergreen_pos_fe/src/pages/Nuresy/Inventory/Products/AdminOrder.tsx
evergreen_pos_be/src/services/nursery/order.service.js
evergreen_pos_fe/src/pages/Nuresy/Inventory/Products/AdminOrder.tsxevergreen_pos_be/src/services/nursery/order.service.jsTest plan
- Open Preorders → confirm metrics + Fulfillment/Payment tabs load with matching All counts.
- Click Picked → Payment All equals Picked count; payment buckets sum to that slice.
- Click Paid while on All fulfillment → Fulfillment All stays full total; table/metrics show paid-only.
- Click Picked then Unpaid → table shows intersection; clearing payment keeps Picked.
- Click Cancelled → orders list + metrics/payment counts are non-zero.
- Confirm stores / pickup locations are non-zero when data exists.
- Confirm Cancelled stays on the same row; search placeholder is readable.
Subtasks
Related issues