From 097776f1eef37fed45511f883b02d014dc036c18 Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Wed, 30 Apr 2025 21:34:37 +0800 Subject: [PATCH 1/2] fix ws update desc system message shows HTML tag of the markdown --- src/libs/ReportActionsUtils.ts | 5 +++++ src/pages/home/report/PureReportActionItem.tsx | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/libs/ReportActionsUtils.ts b/src/libs/ReportActionsUtils.ts index 008ffad8b9f6..e48265f51593 100644 --- a/src/libs/ReportActionsUtils.ts +++ b/src/libs/ReportActionsUtils.ts @@ -1550,6 +1550,11 @@ function getReportActionMessageFragments(action: ReportAction): Message[] { return [{text: message, html: `${message}`, type: 'COMMENT'}]; } + if (isActionOfType(action, CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.UPDATE_DESCRIPTION)) { + const message = getWorkspaceDescriptionUpdatedMessage(action); + return [{text: message, html: `${message}`, type: 'COMMENT'}]; + } + if (isActionOfType(action, CONST.REPORT.ACTIONS.TYPE.REIMBURSED)) { const message = getReportActionMessageText(action); return [{text: message, html: `${message}`, type: 'COMMENT'}]; diff --git a/src/pages/home/report/PureReportActionItem.tsx b/src/pages/home/report/PureReportActionItem.tsx index 19e65a5fa44f..b56cbf25300a 100644 --- a/src/pages/home/report/PureReportActionItem.tsx +++ b/src/pages/home/report/PureReportActionItem.tsx @@ -1038,8 +1038,6 @@ function PureReportActionItem({ children = ; } else if (action.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.UPDATE_NAME) { children = ; - } else if (action.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.UPDATE_DESCRIPTION) { - children = ; } else if (action.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.UPDATE_CURRENCY) { children = ; } else if (action.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.UPDATE_AUTO_REPORTING_FREQUENCY) { From c9fe795c0550a840e395c7c2df12d55532bc31e6 Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Wed, 30 Apr 2025 23:27:26 +0800 Subject: [PATCH 2/2] lint --- src/pages/home/report/PureReportActionItem.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/home/report/PureReportActionItem.tsx b/src/pages/home/report/PureReportActionItem.tsx index b56cbf25300a..b10e7f253044 100644 --- a/src/pages/home/report/PureReportActionItem.tsx +++ b/src/pages/home/report/PureReportActionItem.tsx @@ -78,7 +78,6 @@ import { getWorkspaceCategoryUpdateMessage, getWorkspaceCurrencyUpdateMessage, getWorkspaceCustomUnitRateAddedMessage, - getWorkspaceDescriptionUpdatedMessage, getWorkspaceFrequencyUpdateMessage, getWorkspaceReportFieldAddMessage, getWorkspaceReportFieldDeleteMessage,