-
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
Allow selfApproval when the rule feature is disabled #55386
base: main
Are you sure you want to change the base?
Conversation
@mountiny In this PR, FE allows the user to self-approve if the rule feature is disabled and |
@hungvu193 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
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.
Thanks! I am making change in the BE https://github.com/Expensify/Web-Expensify/pull/45169 that will make sure the preventSelfApproval value is reset to false when the rules feature is turned off.
Could you please make sure to update the optimisticData
for the action that toggles the rules feature to reflect that. Can you please add unit tests for the action and for the isAllowedToApproveExpenseReport
too?
if (!policy?.areRulesEnabled) { | ||
return true; | ||
} |
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 have made some backend changes where this will not be needed, actually this could lead to some older reports that never enabled or disabled the feature to skip this call because the default is false
but they could have set the prevent self approval to true in OldDot
if (!policy?.areRulesEnabled) { | |
return true; | |
} | |
if (!policy?.areRulesEnabled) { | |
return true; | |
} |
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.
Oops, if we do that, doesn't that we should select TonyMK proposal?
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 we could have, we can give TonyMK partial reward for their proposal
Explanation of Change
Allow selfApproval when the rule feature is disabled
Fixed Issues
$ #54206
PROPOSAL: #54206 (comment)
Tests
Offline tests
Same
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Screen.Recording.2025-01-17.at.13.53.06.mov
Android: mWeb Chrome
Screen.Recording.2025-01-17.at.13.48.56.mov
iOS: Native
Screen.Recording.2025-01-17.at.14.16.02.mov
iOS: mWeb Safari
Screen.Recording.2025-01-17.at.13.50.48.mov
MacOS: Chrome / Safari
Screen.Recording.2025-01-17.at.13.41.40.mov
MacOS: Desktop
Screen.Recording.2025-01-17.at.14.19.07.mov