-
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
[OldDot Rules Migration] Expense report rules #47468
[OldDot Rules Migration] Expense report rules #47468
Conversation
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
it is https://github.com/user-attachments/assets/8016c61a-0144-4da4-86df-fe151b9dabc4 |
pendingAction: policy?.pendingFields?.shouldShowCustomReportTitleOption, | ||
onToggle: (isEnabled: boolean) => PolicyActions.enablePolicyDefaultReportTitle(policyID, isEnabled), | ||
subMenuItems: [ | ||
<OfflineWithFeedback pendingAction={policy?.fieldList?.[CONST.POLICY.FIELD_LIST_TITLE_FIELD_ID].pendingFields?.defaultValue}> |
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.
@BrtqKr How about this way?
<OfflineWithFeedback pendingAction={policy?.fieldList?.[CONST.POLICY.FIELD_LIST_TITLE_FIELD_ID].pendingFields?.defaultValue}> | |
<OfflineWithFeedback pendingAction={(!policy?.pendingFields?.shouldShowCustomReportTitleOption && policy?.fieldList?.[CONST.POLICY.FIELD_LIST_TITLE_FIELD_ID].pendingFields?.defaultValue) ? policy?.fieldList?.[CONST.POLICY.FIELD_LIST_TITLE_FIELD_ID].pendingFields?.defaultValue) : null | |
}> |
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.
might be confusing after some time, but seems to be working as expected, thank you!
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.
@BrtqKr Could you please detail this point? I think we need to discuss about this to avoid regression in the future
might be confusing after some time
@jamesdeanexpensify, as I noted in one of the comments. It's always 20k units, without considering the currency on the front-end, since the currency is always taken from the policy and not used during validation. My main worry was that if you use a currency where the exchange rate isn't close as for example gbp/usd then this limit might be a bit too rigorous, which would negatively affect user experience. I haven't seen any currency-based limits on the front-end tho, so this might possibly end up as a broader topic to discuss. |
@BrtqKr let's go with |
I think we might be overthinking this one. This feature is mainly used/enabled when a business bank account is connected for reimbursement. In order to even have "auto-reimbursement" you need a bank account and that bank account in many of our customer cases is going to be locked to USD. I would guess that it's highly unusual for someone to put a large value like $20,000 USD for auto-reimbursing reports. So, I think having that error message proposed by @jamesdeanexpensify is fine for now and we shouldn't worry too much about these other currencies. |
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.
Changes look great here. I think we are just waiting for someone to confirm the translations.
@BrtqKr Bump on #47468 (comment) and please resolve conflict |
@DylanDylann, swapped the condition |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-09-05.at.17.00.22.movAndroid: mWeb ChromeScreen.Recording.2024-09-05.at.17.06.29.moviOS: NativeScreen.Recording.2024-09-05.at.15.25.38.moviOS: mWeb SafariScreen.Recording.2024-09-05.at.15.22.30.movMacOS: Chrome / SafariScreen.Recording.2024-09-05.at.15.26.18.movMacOS: DesktopScreen.Recording.2024-09-05.at.15.21.21.mov |
@BrtqKr Lint 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.
Great work here! Thanks for the changes 🙇
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
This PR is failing for mWeb and Android because of issue #48894 |
Details
Fixed Issues
$ #47014
PROPOSAL:
Tests
Firstly make sure rules are enabled
Go to the workspaces and select one
Go to the workflows -> check if everything is disabled
Go to the rules -> check if bottom three rules are properly locked are redirecting to the more features section
Enable everything in Workflows
Go to the rules -> verify that every switch is unlocked
Go through each section and verify that editing everything works as expected
A couple of things to note regarding features:
Offline tests
QA Steps
Same as above
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.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.2024-08-23.at.11.39.31.mov
Android: mWeb Chrome
Screen.Recording.2024-08-23.at.11.50.14.mov
iOS: Native
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-08-23.at.11.24.35.mp4
iOS: mWeb Safari
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-08-23.at.11.17.07.mp4
MacOS: Chrome / Safari
Screen.Recording.2024-08-23.at.10.23.45.mov
MacOS: Desktop
Screen.Recording.2024-08-23.at.10.29.43.mov