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
…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 |
…icy-add-distance-rate
| 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.
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.
Screen.Recording.2024-03-15.at.17.00.05.mov
I did. Just tested it again. Is something wrong?
|
@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.
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.
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 Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel so the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.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