IBFEC-51 – Transition page services (whitelabel-app)
Questions:
Possibles questions about this feature
Technical Refinement
Description
intl-whitelabel-graphql
TASK 1 - Create type
We will create a
type
namedRequiredAcceptanceAgreementInfo
path:
intl-whitelabel-graphql/src/functions/graphql/schemas/users.gql
type RequiredAcceptanceAgreementInfo { """ Acceptance Agreement ID """ id: String """ Updated Date """ updatedAt: String }
Also, we will add
requiredAcceptanceAgreementInfo
on typeUserDetails
type UserDetails { ... """ Acceptance Agreement info """ requiredAcceptanceAgreementInfo: [RequiredAcceptanceAgreementInfo] }
We will run the command:
yarn run graphql:types
After that, will be created an automatic code on file:
intl-whitelabel-graphql/src/functions/graphql/generated/graphql.ts
, probably, will be many changes, but we can to discard all, except of change related aboutrequiredAcceptanceAgreementInfo
intl-whitelabel-app
TASK 2 - Create fragment
We will add the attribute
requiredAcceptanceAgreementInfo
onfragment
:path:
intl-whitelabel-app/workspaces/frontend/src/remote/queries/user.ts
We will run the command:
After that, will be created an automatic code on file:
intl-whitelabel-app/workspaces/frontend/src/generated/rbi-graphql.tsx
, probably, will be many changes, but we can to discard all, except of change related about:
TASK 3 - Refactore method getRequiredAcceptanceAgreementInfo
We will change the existent method
getRequiredAcceptanceAgreementInfo
(name and container)path:
intl-whitelabel-app/workspaces/frontend/src/state/auth/hooks/use-account-authentication.ts
before
after
After that, we will update the call from method
signUp
before
after
We will create the method
validateAcceptanceAgreement
Finishing, we will export these methods
getAcceptanceAgreementFromSanity
andvalidateAcceptanceAgreement
on hookuseAccountAuthentication
return
TASK 4 - Add validation on index auth
On file:
path:
intl-whitelabel-app/workspaces/frontend/src/state/auth/index.tsx
We will export
validateAcceptanceAgreement
After that, we will create a
useEffect
:We will add on
useEffect
the methodgetCtx
because all time thegetCtx
will change, we will validate the Acceptance Agreements
Screenshots
TODO
POC
TODO
Impact Analysis
Signup
Authentication
Unit Test
Signup
Authentication
MOCKS
TODO
Useful Links
Existent behavior: https://rbictg.atlassian.net/wiki/spaces/IN/pages/4044391349