Skip to content

Commit 3b58cbd

Browse files
Merge pull request Expensify#90788 from Expensify/lucien/fix-work-account-closed
Show descriptive error when adding work email tied to a closed account
2 parents adce9b9 + 682e851 commit 3b58cbd

14 files changed

Lines changed: 63 additions & 6 deletions

File tree

src/CONST/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6912,6 +6912,9 @@ const CONST = {
69126912

69136913
// We need to store this server side error in order to not show the blocking screen when the error is for invalid code
69146914
MERGE_ACCOUNT_INVALID_CODE_ERROR: '401 Not authorized - Invalid validateCode',
6915+
6916+
// Returned when a user tries to add a work email tied to a closed work account, so we can show a specific error message instead of the generic blocking screen subtitle
6917+
WORK_ACCOUNT_CLOSED_ERROR: '401 work account is closed',
69156918
REIMBURSEMENT_ACCOUNT: {
69166919
DEFAULT_DATA: {
69176920
achData: {

src/languages/de.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3019,6 +3019,8 @@ ${amount} für ${merchant} – ${date}`,
30193019
title: 'Arbeits-E-Mail konnte nicht hinzugefügt werden',
30203020
subtitle: (workEmail: string | undefined) =>
30213021
`Wir konnten ${workEmail} nicht hinzufügen. Bitte versuche es später in den Einstellungen erneut oder chatte mit Concierge, um Unterstützung zu erhalten.`,
3022+
workAccountClosedSubtitle:
3023+
'Das Arbeitskonto, das mit dieser E-Mail-Adresse verknüpft ist, wurde geschlossen. Bitte wenden Sie sich an Ihre Unternehmensadministratorin bzw. Ihren Unternehmensadministrator, um es zu reaktivieren, oder registrieren Sie sich mit einer anderen E-Mail-Adresse.',
30223024
},
30233025
tasks: {
30243026
testDriveAdminTask: {

src/languages/en.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3081,6 +3081,7 @@ const translations = {
30813081
mergeBlockScreen: {
30823082
title: 'Couldn’t add work email',
30833083
subtitle: (workEmail: string | undefined) => `We couldn’t add ${workEmail}. Please try again later in Settings or chat with Concierge for guidance.`,
3084+
workAccountClosedSubtitle: 'The work account associated with this email is closed. Please contact your company admin to reactivate it, or sign up with a different email.',
30843085
},
30853086
tasks: {
30863087
testDriveAdminTask: {

src/languages/es.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2889,6 +2889,8 @@ ${amount} para ${merchant} - ${date}`,
28892889
mergeBlockScreen: {
28902890
title: 'No se pudo añadir el correo electrónico de trabajo',
28912891
subtitle: (workEmail) => `No pudimos añadir ${workEmail}. Por favor, inténtalo de nuevo más tarde en Configuración o chatea con Concierge para obtener ayuda.`,
2892+
workAccountClosedSubtitle:
2893+
'La cuenta de trabajo asociada a este correo electrónico está cerrada. Ponte en contacto con el administrador de tu empresa para reactivarla o regístrate con un correo electrónico diferente.',
28922894
},
28932895
tasks: {
28942896
testDriveAdminTask: {

src/languages/fr.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3025,6 +3025,8 @@ ${amount} pour ${merchant} - ${date}`,
30253025
title: 'Impossible d’ajouter l’adresse e-mail professionnelle',
30263026
subtitle: (workEmail: string | undefined) =>
30273027
`Nous n’avons pas pu ajouter ${workEmail}. Veuillez réessayer plus tard dans les Paramètres ou discuter avec Concierge pour obtenir de l’aide.`,
3028+
workAccountClosedSubtitle:
3029+
'Le compte professionnel associé à cet e-mail est fermé. Veuillez contacter l’administrateur de votre entreprise pour le réactiver, ou inscrivez-vous avec un autre e-mail.',
30283030
},
30293031
tasks: {
30303032
testDriveAdminTask: {

src/languages/it.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3013,6 +3013,8 @@ ${amount} per ${merchant} - ${date}`,
30133013
title: "Impossibile aggiungere l'email di lavoro",
30143014
subtitle: (workEmail: string | undefined) =>
30153015
`Non è stato possibile aggiungere ${workEmail}. Riprova più tardi in Impostazioni oppure chatta con Concierge per ricevere assistenza.`,
3016+
workAccountClosedSubtitle:
3017+
'L’account di lavoro associato a questa email è chiuso. Contatta l’amministratore della tua azienda per riattivarlo oppure registrati con un’altra email.',
30163018
},
30173019
tasks: {
30183020
testDriveAdminTask: {

src/languages/ja.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2986,6 +2986,8 @@ ${date} の ${merchant} への ${amount}`,
29862986
title: '勤務用メールアドレスを追加できませんでした',
29872987
subtitle: (workEmail: string | undefined) =>
29882988
`${workEmail} を追加できませんでした。後で「設定」からもう一度お試しいただくか、ガイダンスについて Concierge にチャットでお問い合わせください。`,
2989+
workAccountClosedSubtitle:
2990+
'このメールアドレスに関連付けられている業務用アカウントは停止されています。再有効化するには会社の管理者にご連絡いただくか、別のメールアドレスでサインアップしてください。',
29892991
},
29902992
tasks: {
29912993
testDriveAdminTask: {

src/languages/nl.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3009,6 +3009,8 @@ ${amount} voor ${merchant} - ${date}`,
30093009
mergeBlockScreen: {
30103010
title: 'Werkmail kon niet worden toegevoegd',
30113011
subtitle: (workEmail: string | undefined) => `We konden ${workEmail} niet toevoegen. Probeer het later opnieuw in Instellingen of chat met Concierge voor hulp.`,
3012+
workAccountClosedSubtitle:
3013+
'De zakelijke account die aan dit e-mailadres is gekoppeld, is gesloten. Neem contact op met de beheerder van je bedrijf om het opnieuw te activeren, of meld je aan met een ander e-mailadres.',
30123014
},
30133015
tasks: {
30143016
testDriveAdminTask: {

src/languages/pl.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3002,6 +3002,8 @@ ${amount} dla ${merchant} - ${date}`,
30023002
mergeBlockScreen: {
30033003
title: 'Nie udało się dodać służbowego adresu e-mail',
30043004
subtitle: (workEmail: string | undefined) => `Nie udało się dodać ${workEmail}. Spróbuj ponownie później w Ustawieniach lub porozmawiaj z Concierge, aby uzyskać pomoc.`,
3005+
workAccountClosedSubtitle:
3006+
'Konto służbowe powiązane z tym adresem e‑mail jest zamknięte. Skontaktuj się z administratorem w swojej firmie, żeby je ponownie aktywować, albo zarejestruj się przy użyciu innego adresu e‑mail.',
30053007
},
30063008
tasks: {
30073009
testDriveAdminTask: {

src/languages/pt-BR.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3003,6 +3003,8 @@ ${amount} para ${merchant} - ${date}`,
30033003
title: 'Não foi possível adicionar o e-mail de trabalho',
30043004
subtitle: (workEmail: string | undefined) =>
30053005
`Não foi possível adicionar ${workEmail}. Tente novamente mais tarde em Configurações ou converse com o Concierge para obter orientação.`,
3006+
workAccountClosedSubtitle:
3007+
'A conta de trabalho associada a este e-mail foi encerrada. Entre em contato com o administrador da sua empresa para reativá-la ou inscreva-se com um e-mail diferente.',
30063008
},
30073009
tasks: {
30083010
testDriveAdminTask: {

0 commit comments

Comments
 (0)