-
Notifications
You must be signed in to change notification settings - Fork 11
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
Feature/adding-CustomerClass-field #76
Feature/adding-CustomerClass-field #76
Conversation
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:
And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.
|
Beep boop 🤖 I noticed you didn't make any changes at the
In order to keep track, I'll create an issue if you decide now is not a good time
|
2701b3b
to
1e177f3
Compare
03a191c
to
70771ec
Compare
} | ||
|
||
getCustomerClass().then(response => response.json()).then(data => { | ||
if(!!data.clientProfileData && !!data.clientProfileData.customerClass) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think this suggestion could be enough?
if(!!data.clientProfileData && !!data.clientProfileData.customerClass) { | |
if(!!data?.clientProfileData?.customerClass) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lariciamota Updated the code with suggested changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Suraj-Rajmane Hi! Could you revert this change, please? It made the app test fail:
SyntaxError: /github/workspace/react/components/LogoutCustomerSession.tsx: Support for the experimental syntax 'optionalChaining' isn't currently enabled
We would have to update the config so it could pass, so for simplicity's sake, I'd ask you to discard my suggestion 🙏
8321ab0
to
6c65391
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left more changes
58c8d27
to
bca788a
Compare
ab3c128
to
b3cd6ed
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just lint the LogoutCustomerSession file and that's good for me! Great job, @Suraj-Rajmane and thank you for the contribution.
@igorbrasileiro I have already done the linting of LogoutCustomerSession file. Now it's not showing any error. |
Sorry for the delay, but have you every ran this |
@Suraj-Rajmane i clonned your repo, went to your branch, then ran ❯ yarn lint --fix
yarn run v1.22.18
warning package.json: No license field
$ tsc --noEmit --pretty && tslint -c tslint.json './**/*.ts' --fix
66 if (!data?.clientProfileData?.customerClass) {
~
components/LogoutCustomerSession.tsx:66:36 - error TS1109: Expression expected.
66 if (!data?.clientProfileData?.customerClass) {
~
components/LogoutCustomerSession.tsx:66:50 - error TS1005: ':' expected.
66 if (!data?.clientProfileData?.customerClass) {
~
|
fixed infinite loop issue made the suggested code changes Done linting for the file LogoutCustomer.tsx replaced then chain with async/await and ternary operator chain with if else block made the code easier to read fixed linting issue
9609fd4
to
97fe9f2
Compare
@igorbrasileiro Fixed the linting issue. Please check. |
Hi @Suraj-Rajmane |
@Suraj-Rajmane can you help us? |
Closed due inactivity |
What problem is this solving?
At present there are only 3 fields in the impersonating box such as Email, Document and Phone. Client want to add one extra field to the imersonating box called CustomerClass.
How to test it?
Link this PR on a store which uses vtex.telemarketing and test.
The fix can be tested on this workspace:
https://srjrmoils--rmoils.myvtex.com
Screenshots or example usage:
Before :
After :
Opened issue in the Store Discussion Repo
vtex-apps/store-discussion#675