Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Ask for personal info before a transfer #1847

Merged
merged 12 commits into from
Jul 24, 2020

Conversation

ptbrowne
Copy link
Contributor

@ptbrowne ptbrowne commented Jul 23, 2020

In some cases, we will want to ask the user some information
before allowing transfers.

  • The myself io.cozy.contacts is checked to see that the birth city
    and nationality are present
  • If not, the PersonalForm asks for the data and updates the myself contact
  • The personal form can be displayed in two flavors depending on the page.
    It can be in a "Page" in the transfer page tab : when present, the
    transfer stepper is hidden, and the form takes its place. It can also
    be in a modal because it can be also accessed from the settings.

🚩 The "banks.transfers.need-personal-information" flag controls

  • If the personal information section is available in the settings
  • If personal information is asked before a transfer

image

@ptbrowne ptbrowne requested a review from Crash-- as a code owner July 23, 2020 19:25
@todo
Copy link

todo bot commented Jul 23, 2020

test nationality selectbox value

// TODO test nationality selectbox value
})
it('should save into the myself contact', async () => {
const onSaveSuccessful = jest.fn()
const { root, client } = await setup({


This comment was generated by todo based on a TODO comment in 87b0cf3 in #1847. cc @cozy.

Copy link
Contributor

@y-lohse y-lohse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few comments and questions, but nothing major!

src/locales/en.json Outdated Show resolved Hide resolved
src/locales/fr.json Show resolved Hide resolved
src/ducks/transfers/TransferPage.jsx Show resolved Hide resolved
src/ducks/personal-info/index.spec.jsx Outdated Show resolved Hide resolved
src/ducks/transfers/TransferPage.jsx Outdated Show resolved Hide resolved
src/ducks/transfers/TransferPage.jsx Show resolved Hide resolved
src/ducks/transfers/TransferPage.spec.jsx Outdated Show resolved Hide resolved
src/ducks/transfers/TransferPage.spec.jsx Outdated Show resolved Hide resolved
If the flag('banks.transfers.need-personal-information') is set to true,
the myself contact will be fetched when the transfer page is mounted.
We check if the birth city and nationality have been filled and if they
are not filled, we display a form that edits the myself contact
Needed to modify the myself contact
Copy link
Contributor

@y-lohse y-lohse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes, LGTM!

@probot-auto-merge probot-auto-merge bot merged commit bd39b0f into master Jul 24, 2020
@delete-merged-branch delete-merged-branch bot deleted the additional-information branch July 24, 2020 09:57
@ptbrowne ptbrowne removed the merge label Jul 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants