Skip to content

Conversation

@TiagoGranelli
Copy link

@TiagoGranelli TiagoGranelli commented Nov 24, 2021

What is the purpose of this pull request?

Solve the problems of the document field (CPF). This fix also fixes the problem that this PR is fixing Solve the problem of the document field (CPF) blocking even with the empty document.

What problem is this solving?

This pull request is for fixing bugs, currently, this block document property has two issues that have been resolved in this PR:

  1. The field is blocked as soon as the user enters 1 digit
  2. The field remains blocked if someone removes the document from that account

How should this be manually tested?

  1. Pass the blockDocument property in the declaration of the my-account application in the store

  2. Link the vtex.my-account application to the tksio-549 branch in the my-account module. It is a dependency.

  3. Link the three store / my-account / profile-form repositories and change the property value in the store. By default, the speaker is insufficient.
    If you do not pass the property or pass the false value, the field allows changes.
    If it is set to true and the field still has no saved value, the field will also allow editing, if the field is already saved, the field is blocked.

WS to test

https://dcnv208--tokstokio.myvtex.com

Screenshots or example usage

1st bugfix

Before

image
image

cpf.blocked.with.1.digit.mp4

After

image
image
field only block after submit
image

bugfix-cpf.blocked.after.submit.mp4

2nd bugfix

Before

image

After

image

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Requires change to documentation, which has been updated accordingly.

1- Added a check to block the field only when the document field is filled

2- Added an "active" property to not lock the field while the user is editing it
@vtex-io-ci-cd
Copy link

vtex-io-ci-cd bot commented Nov 24, 2021

Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖

Please select which version do you want to release:

  • Patch (backwards-compatible bug fixes)

  • Minor (backwards-compatible functionality)

  • Major (incompatible API changes)

And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.

  • No thanks, I would rather do it manually 😞

Add verification if the user's document is filled with the blockDocument property
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.

1 participant