Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/libs/SidebarUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ import {
shouldReportBeInOptionList,
shouldReportShowSubscript,
} from './ReportUtils';
import StringUtils from './StringUtils';
import {getTaskReportActionMessage} from './TaskUtils';

type WelcomeMessage = {phrase1?: string; messageText?: string; messageHtml?: string};
Expand Down Expand Up @@ -936,7 +937,7 @@ function getOptionData({
} else if (isActionOfType(lastAction, CONST.REPORT.ACTIONS.TYPE.ACTIONABLE_CARD_FRAUD_ALERT) && getOriginalMessage(lastAction)?.resolution) {
result.alternateText = getActionableCardFraudAlertResolutionMessage(translate, lastAction);
} else if (isActionOfType(lastAction, CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.UPDATE_DESCRIPTION)) {
result.alternateText = getWorkspaceDescriptionUpdatedMessage(translate, lastAction);
result.alternateText = StringUtils.lineBreaksToSpaces(Parser.htmlToText(getWorkspaceDescriptionUpdatedMessage(translate, lastAction)));
} else if (isActionOfType(lastAction, CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.UPDATE_CURRENCY)) {
result.alternateText = getWorkspaceCurrencyUpdateMessage(translate, lastAction);
} else if (isActionOfType(lastAction, CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.UPDATE_AUTO_REPORTING_FREQUENCY)) {
Expand Down Expand Up @@ -1053,7 +1054,7 @@ function getOptionData({
} else if (lastAction && isOldDotReportAction(lastAction)) {
result.alternateText = getMessageOfOldDotReportAction(translate, lastAction);
} else if (lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.ROOM_CHANGE_LOG.UPDATE_ROOM_DESCRIPTION) {
result.alternateText = Parser.htmlToText(getUpdateRoomDescriptionMessage(translate, lastAction));
result.alternateText = StringUtils.lineBreaksToSpaces(Parser.htmlToText(getUpdateRoomDescriptionMessage(translate, lastAction)));
} else if (lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.ROOM_CHANGE_LOG.UPDATE_ROOM_AVATAR) {
result.alternateText = getRoomAvatarUpdatedMessage(translate, lastAction);
} else if (lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.ADD_EMPLOYEE) {
Expand Down
5 changes: 3 additions & 2 deletions src/pages/inbox/HeaderView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ import {
shouldDisableDetailPage as shouldDisableDetailPageReportUtils,
shouldReportShowSubscript,
} from '@libs/ReportUtils';
import StringUtils from '@libs/StringUtils';
import {shouldShowDiscountBanner} from '@libs/SubscriptionUtils';
import type {SkeletonSpanReasonAttributes} from '@libs/telemetry/useSkeletonSpan';
import EarlyDiscountBanner from '@pages/settings/Subscription/CardSection/BillingBanner/EarlyDiscountBanner';
Expand Down Expand Up @@ -155,9 +156,9 @@ function HeaderView({onNavigationMenuButtonClicked, reportID}: HeaderViewProps)
const statusColorForInvoiceReport = isParentInvoiceAndIsChatThread ? getReportStatusColorStyle(theme, reportHeaderData?.stateNum, reportHeaderData?.statusNum) : {};
const isParentReportHeaderDataArchived = useReportIsArchived(reportHeaderData?.parentReportID);
const parentNavigationSubtitleData = getParentNavigationSubtitle(parentNavigationReport, policy, conciergeReportID, isParentReportHeaderDataArchived);
const reportDescription = Parser.htmlToText(getReportDescription(report));
const reportDescription = StringUtils.lineBreaksToSpaces(Parser.htmlToText(getReportDescription(report)));
const policyName = getPolicyName({report, returnEmptyIfNotFound: true});
const policyDescription = getPolicyDescriptionText(policy);
const policyDescription = StringUtils.lineBreaksToSpaces(getPolicyDescriptionText(policy));
const isPersonalExpenseChat = isPolicyExpenseChat && isCurrentUserSubmitter(report);
const hasTeam2025Pricing = useHasTeam2025Pricing();
// This is used to ensure that we display the text exactly as the user entered it when displaying thread header text, instead of parsing their text to HTML.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,7 @@ const ContextMenuActions: ContextMenuAction[] = [
} else if (reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.UPDATE_NAME) {
Clipboard.setString(Str.htmlDecode(getWorkspaceNameUpdatedMessage(translate, reportAction)));
} else if (reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.UPDATE_DESCRIPTION) {
Clipboard.setString(getWorkspaceDescriptionUpdatedMessage(translate, reportAction));
setClipboardMessage(getWorkspaceDescriptionUpdatedMessage(translate, reportAction));
} else if (reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.UPDATE_CURRENCY) {
Clipboard.setString(getWorkspaceCurrencyUpdateMessage(translate, reportAction));
} else if (reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.UPDATE_AUTO_REPORTING_FREQUENCY) {
Expand Down
Loading