Project

General

Profile

Edit Copy Actions

Feature #10382

open

To implement subscription channel, customer analytics &Testing End to end Loyalty reward module & fixing bugs

Added by Ajit A about 1 month ago. Updated about 1 month ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
Start date:
08/14/2026
Due date:
% Done:

100%

Estimated time:
8:00 h
Spent time:

Add

Subtasks


Add

Related issues

Actions #1

Updated by Ajit A about 1 month ago

  • Subject changed from Testing End to end Loyalty reward module and fixing gubs to Testing End to end Loyalty reward module and fixing bugs
Actions #2

Updated by Ajit A about 1 month ago

  • Assignee set to Ajit A
  • Estimated time set to 7:00 h
Actions #3

Updated by Ajit A about 1 month ago

  • Estimated time changed from 7:00 h to 8:00 h
Actions #4

Updated by Ajit A about 1 month ago

  • Subject changed from Testing End to end Loyalty reward module and fixing bugs to To Testing End to end Loyalty reward module and fixing bugs
Actions #5

Updated by Ajit A about 1 month ago

  • Subject changed from To Testing End to end Loyalty reward module and fixing bugs to To implement subscription channel, customer analytics &Testing End to end Loyalty reward module & fixing bugs
  • Status changed from New to In Progress

Updated by Ajit A about 1 month ago

  • % Done changed from 0 to 70

Backend (evergreen_pos_be)
Performance Optimization (Checkout API):
Refactored getCheckoutDataEcom in ecom.service.js to run independent database queries (cart, customer, target coupon, and all available coupons) in parallel using Promise.all(). This significantly reduces latency and speeds up the /api/v1/comm/checkout endpoint.
Loyalty Channel Mapping ("E-Commerce order"):
Models: Updated the Client model (Client-model.js) channelType enum to explicitly include "E-Commerce order" and "E-Commerce Preorder".
Loyalty Engine: Updated loyaltyEngine.js program eligibility logic and point earning rates to recognize the "E-Commerce order" channel appropriately, resolving mapping issues where it previously defaulted to "online".
Services: Updated listTenantCustomerLoyaltyAccounts in loyaltyProgram.service.js to intercept and dynamically format legacy ECOM_REGULAR and ONLINE strings as "E-Commerce order" for presentation in the frontend customer analytics.
Data Migration: Authored and ran a one-off MongoDB database script (update-channel-type.js) to permanently migrate existing channelType: "online" properties to "E-Commerce order" on the Client collection.
Product Selection Payload Updates:
Updated product services (getBestSellingPublic, getRelatedProducts, getProductForPosK, getProductForEcommerce) to include new fields in the response payload: isPreorder, preOrderQuantity, preorderLimit, reservedQuantity, reservedOrderQuantity, and isSubscriptionControlled.
POS Frontend (evergreen_pos_fe)
Loyalty Customer Analytics UI:
Updated the CHANNEL_OPTIONS filter dropdown array in LoyaltyCustomerAnalytics.tsx to read "E-Commerce order" instead of "online".
Embedded the new <LoyaltyLeaderboard /> component within the main analytics view.
Loyalty Reward Settings:
Added support for a new "subscription" channel type across the settings UI (LoyaltyRewardSettings.tsx), adding it to channel arrays and rate configurations (LoyaltyProgramForm).
E-Commerce Frontend (evergreenpos_E-commerce_new)
Loyalty Point Redemption UI Check:
Updated the LoyaltyCheckoutPanel.tsx checkout block to conditionally render redemption checkboxes. If the available redeem value is 0 or less than the minimum required points, the checkbox is hidden. Instead, it now displays the points required to reach the next redemption tier.
Network & Redundancy Optimization (Header API Calls):
Prevented redundant, repetitive API calls to /api/v1/nus-shop/get-public-company-settings triggered by scroll listeners on the Header by disabling refetchOnMount and refetchOnWindowFocus in useCompanySettings.ts.
Component Refactoring:
Cleaned up the main Header.tsx file by extracting the CountryCurrencySelector logic into its own dedicated component.

Updated by Ajit A about 1 month ago

  • % Done changed from 70 to 100

Completed

Actions #8

Updated by Ajit A about 1 month ago

  • Status changed from In Progress to Resolved
Edit Copy Actions

Also available in: Atom PDF