Questions:
On the checkbox, we have just two links?
R: We can have more or less links, because the links will be created with base of docs in sanity.
Technical Refinement
Description
intl-whitelabel-app
TASK 1
Create a new modal for agreements;
This modal need to have a Title, description, checkbox and two buttons;
TASK 2
Create a text for checkbox with translates;
This moment, just English and Spanish;
TASK 3
On file: (this task is refinement of IBFEC-51)
path:
intl-whitelabel-app/workspaces/frontend/src/state/auth/index.tsx
We will export
validateAcceptanceAgreement
const { ... validateAcceptanceAgreement, } = useAccountAuthentication({ refreshCurrentUser, openErrorDialog, setCurrentUser, });
After that, we will create a
useEffect
:useEffect(() => { const validate = enableRequiredAcceptanceAgreementInfo ? validateAcceptanceAgreement(user) : []; if (validate?.length) { // TODO MODAL COMPONENT } }, [user, validateAcceptanceAgreement, getCtx]);
We will add on
useEffect
the methodgetCtx
because all time thegetCtx
will change, we will validate the Acceptance Agreements
TASK 4
Create a link for agreements;
Create a logic for create links in according to docs in sanity, for know how many docs, we can be use the integrations of IBFEC-51 story;
TASK 5
Create logic for buttons
Can click in "Continue" only after checked the checkbox, because the button stay disable in case the checkbox was unchecked;
The button “Disagree and Logout”, stay ability every time, and in case click can do logout user;
The unique form of close the modal is for the buttons
Screenshots
Model of mobile, have only first checkbox:
Model of Desktop:
POC
n/a
Impact Analysis
TODO
Unit Test
Create unit test for this task
MOCKS
TODO
Useful Links
Existent behavior: /wiki/spaces/IN/pages/4044391349
Refinement of IBFEC-51: IBFEC-51 – Transition page services (whitelabel-app)
Add Comment