Checkbox Market email

Questions:

  •  N/D

Technical Refinement

Description

To add the checkbox market email, we will need to change the ModalAgreement component.

  • Task 1—Create a feature flag

    enable-acceptance-agreements-marketing-email
  • Task 2—Add the checkbox market email on ModalAgreement component:

    • We will create a new attribute on component ModalAgreement

      • path: intl-whitelabel-app/workspaces/frontend/src/components/modal-agreement/index.tsx

        interface IModalAgreement { ... showMarketing: boolean; }
        const ModalAgreement: React.FC<IModalAgreement> = ({ ... showMarketing, })
      • On file intl-whitelabel-app/workspaces/frontend/src/components/modal-agreement/index.tsx, we will send the attribute value:

  • We will add the checkbox after the agreements links protected by feature flag:

    • path: intl-whitelabel-app/workspaces/frontend/src/components/modal-agreement/index.tsx

    • We will add new status to checked:

    • New handler change:

  • Task 3—Change the update acceptance agreement flow

    • We will create a new type:

      • path: intl-whitelabel-app/workspaces/frontend/src/state/auth/index.tsx

      • On the same file, we will change the clickContinue method:

        • before:

        • after:

        • We will need to remove the State acceptanceAgreementFromSanity because it won’t use anymore:

      • On file: intl-whitelabel-app/workspaces/frontend/src/components/modal-agreement/index.tsx, we will change the continueUpdate attribute to receive a parameter:

      • On onClickContinue method, we will send the parameters about continueUpdate method:

        • before:

        • after:

      • Now, we will need to add on promotionalEmails attribute to update information:

        • path: intl-whitelabel-app/workspaces/frontend/src/state/auth/hooks/use-current-user.ts

          • We will change the updateRequiredAcceptanceAgreementInfo method:

            • before:

            • after:

          • On input:

            • before:

            • after:

        • Task 4—Add the mparticle to promotionalEmails acceptance

          • We will create constants named:

            • path: intl-whitelabel-app/workspaces/frontend/src/state/mParticle/constants.ts

          • We will create an interface:

            • path: intl-whitelabel-app/workspaces/frontend/src/components/modal-agreement/index.tsx

            • On the same file, we will create a constant with attributes for event:

            • On the same file, we will update the existing event logRBIEvent on onClickDisagree to:

            • Now, we will update the existing event logRBIEvent on onClickContinue to:

            • We will update the existing event logEvent on useEffect to:

Screenshots

https://www.figma.com/file/sfH3mHXoEUfHbm5qMul0Vn/Popeyes?node-id=758-67566&t=5MEetCF5Hg6m1tlY-0

 POC

  • N/D

Impact Analysis

  • Acceptance Agreements flow (SignIn)

Dependencies

  • N/D

Unit Test

  • N/D

Useful Links

  • N/D