Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[No QA] [Direct Feeds] Broken connection violation #50793
[No QA] [Direct Feeds] Broken connection violation #50793
Changes from 7 commits
2f90dd1
7e7c40c
7bce745
ba663d7
d9316e8
129025e
91e299d
630893f
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
my concern here is that for a fraction of time
useOnyx
gives undefined value, hope this doesn't affect the violation fetch. We can only test this in production, so lets stay hopeful 🤞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.
cool makes sense, according to docs:
Admins can also see violation, but we hide the Mark as cash button (same as the 7-day-hold doc.)
So we match the expected results
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.
@VickyStash :
What about the case when the submitter itself is the policy admin ?
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.
The logic for the admin will be applied. Do you have any concerns?
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.
yes, if i am admin and i submit a request with violation, Now i won't be able to see the
mark as cash
button even when i submitted the report, is that expected?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.
I guess so cause you, as admin, can go to Company Cards page and resolve the violation (fix broken connection).
cc @joekaufmanexpensify @mountiny To confirm as well.
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.
If the admin is a submitter on that report, lets show them the
Mark as cash
button too. So I guess the logic would be - show it to the users who is the owner of the report (submitter) even if they are adminThere 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.
c.c. @VickyStash
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.
I'll update the check in ~15 mins!
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.
@mountiny I've started to have some doubts about this approach as it goes against the docs.
In docs it mentiones that
https://docs.google.com/document/d/1rWjtZqMd15ACI5OUBTb_Kpd-1bAfrDGcZZU9jcQztUI/edit#bookmark=id.xzmm2dzeoc1g
Also the message for the admin doesn't mention Mark as cash button. Should we then update the text of the message for the admin?
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.
Updated! Thank you all for clarifications! ✨
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.
Shouldn't we save the description as string itself, we can convert the prop into string before passing ? (saying cause we don't want the BE to throw some weird error
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.
@allgandalf could you clarify what BE errors do you mean?
This component just renders the description display.
Since for the admin, the broken connection violation text can include TextLink (link to company cards), it returned as a component.
App/src/components/MoneyRequestHeaderStatusBar.tsx
Lines 18 to 28 in 91e299d
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.
When will we use these translations? Should we remove then?
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.
The updates were implemented in this PR.
It looks like it makes the error to be shown next to the merchant field on the Money Request View for rter violation.