-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Add checks for editing APPROVED reports #33633
Merged
Merged
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
ba930e4
Add support for editing approved reports
youssef-lr bcb8dc4
Cleanup
youssef-lr c41b554
Fix bugs
youssef-lr 0459190
Lint
youssef-lr 394c82b
Merge branch 'main' into youssef_edit_approveed_reports
youssef-lr d273fc6
Fix typescript commplaining
youssef-lr 7ba5146
Add safety check
youssef-lr d85421d
Remove useMemo
youssef-lr 07e2148
Remove useMemo
youssef-lr 9a2ef5c
Remove unnecessary call to canEditFieldOfMoneyRequest
youssef-lr bdfa319
Address comments
youssef-lr de8ea54
Remove unneeded check
youssef-lr 982ba48
Remove code causing regression
youssef-lr cfaac6f
Add comment
youssef-lr f672b91
Update src/components/ReportActionItem/MoneyRequestView.js
youssef-lr 31e6a15
Update comment
youssef-lr ba8506d
Remove transaction dependency from canEditFieldOfMoneyRequest
youssef-lr c51f250
Update comment
youssef-lr 6ebe315
Fix typescript errors
youssef-lr eda03f7
Conflicts
youssef-lr c5e9c58
Fix condition
youssef-lr 1bea72c
Update comment
youssef-lr a5397e5
Merge branch 'main' into youssef_edit_approveed_reports
youssef-lr 22ec1dd
Fi comment
youssef-lr 7021d27
Add policy to proptypes with default
youssef-lr a5cdf15
Use isGroupPolicy
youssef-lr 7c894e2
Conflicts
youssef-lr 53e263a
Cleanup
youssef-lr 7de81d4
Cleanup
youssef-lr 4123a31
Remove unneeded check
youssef-lr a130cb3
Update src/libs/ReportUtils.ts
youssef-lr b6ba955
use isDraftExpenseReport
youssef-lr 1707e03
Move variables into the scope where they're needed
youssef-lr 8491e86
Rename methods
youssef-lr 3525c5e
Add code removed by mistake
youssef-lr 316b718
Make code clearer
youssef-lr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
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.
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 woops this doesn't take into account Free policies, I'll revert this back to testing the policy is not personal
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.
Can you also rename it to isPaidGroupPolicy?
And create a new one name isGroupPolicy checking for free too? it can be done in a follow up too
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.
yeah that sounds good
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.
done, though I just found out we have the same method in
PolicyUtils
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 think we're creating a lot of redundant helper methods we should probably some day clean things up :D