Skip to content

Commit

Permalink
change AM to accountManager
Browse files Browse the repository at this point in the history
  • Loading branch information
mkzie2 committed Nov 27, 2024
1 parent 09dfe5c commit f7dfcf3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import type {
ChangeTypeParams,
CharacterLengthLimitParams,
CharacterLimitParams,
ChatWithAMParams,
ChatWithAccountManagerParams,
CompanyCardBankName,
CompanyCardFeedNameParams,
CompanyNameParams,
Expand Down Expand Up @@ -475,7 +475,7 @@ const translations = {
links: 'Links',
days: 'days',
rename: 'Rename',
chatWithAM: ({AMDisplayName}: ChatWithAMParams) => `Need something specific? Chat with your account manager, ${AMDisplayName}.`,
chatWithAccountManager: ({accountManagerDisplayName}: ChatWithAccountManagerParams) => `Need something specific? Chat with your account manager, ${accountManagerDisplayName}.`,
chatNow: 'Chat now',
},
location: {
Expand Down
4 changes: 2 additions & 2 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import type {
ChangeTypeParams,
CharacterLengthLimitParams,
CharacterLimitParams,
ChatWithAMParams,
ChatWithAccountManagerParams,
CompanyCardBankName,
CompanyCardFeedNameParams,
CompanyNameParams,
Expand Down Expand Up @@ -466,7 +466,7 @@ const translations = {
sent: 'Enviado',
links: 'Enlaces',
days: 'días',
chatWithAM: ({AMDisplayName}: ChatWithAMParams) => `¿Necesitas algo específico? Habla con tu gerente de cuenta, ${AMDisplayName}.`,
chatWithAccountManager: ({accountManagerDisplayName}: ChatWithAccountManagerParams) => `¿Necesitas algo específico? Habla con tu gerente de cuenta, ${accountManagerDisplayName}.`,
chatNow: 'Chatear ahora',
},
connectionComplete: {
Expand Down
6 changes: 3 additions & 3 deletions src/languages/params.ts
Original file line number Diff line number Diff line change
Expand Up @@ -559,8 +559,8 @@ type CompanyNameParams = {
companyName: string;
};

type ChatWithAMParams = {
AMDisplayName: string;
type ChatWithAccountManagerParams = {
accountManagerDisplayName: string;
};

export type {
Expand Down Expand Up @@ -765,5 +765,5 @@ export type {
ImportedTypesParams,
CurrencyCodeParams,
CompanyNameParams,
ChatWithAMParams,
ChatWithAccountManagerParams,
};
6 changes: 3 additions & 3 deletions src/pages/home/ReportScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,15 +163,15 @@ function ReportScreen({route, currentReportID = '', navigation}: ReportScreenPro
}, [activeWorkspaceID, canUseDefaultRooms, navigation, route, finishedLoadingApp]);

const [personalDetails] = useOnyx(ONYXKEYS.PERSONAL_DETAILS_LIST);
const chatWithAMText = useMemo(() => {
const chatWithAccountManagerText = useMemo(() => {
if (accountManagerReportID) {
const participants = ReportUtils.getParticipantsAccountIDsForDisplay(accountManagerReport, false, true);
const participantPersonalDetails = OptionsListUtils.getPersonalDetailsForAccountIDs([participants?.at(0) ?? -1], personalDetails);
const participantPersonalDetail = Object.values(participantPersonalDetails).at(0);
const displayName = PersonalDetailsUtils.getDisplayNameOrDefault(participantPersonalDetail);
const login = participantPersonalDetail?.login;
if (displayName && login) {
return translate('common.chatWithAM', {AMDisplayName: `${displayName} (${login})`});
return translate('common.chatWithAccountManager', {accountManagerDisplayName: `${displayName} (${login})`});
}
}
return '';
Expand Down Expand Up @@ -781,7 +781,7 @@ function ReportScreen({route, currentReportID = '', navigation}: ReportScreenPro
{!!accountManagerReportID && ReportUtils.isConciergeChatReport(report) && isBannerVisible && (
<Banner
containerStyles={[styles.mh4, styles.mt4, styles.p4, styles.br2]}
text={chatWithAMText}
text={chatWithAccountManagerText}
onClose={dismissBanner}
onButtonPress={chatWithAccountManager}
shouldShowCloseButton
Expand Down

0 comments on commit f7dfcf3

Please sign in to comment.