-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Implement report approvals #24639
Merged
Merged
Implement report approvals #24639
Changes from all commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
e1c0319
Add approveMoneyRequest action
youssef-lr b1e77ab
Add logic for showing the approve/settlement button
youssef-lr 386d9f9
Merge branch 'main' into youssef_approve_money_request
youssef-lr fa1bb92
Add helper methods
youssef-lr 691ceba
Allow APPROVED action to be displayed
youssef-lr e0da0f3
Fix optimistic data for approved action
youssef-lr f7b422e
Add missing imports and code tidying up
youssef-lr 9a8bef8
Display APPROVED action text in subtle color
youssef-lr 2d50862
Display approved reports as approved and not paid
youssef-lr e8543c8
Fix lastMessageText showing duplicate actor name
youssef-lr 00fb139
Merge branch 'main' into youssef_approve_money_request
youssef-lr 1140036
Code improvement
youssef-lr 266cd4c
Create new IOU report if the current report is approved
youssef-lr 5de9792
Display translated IOU/Report previews
youssef-lr 75e9ed4
Fix bug showing approve button when report is settled
youssef-lr 508021d
Display green dot properly
youssef-lr ecd428a
Cleanup
youssef-lr 18c5198
Clean up
youssef-lr 4e2a5c1
Merge branch 'main' into youssef_approve_money_request
youssef-lr da32226
Use getIOUReportActionMessage to format APPROVED action message
youssef-lr d75e3f8
Add spanish translations
youssef-lr 3930802
Code tidying up
youssef-lr c7d51cf
Fix IOU report being created instead of Expense report
youssef-lr d160aed
Code tidying up
youssef-lr 07682c5
Fix bug
youssef-lr 74b8caf
Merge branch 'main' into youssef_approve_money_request
youssef-lr 3b570e2
Bug fix
youssef-lr 273966c
Fix code action
youssef-lr 100f03d
Fix code actions
youssef-lr 03cc982
Merge branch 'main' into youssef_approve_money_request
youssef-lr 909cd45
Linting
youssef-lr 3462084
Style and translation
youssef-lr fca135f
Add back code removed by mistake
youssef-lr f7382f3
Fix test
youssef-lr 2d3bf23
Style fix
youssef-lr c134640
Remove no longer needed helper func
youssef-lr 216618b
Merge branch 'main' into youssef_approve_money_request
youssef-lr 21d5783
Show Pay button in report preview for admins when report is approved
youssef-lr 10a287a
Merge branch 'main' into youssef_approve_money_request
youssef-lr 03e9513
Clean up
youssef-lr ceff45b
Apply suggestions from code review
youssef-lr 2e373a8
Address PR comments
youssef-lr 95dc9e2
Address comments
youssef-lr 15ab698
Only display "Pay" button for the admin in the report preview
youssef-lr e7c4804
Optimise how policy is passed to money request componenets
youssef-lr c89f0a6
Merge branch 'main' into youssef_approve_money_request
youssef-lr 66b6724
Bug fix
youssef-lr 4833ce4
Another bug fix
youssef-lr 7dc3738
Merge branch 'main' into youssef_approve_money_request
youssef-lr 1b176a9
Merge branch 'main' into youssef_approve_money_request
youssef-lr 575524c
Apply suggestions from code review
youssef-lr b341aa1
Address PR comments
youssef-lr 577d9ad
Fix lint and approve button style
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
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.
Will we ever show Settlement and Approve button at the same time?
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.
No I think the conditionals implemented will prevent this, this specifically
const isPayer = policyType === CONST.POLICY.TYPE.CORPORATE ? isPolicyAdmin && isApproved