-
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
fix LHN preview for payment cancellation #39963
Conversation
@dukenv0307 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] |
src/libs/ReportUtils.ts
Outdated
if (!isLHNPreview) { | ||
payerOrApproverName = ''; | ||
} | ||
payerOrApproverName = payerOrApproverName ? `${payerOrApproverName}:` : payerOrApproverName; |
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.
Why don't we apply this logic in en/es.ts?
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 updated
src/libs/ReportUtils.ts
Outdated
const originalMessage = reportAction?.originalMessage as ReimbursementDeQueuedMessage | undefined; | ||
const amount = originalMessage?.amount; | ||
const currency = originalMessage?.currency; | ||
const formattedAmount = CurrencyUtils.convertToDisplayString(amount, currency); | ||
if (originalMessage?.cancellationReason === CONST.REPORT.CANCEL_PAYMENT_REASONS.ADMIN) { | ||
const payerOrApproverName = isExpenseReport(report) ? getPolicyName(report, false) : getDisplayNameForParticipant(report?.managerID) ?? ''; | ||
let payerOrApproverName = report?.managerID === currentUserAccountID ? '' : getDisplayNameForParticipant(report?.managerID, 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.
let payerOrApproverName = report?.managerID === currentUserAccountID ? '' : getDisplayNameForParticipant(report?.managerID, true); | |
let payerOrApproverName = report?.managerID === currentUserAccountID || isLHNPreview ? '' : getDisplayNameForParticipant(report?.managerID, true); | |
payerOrApproverName = payerOrApproverName ? `${payerOrApproverName}:` : payerOrApproverName; |
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 updated
code looks good |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-04-11.at.00.24.47.movAndroid: mWeb ChromeScreen.Recording.2024-04-10.at.23.19.47.moviOS: Nativeweb-resize.mp4iOS: mWeb SafariScreen.Recording.2024-04-10.at.23.18.06.movMacOS: Chrome / Safari
web-resize.mp4
web-resize.mp4MacOS: Desktopweb-resize.mp4 |
@nkdengineer Can you please update the test step to verify what's the expectations on admin side? Thanks |
@nkdengineer bump |
@dukenv0307 please check again |
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.
🟢
✋ 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/hayata-suenaga in version: 1.4.63-0 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.4.63-21 🚀
|
Details
Fixed Issues
$ #36704
PROPOSAL: #36704 (comment)
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 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-04-10.at.02.31.09.mov
Android: mWeb Chrome
Screen.Recording.2024-04-10.at.02.29.43.mov
iOS: Native
Screen.Recording.2024-04-10.at.02.25.52.mov
iOS: mWeb Safari
Screen.Recording.2024-04-10.at.02.23.43.mov
MacOS: Chrome / Safari
Screen.Recording.2024-04-10.at.02.16.19.mov
MacOS: Desktop
Screen.Recording.2024-04-10.at.02.18.35.mov