Repository navigation
Add checks for editing APPROVED reports #33633
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
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
bcb8dc4
Cleanup
c41b554
Fix bugs
0459190
Lint
394c82b
Merge branch 'main' into youssef_edit_approveed_reports
d273fc6
Fix typescript commplaining
7ba5146
Add safety check
d85421d
Remove useMemo
07e2148
Remove useMemo
9a2ef5c
Remove unnecessary call to canEditFieldOfMoneyRequest
bdfa319
Address comments
de8ea54
Remove unneeded check
982ba48
Remove code causing regression
cfaac6f
Add comment
f672b91
Update src/components/ReportActionItem/MoneyRequestView.js
31e6a15
Update comment
ba8506d
Remove transaction dependency from canEditFieldOfMoneyRequest
c51f250
Update comment
6ebe315
Fix typescript errors
eda03f7
Conflicts
c5e9c58
Fix condition
1bea72c
Update comment
a5397e5
Merge branch 'main' into youssef_edit_approveed_reports
22ec1dd
Fi comment
7021d27
Add policy to proptypes with default
a5cdf15
Use isGroupPolicy
7c894e2
Conflicts
53e263a
Cleanup
7de81d4
Cleanup
4123a31
Remove unneeded check
a130cb3
Update src/libs/ReportUtils.ts
b6ba955
use isDraftExpenseReport
1707e03
Move variables into the scope where they're needed
8491e86
Rename methods
3525c5e
Add code removed by mistake
316b718
Make code clearer
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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
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
PolicyUtilsThere 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