From 25adf3381f1d484e632baaefe0e60c076f7aa6ef Mon Sep 17 00:00:00 2001 From: Francois Laithier Date: Fri, 26 Apr 2024 18:17:54 -0700 Subject: [PATCH] Update default text in system chat --- src/components/ReportWelcomeText.tsx | 8 +++++++- src/languages/en.ts | 1 + src/languages/es.ts | 1 + src/libs/ReportUtils.ts | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/components/ReportWelcomeText.tsx b/src/components/ReportWelcomeText.tsx index d61bd5186ecc..339cd146c8cb 100644 --- a/src/components/ReportWelcomeText.tsx +++ b/src/components/ReportWelcomeText.tsx @@ -38,7 +38,8 @@ function ReportWelcomeText({report, policy, personalDetails}: ReportWelcomeTextP const isPolicyExpenseChat = ReportUtils.isPolicyExpenseChat(report); const isChatRoom = ReportUtils.isChatRoom(report); const isSelfDM = ReportUtils.isSelfDM(report); - const isDefault = !(isChatRoom || isPolicyExpenseChat || isSelfDM); + const isSystemDM = ReportUtils.isSystemDM(report); + const isDefault = !(isChatRoom || isPolicyExpenseChat || isSelfDM || isSystemDM); const participantAccountIDs = report?.participantAccountIDs ?? []; const isMultipleParticipant = participantAccountIDs.length > 1; const displayNamesWithTooltips = ReportUtils.getDisplayNamesWithTooltips(OptionsListUtils.getPersonalDetailsForAccountIDs(participantAccountIDs, personalDetails), isMultipleParticipant); @@ -133,6 +134,11 @@ function ReportWelcomeText({report, policy, personalDetails}: ReportWelcomeTextP {translate('reportActionsView.beginningOfChatHistorySelfDM')} )} + {isSystemDM && ( + + {translate('reportActionsView.beginningOfChatHistorySystemDM')} + + )} {isDefault && ( {translate('reportActionsView.beginningOfChatHistory')} diff --git a/src/languages/en.ts b/src/languages/en.ts index 610603e227e7..bc9acb462d6f 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -509,6 +509,7 @@ export default { beginningOfChatHistoryPolicyExpenseChatPartTwo: ' and ', beginningOfChatHistoryPolicyExpenseChatPartThree: ' starts here! 🎉 This is the place to chat, submit expenses and settle up.', beginningOfChatHistorySelfDM: 'This is your personal space. Use it for notes, tasks, drafts, and reminders.', + beginningOfChatHistorySystemDM: "Welcome! Let's get you set up.", chatWithAccountManager: 'Chat with your account manager here', sayHello: 'Say hello!', yourSpace: 'Your space', diff --git a/src/languages/es.ts b/src/languages/es.ts index f9063fb560ac..ff1af7c8312f 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -502,6 +502,7 @@ export default { beginningOfChatHistoryPolicyExpenseChatPartTwo: ' y ', beginningOfChatHistoryPolicyExpenseChatPartThree: ' empieza aquí! 🎉 Este es el lugar donde chatear y presentar o pagar gastos.', beginningOfChatHistorySelfDM: 'Este es tu espacio personal. Úsalo para notas, tareas, borradores y recordatorios.', + beginningOfChatHistorySystemDM: "Welcome! Let's get you set up.", chatWithAccountManager: 'Chatea con tu gestor de cuenta aquí', sayHello: '¡Saluda!', yourSpace: 'Tu espacio', diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index f81520ac0e3b..fe2e2d8c27d0 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -5202,7 +5202,7 @@ function isGroupChatAdmin(report: OnyxEntry, accountID: number) { */ function getMoneyRequestOptions(report: OnyxEntry, policy: OnyxEntry, reportParticipants: number[], canUseTrackExpense = true, filterDeprecatedTypes = false): IOUType[] { // In any thread or task report, we do not allow any new expenses yet - if (isChatThread(report) || isTaskReport(report) || (!canUseTrackExpense && isSelfDM(report))) { + if (isChatThread(report) || isTaskReport(report) || (!canUseTrackExpense && isSelfDM(report)) || isSystemDM(report)) { return []; }