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: 5 additions & 0 deletions src/CONST/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1102,6 +1102,7 @@ const CONST = {
ACTIONABLE_ADD_PAYMENT_CARD: 'ACTIONABLEADDPAYMENTCARD',
ACTIONABLE_JOIN_REQUEST: 'ACTIONABLEJOINREQUEST',
ACTIONABLE_MENTION_WHISPER: 'ACTIONABLEMENTIONWHISPER',
ACTIONABLE_MENTION_INVITE_TO_SUBMIT_EXPENSE_CONFIRM_WHISPER: 'ACTIONABLEMENTIONINVITETOSUBMITEXPENSECONFIRMWHISPER',
ACTIONABLE_REPORT_MENTION_WHISPER: 'ACTIONABLEREPORTMENTIONWHISPER',
ACTIONABLE_TRACK_EXPENSE_WHISPER: 'ACTIONABLETRACKEXPENSEWHISPER',
POLICY_EXPENSE_CHAT_WELCOME_WHISPER: 'POLICYEXPENSECHATWELCOMEWHISPER',
Expand Down Expand Up @@ -1286,8 +1287,12 @@ const CONST = {
},
ACTIONABLE_MENTION_WHISPER_RESOLUTION: {
INVITE: 'invited',
INVITE_TO_SUBMIT_EXPENSE: 'inviteToSubmitExpense',
NOTHING: 'nothing',
},
ACTIONABLE_MENTION_INVITE_TO_SUBMIT_EXPENSE_CONFIRM_WHISPER: {
DONE: 'done',
},
ACTIONABLE_TRACK_EXPENSE_WHISPER_RESOLUTION: {
NOTHING: 'nothing',
},
Expand Down
3 changes: 2 additions & 1 deletion src/languages/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6310,7 +6310,8 @@ const translations = {
levelThreeResult: 'Nachricht aus dem Kanal entfernt, anonyme Warnung gesendet und Nachricht zur Überprüfung gemeldet.',
},
actionableMentionWhisperOptions: {
invite: 'Lade sie ein',
inviteToSubmitExpense: 'Zum Einreichen von Ausgaben einladen',
inviteToChat: 'Nur zum Chatten einladen',
nothing: 'Nichts tun',
},
actionableMentionJoinWorkspaceOptions: {
Expand Down
3 changes: 2 additions & 1 deletion src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6279,7 +6279,8 @@ const translations = {
levelThreeResult: 'Message removed from channel plus anonymous warning and message is reported for review.',
},
actionableMentionWhisperOptions: {
invite: 'Invite them',
inviteToSubmitExpense: 'Invite to submit expenses',
inviteToChat: 'Invite to chat only',
nothing: 'Do nothing',
},
actionableMentionJoinWorkspaceOptions: {
Expand Down
3 changes: 2 additions & 1 deletion src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6743,7 +6743,8 @@ const translations = {
copied: '¡Copiado!',
},
actionableMentionWhisperOptions: {
invite: 'Invitar',
inviteToSubmitExpense: 'Invitar a enviar gastos',
inviteToChat: 'Invitar solo a chatear',
nothing: 'No hacer nada',
},
actionableMentionJoinWorkspaceOptions: {
Expand Down
3 changes: 2 additions & 1 deletion src/languages/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6321,7 +6321,8 @@ const translations = {
levelThreeResult: 'Message supprimé du canal avec un avertissement anonyme et le message est signalé pour examen.',
},
actionableMentionWhisperOptions: {
invite: 'Invitez-les',
inviteToSubmitExpense: 'Inviter à soumettre des dépenses',
inviteToChat: 'Inviter uniquement à discuter',
nothing: 'Ne rien faire',
},
actionableMentionJoinWorkspaceOptions: {
Expand Down
5 changes: 3 additions & 2 deletions src/languages/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6325,8 +6325,9 @@ const translations = {
levelThreeResult: 'Messaggio rimosso dal canale più avviso anonimo e messaggio segnalato per revisione.',
},
actionableMentionWhisperOptions: {
invite: 'Invitali',
nothing: 'Do nothing',
inviteToSubmitExpense: 'Invita a inviare le spese',
inviteToChat: 'Invita solo a chattare',
nothing: 'Non fare nulla',
},
actionableMentionJoinWorkspaceOptions: {
accept: 'Accetta',
Expand Down
3 changes: 2 additions & 1 deletion src/languages/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6283,7 +6283,8 @@ const translations = {
levelThreeResult: 'チャンネルからメッセージが削除され、匿名の警告が行われ、メッセージがレビューのために報告されました。',
},
actionableMentionWhisperOptions: {
invite: '招待する',
inviteToSubmitExpense: '経費の提出に招待する',
inviteToChat: 'チャットのみ招待',
nothing: '何もしない',
},
actionableMentionJoinWorkspaceOptions: {
Expand Down
5 changes: 3 additions & 2 deletions src/languages/nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6317,8 +6317,9 @@ const translations = {
levelThreeResult: 'Bericht verwijderd uit kanaal plus anonieme waarschuwing en bericht is gerapporteerd voor beoordeling.',
},
actionableMentionWhisperOptions: {
invite: 'Nodig hen uit',
nothing: 'Do nothing',
inviteToSubmitExpense: 'Uitnodigen om onkosten in te dienen',
inviteToChat: 'Alleen uitnodigen om te chatten',
nothing: 'Niets doen',
},
actionableMentionJoinWorkspaceOptions: {
accept: 'Accepteren',
Expand Down
5 changes: 3 additions & 2 deletions src/languages/pl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6302,8 +6302,9 @@ const translations = {
levelThreeResult: 'Wiadomość usunięta z kanału, dodano anonimowe ostrzeżenie, a wiadomość została zgłoszona do przeglądu.',
},
actionableMentionWhisperOptions: {
invite: 'Zaproś ich',
nothing: 'Do nothing',
inviteToSubmitExpense: 'Zaproś do przesyłania wydatków',
inviteToChat: 'Zaproś tylko do czatu',
nothing: 'Nie rób nic',
},
actionableMentionJoinWorkspaceOptions: {
accept: 'Akceptuj',
Expand Down
3 changes: 2 additions & 1 deletion src/languages/pt-BR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6315,7 +6315,8 @@ const translations = {
levelThreeResult: 'Mensagem removida do canal, além de um aviso anônimo, e a mensagem foi relatada para revisão.',
},
actionableMentionWhisperOptions: {
invite: 'Convide-os',
inviteToSubmitExpense: 'Convidar para enviar despesas',
inviteToChat: 'Convidar apenas para conversar',
nothing: 'Não faça nada',
},
actionableMentionJoinWorkspaceOptions: {
Expand Down
5 changes: 3 additions & 2 deletions src/languages/zh-hans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6203,8 +6203,9 @@ const translations = {
levelThreeResult: '消息已从频道中移除,并收到匿名警告,消息已提交审核。',
},
actionableMentionWhisperOptions: {
invite: '邀请他们',
nothing: 'Do nothing',
inviteToSubmitExpense: '邀请提交费用',
inviteToChat: '仅邀请聊天',
nothing: '什么都不做',
},
actionableMentionJoinWorkspaceOptions: {
accept: '接受',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type CONST from '@src/CONST';

type ResolveActionableMentionWhisperParams = {
reportActionID: string;
resolution: ValueOf<typeof CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION>;
resolution: ValueOf<typeof CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION> | ValueOf<typeof CONST.REPORT.ACTIONABLE_MENTION_INVITE_TO_SUBMIT_EXPENSE_CONFIRM_WHISPER>;
};

export default ResolveActionableMentionWhisperParams;
7 changes: 7 additions & 0 deletions src/libs/ReportActionsUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
type MemberChangeMessageElement = MessageTextElement | MemberChangeMessageUserMentionElement | MemberChangeMessageRoomReferenceElement;

let allReportActions: OnyxCollection<ReportActions>;
Onyx.connect({

Check warning on line 60 in src/libs/ReportActionsUtils.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.COLLECTION.REPORT_ACTIONS,
waitForCollectionCallback: true,
callback: (actions) => {
Expand All @@ -69,7 +69,7 @@
});

let allReports: OnyxCollection<Report>;
Onyx.connect({

Check warning on line 72 in src/libs/ReportActionsUtils.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.COLLECTION.REPORT,
waitForCollectionCallback: true,
callback: (value) => {
Expand All @@ -78,14 +78,14 @@
});

let isNetworkOffline = false;
Onyx.connect({

Check warning on line 81 in src/libs/ReportActionsUtils.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.NETWORK,
callback: (val) => (isNetworkOffline = val?.isOffline ?? false),
});

let currentUserAccountID: number | undefined;
let currentEmail = '';
Onyx.connect({

Check warning on line 88 in src/libs/ReportActionsUtils.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.SESSION,
callback: (value) => {
// When signed out, value is undefined
Expand All @@ -99,7 +99,7 @@
});

let privatePersonalDetails: PrivatePersonalDetails | undefined;
Onyx.connect({

Check warning on line 102 in src/libs/ReportActionsUtils.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.PRIVATE_PERSONAL_DETAILS,
callback: (personalDetails) => {
privatePersonalDetails = personalDetails;
Expand Down Expand Up @@ -733,6 +733,12 @@
return isActionOfType(reportAction, CONST.REPORT.ACTIONS.TYPE.ACTIONABLE_MENTION_WHISPER);
}

function isActionableMentionInviteToSubmitExpenseConfirmWhisper(
reportAction: OnyxEntry<ReportAction>,
): reportAction is ReportAction<typeof CONST.REPORT.ACTIONS.TYPE.ACTIONABLE_MENTION_INVITE_TO_SUBMIT_EXPENSE_CONFIRM_WHISPER> {
return isActionOfType(reportAction, CONST.REPORT.ACTIONS.TYPE.ACTIONABLE_MENTION_INVITE_TO_SUBMIT_EXPENSE_CONFIRM_WHISPER);
}

/**
* Checks if a given report action corresponds to an actionable report mention whisper.
* @param reportAction
Expand Down Expand Up @@ -2991,6 +2997,7 @@
isActionableJoinRequest,
isActionableJoinRequestPending,
isActionableMentionWhisper,
isActionableMentionInviteToSubmitExpenseConfirmWhisper,
isActionableReportMentionWhisper,
isActionableTrackExpense,
isExpenseChatWelcomeWhisper,
Expand Down
42 changes: 39 additions & 3 deletions src/libs/actions/Report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
import {close} from './Modal';
import navigateFromNotification from './navigateFromNotification';
import {getAll} from './PersistedRequests';
import {buildAddMembersToWorkspaceOnyxData, buildRoomMembersOnyxData} from './Policy/Member';
import {addMembersToWorkspace, buildAddMembersToWorkspaceOnyxData, buildRoomMembersOnyxData} from './Policy/Member';
import {createPolicyExpenseChats} from './Policy/Policy';
import {
createUpdateCommentMatcher,
Expand Down Expand Up @@ -266,7 +266,7 @@
let currentUserAccountID = -1;
let currentUserEmail: string | undefined;

Onyx.connect({

Check warning on line 269 in src/libs/actions/Report.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.SESSION,
callback: (value) => {
// When signed out, val is undefined
Expand All @@ -279,13 +279,13 @@
},
});

Onyx.connect({

Check warning on line 282 in src/libs/actions/Report.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.CONCIERGE_REPORT_ID,
callback: (value) => (conciergeReportID = value),
});

let preferredSkinTone: number = CONST.EMOJI_DEFAULT_SKIN_TONE;
Onyx.connect({

Check warning on line 288 in src/libs/actions/Report.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.PREFERRED_EMOJI_SKIN_TONE,
callback: (value) => {
preferredSkinTone = EmojiUtils.getPreferredSkinToneIndex(value);
Expand All @@ -295,7 +295,7 @@
// map of reportID to all reportActions for that report
const allReportActions: OnyxCollection<ReportActions> = {};

Onyx.connect({

Check warning on line 298 in src/libs/actions/Report.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.COLLECTION.REPORT_ACTIONS,
callback: (actions, key) => {
if (!key || !actions) {
Expand All @@ -307,7 +307,7 @@
});

let allTransactionViolations: OnyxCollection<TransactionViolations> = {};
Onyx.connect({

Check warning on line 310 in src/libs/actions/Report.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.COLLECTION.TRANSACTION_VIOLATIONS,
waitForCollectionCallback: true,
callback: (value) => (allTransactionViolations = value),
Expand Down Expand Up @@ -4346,10 +4346,37 @@
function resolveActionableMentionWhisper(
reportID: string | undefined,
reportAction: OnyxEntry<ReportAction>,
resolution: ValueOf<typeof CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION>,
resolution: ValueOf<typeof CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION> | ValueOf<typeof CONST.REPORT.ACTIONABLE_MENTION_INVITE_TO_SUBMIT_EXPENSE_CONFIRM_WHISPER>,
policy?: OnyxEntry<Policy>,
) {
if (!reportAction || !reportID) {
return;
}

if (ReportActionsUtils.isActionableMentionWhisper(reportAction) && resolution === CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE_TO_SUBMIT_EXPENSE) {
const actionOriginalMessage = ReportActionsUtils.getOriginalMessage(reportAction);

const policyID = policy?.id;

if (actionOriginalMessage && policyID) {
const currentUserDetails = allPersonalDetails?.[getCurrentUserAccountID()];
const welcomeNoteSubject = `# ${currentUserDetails?.displayName ?? ''} invited you to ${policy?.name ?? 'a workspace'}`;
const welcomeNote = Localize.translateLocal('workspace.common.welcomeNote');
const policyMemberAccountIDs = Object.values(getMemberAccountIDsForWorkspace(policy?.employeeList, false, false));
addMembersToWorkspace(
{
[`${actionOriginalMessage.inviteeEmails?.at(0)}`]: actionOriginalMessage.inviteeAccountIDs?.at(0) ?? CONST.DEFAULT_NUMBER_ID,
},
`${welcomeNoteSubject}\n\n${welcomeNote}`,
policyID,
policyMemberAccountIDs,
CONST.POLICY.ROLE.USER,
);
}
}

const message = ReportActionsUtils.getReportActionMessage(reportAction);
if (!message || !reportAction || !reportID) {
if (!message) {
return;
}

Expand Down Expand Up @@ -4423,6 +4450,14 @@
API.write(WRITE_COMMANDS.RESOLVE_ACTIONABLE_MENTION_WHISPER, parameters, {optimisticData, failureData});
}

function resolveActionableMentionConfirmWhisper(
reportID: string | undefined,
reportAction: OnyxEntry<ReportAction>,
resolution: ValueOf<typeof CONST.REPORT.ACTIONABLE_MENTION_INVITE_TO_SUBMIT_EXPENSE_CONFIRM_WHISPER>,
) {
resolveActionableMentionWhisper(reportID, reportAction, resolution);
}

function resolveActionableReportMentionWhisper(
reportId: string | undefined,
reportAction: OnyxEntry<ReportAction>,
Expand Down Expand Up @@ -5870,6 +5905,7 @@
removeFromGroupChat,
removeFromRoom,
resolveActionableMentionWhisper,
resolveActionableMentionConfirmWhisper,
resolveActionableReportMentionWhisper,
resolveConciergeCategoryOptions,
savePrivateNotesDraft,
Expand Down
60 changes: 47 additions & 13 deletions src/pages/home/report/PureReportActionItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ import {isReportMessageAttachment} from '@libs/isReportMessageAttachment';
import Navigation from '@libs/Navigation/Navigation';
import Permissions from '@libs/Permissions';
import {getDisplayNameOrDefault} from '@libs/PersonalDetailsUtils';
import {getCleanedTagName} from '@libs/PolicyUtils';
import {getCleanedTagName, getPersonalPolicy, isPolicyAdmin, isPolicyOwner} from '@libs/PolicyUtils';
import {
extractLinksFromMessageHtml,
getAddedApprovalRuleMessage,
Expand Down Expand Up @@ -99,6 +99,7 @@ import {
getWorkspaceUpdateFieldMessage,
isActionableAddPaymentCard,
isActionableJoinRequest,
isActionableMentionInviteToSubmitExpenseConfirmWhisper,
isActionableMentionWhisper,
isActionableReportMentionWhisper,
isActionableTrackExpense,
Expand Down Expand Up @@ -157,7 +158,7 @@ import variables from '@styles/variables';
import {openPersonalBankAccountSetupView} from '@userActions/BankAccounts';
import {hideEmojiPicker, isActive} from '@userActions/EmojiPickerAction';
import {acceptJoinRequest, declineJoinRequest} from '@userActions/Policy/Member';
import {expandURLPreview, resolveConciergeCategoryOptions} from '@userActions/Report';
import {expandURLPreview, resolveActionableMentionConfirmWhisper, resolveConciergeCategoryOptions} from '@userActions/Report';
import type {IgnoreDirection} from '@userActions/ReportActions';
import {isAnonymousUser, signOutAndRedirectToSignIn} from '@userActions/Session';
import {isBlockedFromConcierge} from '@userActions/User';
Expand Down Expand Up @@ -325,6 +326,7 @@ type PureReportActionItemProps = {
reportId: string | undefined,
reportAction: OnyxEntry<OnyxTypes.ReportAction>,
resolution: ValueOf<typeof CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION>,
policy: OnyxEntry<OnyxTypes.Policy>,
) => void;

/** Whether the provided report is a closed expense report with no expenses */
Expand Down Expand Up @@ -359,6 +361,9 @@ type PureReportActionItemProps = {

/** Whether to show border for MoneyRequestReportPreviewContent */
shouldShowBorder?: boolean;

/** Current user's account id */
currentUserAccountID?: number;
};

// This is equivalent to returning a negative boolean in normal functions, but we can keep the element return type
Expand Down Expand Up @@ -423,6 +428,7 @@ function PureReportActionItem({
dismissTrackExpenseActionableWhisper = () => {},
userBillingFundID,
shouldShowBorder,
currentUserAccountID,
}: PureReportActionItemProps) {
const actionSheetAwareScrollViewContext = useContext(ActionSheetAwareScrollView.ActionSheetAwareScrollViewContext);
const {translate, datetimeToCalendarTime, formatPhoneNumber} = useLocalize();
Expand All @@ -446,7 +452,8 @@ function PureReportActionItem({
const prevDraftMessage = usePrevious(draftMessage);
const isReportActionLinked = linkedReportActionID && action.reportActionID && linkedReportActionID === action.reportActionID;
const [isReportActionActive, setIsReportActionActive] = useState(!!isReportActionLinked);
const isActionableWhisper = isActionableMentionWhisper(action) || isActionableTrackExpense(action) || isActionableReportMentionWhisper(action);
const isActionableWhisper =
isActionableMentionWhisper(action) || isActionableMentionInviteToSubmitExpenseConfirmWhisper(action) || isActionableTrackExpense(action) || isActionableReportMentionWhisper(action);
const isReportArchived = useReportIsArchived(report?.reportID);

const highlightedBackgroundColorIfNeeded = useMemo(
Expand Down Expand Up @@ -801,30 +808,57 @@ function PureReportActionItem({
];
}

return [
if (isActionableMentionInviteToSubmitExpenseConfirmWhisper(action)) {
return [
{
text: 'common.buttonConfirm',
key: `${action.reportActionID}-actionableReportMentionConfirmWhisper-${CONST.REPORT.ACTIONABLE_MENTION_INVITE_TO_SUBMIT_EXPENSE_CONFIRM_WHISPER.DONE}`,
onPress: () => resolveActionableMentionConfirmWhisper(reportID, action, CONST.REPORT.ACTIONABLE_MENTION_INVITE_TO_SUBMIT_EXPENSE_CONFIRM_WHISPER.DONE),
isPrimary: true,
},
];
}

const actionableMentionWhisperOptions = [];
const isReportInPolicy = !!report?.policyID && report.policyID !== CONST.POLICY.ID_FAKE && getPersonalPolicy()?.id !== report.policyID;

if (isReportInPolicy && (isPolicyAdmin(policy) || isPolicyOwner(policy, currentUserAccountID))) {
actionableMentionWhisperOptions.push({
text: 'actionableMentionWhisperOptions.inviteToSubmitExpense',
key: `${action.reportActionID}-actionableMentionWhisper-${CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE_TO_SUBMIT_EXPENSE}`,
onPress: () => resolveActionableMentionWhisper(reportID, action, CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE_TO_SUBMIT_EXPENSE, policy),
isMediumSized: true,
});
}

actionableMentionWhisperOptions.push(
{
text: 'actionableMentionWhisperOptions.invite',
text: 'actionableMentionWhisperOptions.inviteToChat',
key: `${action.reportActionID}-actionableMentionWhisper-${CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE}`,
onPress: () => resolveActionableMentionWhisper(reportID, action, CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE),
isPrimary: true,
onPress: () => resolveActionableMentionWhisper(reportID, action, CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE, policy),
isMediumSized: true,
},
{
text: 'actionableMentionWhisperOptions.nothing',
key: `${action.reportActionID}-actionableMentionWhisper-${CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.NOTHING}`,
onPress: () => resolveActionableMentionWhisper(reportID, action, CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.NOTHING),
onPress: () => resolveActionableMentionWhisper(reportID, action, CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.NOTHING, policy),
isMediumSized: true,
},
];
);
return actionableMentionWhisperOptions;
}, [
action,
userBillingFundID,
isActionableWhisper,
policy,
currentUserAccountID,
reportID,
userBillingFundID,
originalReportID,
isBetaEnabled,
createDraftTransactionAndNavigateToParticipantSelector,
dismissTrackExpenseActionableWhisper,
resolveActionableReportMentionWhisper,
resolveActionableMentionWhisper,
originalReportID,
isBetaEnabled,
]);

/**
Expand Down Expand Up @@ -1229,7 +1263,7 @@ function PureReportActionItem({
{actionableItemButtons.length > 0 && (
<ActionableItemButtons
items={actionableItemButtons}
layout={isActionableTrackExpense(action) || isConciergeCategoryOptions(action) ? 'vertical' : 'horizontal'}
layout={isActionableTrackExpense(action) || isConciergeCategoryOptions(action) || isActionableMentionWhisper(action) ? 'vertical' : 'horizontal'}
shouldUseLocalization={!isConciergeCategoryOptions(action)}
/>
)}
Expand Down
2 changes: 2 additions & 0 deletions src/pages/home/report/ReportActionItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ function ReportActionItem({allReports, policies, action, report, transactions, s
const originalReportID = useMemo(() => getOriginalReportID(reportID, action), [reportID, action]);
const originalReport = allReports?.[`${ONYXKEYS.COLLECTION.REPORT}${originalReportID}`];
const isOriginalReportArchived = useReportIsArchived(originalReportID);
const [currentUserAccountID] = useOnyx(ONYXKEYS.SESSION, {canBeMissing: false, selector: (session) => session?.accountID});
const [draftMessage] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS_DRAFTS}${originalReportID}`, {
canBeMissing: true,
selector: (draftMessagesForReport) => {
Expand Down Expand Up @@ -95,6 +96,7 @@ function ReportActionItem({allReports, policies, action, report, transactions, s
action={action}
report={report}
policy={policy}
currentUserAccountID={currentUserAccountID}
draftMessage={draftMessage}
iouReport={iouReport}
taskReport={taskReport}
Expand Down
Loading
Loading