-
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
feat: policy add distance rate #38035
feat: policy add distance rate #38035
Conversation
…App into feat/policy-add-distance-rate
…App into feat/policy-add-distance-rate
…App into feat/policy-add-distance-rate
…icy-add-distance-rate
…icy-add-distance-rate
src/pages/workspace/distanceRates/PolicyNewDistanceRatePage.tsx
Outdated
Show resolved
Hide resolved
src/pages/workspace/distanceRates/PolicyNewDistanceRatePage.tsx
Outdated
Show resolved
Hide resolved
src/pages/workspace/distanceRates/PolicyNewDistanceRatePage.tsx
Outdated
Show resolved
Hide resolved
src/pages/workspace/distanceRates/PolicyNewDistanceRatePage.tsx
Outdated
Show resolved
Hide resolved
…icy-add-distance-rate
…icy-add-distance-rate
…icy-add-distance-rate
@situchan I did some minor changes to method that fires on clear - it works for me now. I've also fixed the autofocus bug. You can test it again Screen.Recording.2024-03-14.at.09.48.56.mov |
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.
const validate = useCallback( | ||
(values: FormOnyxValues<typeof ONYXKEYS.FORMS.POLICY_CREATE_DISTANCE_RATE_FORM>) => validateRateValue(values, outputCurrency, toLocaleDigit), | ||
[outputCurrency, toLocaleDigit], | ||
); |
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.
Please test this change at least on one platform to ensure that nothing broken.
I am testing this also.
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.
Screen.Recording.2024-03-15.at.17.00.05.mov
I did. Just tested it again. Is something wrong?
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.
Retested. Looks good
@luacmartins this is out of scope but this is already being handled in other PR, right? Still able to access Distance rates, Add rate input pages after disabling in More features bug.mov |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/luacmartins in version: 1.4.54-0 🚀
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 1.4.54-4 🚀
|
@@ -3621,6 +3622,83 @@ function openPolicyMoreFeaturesPage(policyID: string) { | |||
API.read(READ_COMMANDS.OPEN_POLICY_MORE_FEATURES_PAGE, params); | |||
} | |||
|
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.
Case missed when updating workspace currency distance rates are reset based on old logic which had one distance rate: #30156
|
||
type RateValueForm = typeof ONYXKEYS.FORMS.WORKSPACE_RATE_AND_UNIT_FORM | typeof ONYXKEYS.FORMS.POLICY_CREATE_DISTANCE_RATE_FORM; | ||
|
||
function validateRateValue(values: FormOnyxValues<RateValueForm>, currency: string, toLocaleDigit: (arg: string) => string): FormInputErrors<RateValueForm> { |
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.
We miss to check the duplicated value and it caused this problem #51769
Details
Fixed Issues
$ #37512
PROPOSAL:
Tests
Offline tests
QA Steps
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 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
android.native.mp4
Android: mWeb Chrome
android.web.mp4
iOS: Native
ios.native.mp4
iOS: mWeb Safari
ios.web.mp4
MacOS: Chrome / Safari
web.mp4
MacOS: Desktop
desktop.mp4