Skip to content

Commit d42d185

Browse files
committed
fix: remove manager name from admin canceled request copy
1 parent 182576d commit d42d185

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

src/libs/OptionsListUtils/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ function getLastMessageTextForReport({
627627
} else if (isReimbursementQueuedAction(lastReportAction)) {
628628
lastMessageTextFromReport = getReimbursementQueuedActionMessage({reportAction: lastReportAction, reportOrID: report});
629629
} else if (isReimbursementDeQueuedOrCanceledAction(lastReportAction)) {
630-
lastMessageTextFromReport = getReimbursementDeQueuedOrCanceledActionMessage(lastReportAction, report, true);
630+
lastMessageTextFromReport = getReimbursementDeQueuedOrCanceledActionMessage(lastReportAction, report);
631631
} else if (isDeletedParentAction(lastReportAction) && reportUtilsIsChatReport(report)) {
632632
lastMessageTextFromReport = getDeletedParentActionMessageForChatReport(lastReportAction);
633633
} else if (isPendingRemove(lastReportAction) && report?.reportID && isThreadParentMessage(lastReportAction, report.reportID)) {

src/libs/ReportUtils.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3654,16 +3654,14 @@ function getReimbursementQueuedActionMessage({
36543654
function getReimbursementDeQueuedOrCanceledActionMessage(
36553655
reportAction: OnyxEntry<ReportAction<typeof CONST.REPORT.ACTIONS.TYPE.REIMBURSEMENT_DEQUEUED | typeof CONST.REPORT.ACTIONS.TYPE.REIMBURSEMENT_ACH_CANCELED>>,
36563656
reportOrID: OnyxEntry<Report> | string | SearchReport,
3657-
isLHNPreview = false,
36583657
): string {
36593658
const report = typeof reportOrID === 'string' ? getReport(reportOrID, allReports) : reportOrID;
36603659
const originalMessage = getOriginalMessage(reportAction);
36613660
const amount = originalMessage?.amount;
36623661
const currency = originalMessage?.currency;
36633662
const formattedAmount = convertToDisplayString(amount, currency);
36643663
if (originalMessage?.cancellationReason === CONST.REPORT.CANCEL_PAYMENT_REASONS.ADMIN || originalMessage?.cancellationReason === CONST.REPORT.CANCEL_PAYMENT_REASONS.USER) {
3665-
const payerOrApproverName = report?.managerID === currentUserAccountID || !isLHNPreview ? '' : getDisplayNameForParticipant({accountID: report?.managerID, shouldUseShortForm: true});
3666-
return translateLocal('iou.adminCanceledRequest', {manager: payerOrApproverName, amount: formattedAmount});
3664+
return translateLocal('iou.adminCanceledRequest');
36673665
}
36683666
const submitterDisplayName = getDisplayNameForParticipant({accountID: report?.ownerAccountID, shouldUseShortForm: true}) ?? '';
36693667
return translateLocal('iou.canceledRequest', {submitterDisplayName, amount: formattedAmount});

0 commit comments

Comments
 (0)