Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Questions:

...

  • Create feature flag;

  • The first step to use the loyalty promo code at checkout will be to change the validation promo code flow.

    • On promo code component field, we will need to add a feature flag:

      • When this flag is enabled: The promo code flow will be LOYALTY OFFER

      • When this flag is disabled: The promo code flow will be CBA OFFER (current flow)

  • We will create a new hook to contain all the rules of this flow

    • We can use the same hook used to offer page flow.

      • intl-whitelabel-app/workspaces/frontend/src/state/loyalty/hooks/use-redeem-promo-codes.ts

...

  • We will need to hide the CBA option to ensure that anything CBA option shows.

    • Then, we will create a new attribute to hide this option;

      • This attribute value can be the opposite of the value of feature flag (flag created on task 1)

4 - TASK: Apply discount again if not used

5 - TASK: Clean the applied offer when finished the order

  • When finished the order, we need to clean the offers on cookies, sessions and etc.

    • path: intl-whitelabel-app/workspaces/frontend/src/pages/order-confirmation/order-confirmation.tsx

...

  • First, it will call the PriceOrder mutation on intl-gateway or intl-graphql

  • This mutation will call the backend: intl-partners-service repository.

    • on this repository, will call:

      • public async price(@Body() payload: PriceOrderRequestDto): Promise<OrderResponseDto>

        • path: intl-partners-service/src/modules/orders/orders.controller.ts

      • after: public async price(input: IPriceOrderRequest): Promise<IOrder>

        • path: intl-partners-service/src/modules/orders/orders.service.ts

        • on this file is where calculate the order and is generated the rbiOrderId.

Info

Currently for some reason, the calc is wrong in 2 aspects:

  • Setting up wrong offers;

  • Missing configOffer calc;

...