Implemented Edit/Delete Per diem rates#53625
Conversation
|
Can two rows have the same destination and subrate (Breakfast etc.) field? canDestinationAndSubrateBeSameForTwoRates.movNIT: Deleting/backspace at -0 does not remove the negative sign. zeroValueRemains.mov |
|
When all categories are disabled the per diem settings page is blank. Should there be a message here for this case? |
Yes for now. Since OD allows that too. |
I will disable the page in this case in the cleanup. |
Only |
Reviewer Checklist
Screenshots/VideosAndroid: mWeb ChromeeditAndroidmWeb.mp4iOS: NativeeditiOS.moveditCurrencyiOS.moviOS: mWeb SafarieditiOSmWeb.MP4MacOS: Chrome / SafarieditChrome.movMacOS: DesktopeditDesktop.mov |
|
@Gonals We can merge since it checks for new files only. |
True, but regardless, it is not a good practice to merge with lint errors if we can avoid it (and we should try to always avoid it). Let's get the code in merge state in this PR and merge afterwards. |
|
✋ 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/Gonals in version: 9.0.78-0 🚀
|
|
🚀 Deployed to staging by https://github.com/Gonals in version: 9.0.78-0 🚀
|
2 similar comments
|
🚀 Deployed to staging by https://github.com/Gonals in version: 9.0.78-0 🚀
|
|
🚀 Deployed to staging by https://github.com/Gonals in version: 9.0.78-0 🚀
|
|
🚀 Deployed to staging by https://github.com/Gonals in version: 9.0.78-0 🚀
|
|
🚀 Deployed to staging by https://github.com/Gonals in version: 9.0.78-0 🚀
|
|
🚀 Deployed to staging by https://github.com/Gonals in version: 9.0.78-0 🚀
|
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.0.78-6 🚀
|
| * Check if amount is a decimal up to 3 digits | ||
| */ | ||
| function validateAmount(amount: string, decimals: number, amountMaxLength: number = CONST.IOU.AMOUNT_MAX_LENGTH): boolean { | ||
| function validateAmount(amount: string, decimals: number, amountMaxLength: number = CONST.IOU.AMOUNT_MAX_LENGTH, shouldAllowNegative = false): boolean { |
There was a problem hiding this comment.
Looks like this function was missing some logic which led to this issue:
- [HOLD for payment 2025-01-13] Per diem - Amount cannot be cleared when there is negative sign #54500
which was fixed in PR #54654.
| const selectedRate = customUnit?.rates?.[rateID]; | ||
| const selectedSubRate = selectedRate?.subRates?.find((subRate) => subRate.id === subRateID); | ||
|
|
||
| const amountValue = selectedSubRate?.rate ? convertToFrontendAmountAsString(Number(selectedSubRate.rate)) : undefined; |
There was a problem hiding this comment.
Coming from #55955 checklist: This page displays the value that isn’t the frontend value, so we should use the same approach to display the value on WorkspacePerDiemPage without currency


Explanation of Change
Fixed Issues
$ #50867
PROPOSAL:
Tests
Offline tests
Same as Tests
QA Steps
Same as Tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)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 and/or tagged@Expensify/designso 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
Screen.Recording.2024-12-18.at.9.25.03.PM.mov
Android: mWeb Chrome
Screen.Recording.2024-12-18.at.8.56.16.PM.mov
iOS: Native
Screen.Recording.2024-12-18.at.9.13.23.PM.mov
iOS: mWeb Safari
Screen.Recording.2024-12-18.at.8.52.11.PM.mov
MacOS: Chrome / Safari
Screen.Recording.2024-12-18.at.8.49.04.PM.mov
MacOS: Desktop
Screen.Recording.2024-12-18.at.9.04.06.PM.mov