Add the consolidated domain billing to the DomainAdminsSettingsPage.tsx#77526
Conversation
|
Hey, I noticed you changed If you want to automatically generate translations for other locales, an Expensify employee will have to:
Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running: npx ts-node ./scripts/generateTranslations.ts --helpTypically, you'd want to translate only what you changed by running |
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
…mains/add-consolidated-domain-billing # Conflicts: # src/libs/API/parameters/index.ts # src/libs/API/types.ts # src/libs/actions/Domain.ts # src/pages/domain/Admins/DomainAdminsSettingsPage.tsx
…mains/add-consolidated-domain-billing
…o war-in/domains/add-consolidated-domain-billing # Conflicts: # src/libs/actions/Domain.ts # src/pages/domain/Admins/DomainAdminsSettingsPage.tsx
|
I think it's better to reset the issue after reopening the screen 2025-12-17.14.38.07.mov |
Hmm, now I'm not sure which is the correct flow because in other parts of the app we don't reset errors Screen.Recording.2025-12-17.at.14.42.01.mov |
|
Also, I suppose it's better to reset this error optimistically 2025-12-17.14.41.39.mov |
definitely, updated! |
Hmmm, interesting |
This comment has been minimized.
This comment has been minimized.
🦜 Polyglot Parrot! 🦜Squawk! Looks like you added some shiny new English strings. Allow me to parrot them back to you in other tongues: View the translation diffdiff --git a/src/languages/de.ts b/src/languages/de.ts
index 50a39062..156240b7 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -7969,7 +7969,17 @@ Hier ist ein *Testbeleg*, um dir zu zeigen, wie es funktioniert:`,
subtitle: 'Erzwingen Sie für Mitglieder Ihrer Domain die Anmeldung per Single Sign-On, schränken Sie die Erstellung von Workspaces ein und vieles mehr.',
enable: 'Aktivieren',
},
- admins: {title: 'Admins', findAdmin: 'Admin finden', primaryContact: 'Hauptansprechpartner', addPrimaryContact: 'Primären Kontakt hinzufügen', settings: 'Einstellungen'},
+ admins: {
+ title: 'Admins',
+ findAdmin: 'Admin finden',
+ primaryContact: 'Hauptansprechpartner',
+ addPrimaryContact: 'Primären Kontakt hinzufügen',
+ settings: 'Einstellungen',
+ consolidatedDomainBilling: 'Konsolidierte Domain-Abrechnung',
+ consolidatedDomainBillingDescription: (domainName: string) =>
+ `Wenn diese Option aktiviert ist, bezahlt der Hauptansprechpartner für alle Workspaces, die Mitgliedern von <strong>${domainName}</strong> gehören, und erhält alle Rechnungsbelege.`,
+ consolidatedDomainBillingError: 'Die konsolidierte Domain-Abrechnung konnte nicht geändert werden. Bitte versuche es später erneut.',
+ },
},
};
// IMPORTANT: This line is manually replaced in generate translation files by scripts/generateTranslations.ts,
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index b9a86aa3..138e1f37 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -7974,7 +7974,17 @@ Voici un *reçu test* pour vous montrer comment cela fonctionne :`,
subtitle: "Exiger que les membres de votre domaine se connectent via l'authentification unique, restreindre la création d'espaces de travail, et plus encore.",
enable: 'Activer',
},
- admins: {title: 'Admins', findAdmin: 'Trouver un admin', primaryContact: 'Contact principal', addPrimaryContact: 'Ajouter un contact principal', settings: 'Paramètres'},
+ admins: {
+ title: 'Admins',
+ findAdmin: 'Trouver un admin',
+ primaryContact: 'Contact principal',
+ addPrimaryContact: 'Ajouter un contact principal',
+ settings: 'Paramètres',
+ consolidatedDomainBilling: 'Facturation consolidée du domaine',
+ consolidatedDomainBillingDescription: (domainName: string) =>
+ `Lorsque cette option est activée, le contact principal paiera pour tous les espaces de travail appartenant aux membres de <strong>${domainName}</strong> et recevra tous les reçus de facturation.`,
+ consolidatedDomainBillingError: 'La facturation de domaine consolidée n’a pas pu être modifiée. Veuillez réessayer plus tard.',
+ },
},
};
// IMPORTANT: This line is manually replaced in generate translation files by scripts/generateTranslations.ts,
diff --git a/src/languages/it.ts b/src/languages/it.ts
index 75cf826e..93619eed 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -7956,6 +7956,10 @@ Ecco una *ricevuta di prova* per mostrarti come funziona:`,
primaryContact: 'Contatto principale',
addPrimaryContact: 'Aggiungi contatto principale',
settings: 'Impostazioni',
+ consolidatedDomainBilling: 'Fatturazione consolidata del dominio',
+ consolidatedDomainBillingDescription: (domainName: string) =>
+ `Quando abilitata, il contatto principale pagherà per tutti gli spazi di lavoro di proprietà dei membri di <strong>${domainName}</strong> e riceverà tutte le ricevute di fatturazione.`,
+ consolidatedDomainBillingError: 'La fatturazione dominio consolidata non può essere modificata. Riprova più tardi.',
},
},
};
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index 685a7cda..cbd0da52 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -7889,7 +7889,17 @@ Expensify の使い方をお見せするための*テストレシート*がこ
subtitle: 'ドメインのメンバーにシングルサインオンでのログインを必須化し、ワークスペースの作成を制限するなど、さらに多くのことができます。',
enable: '有効にする',
},
- admins: {title: '管理者', findAdmin: '管理者を検索', primaryContact: '主要連絡先', addPrimaryContact: '主要連絡先を追加', settings: '設定'},
+ admins: {
+ title: '管理者',
+ findAdmin: '管理者を検索',
+ primaryContact: '主要連絡先',
+ addPrimaryContact: '主要連絡先を追加',
+ settings: '設定',
+ consolidatedDomainBilling: '統合ドメイン請求',
+ consolidatedDomainBillingDescription: (domainName: string) =>
+ `有効にすると、<strong>${domainName}</strong> メンバーが所有するすべてのワークスペースの支払いを代表連絡先が行い、すべての請求書の領収書を受け取ります。`,
+ consolidatedDomainBillingError: '統合ドメイン請求を変更できませんでした。後でもう一度お試しください。',
+ },
},
};
// IMPORTANT: This line is manually replaced in generate translation files by scripts/generateTranslations.ts,
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index 695fd9ec..e9a9c933 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -7942,6 +7942,10 @@ Hier is een *testbon* om je te laten zien hoe het werkt:`,
primaryContact: 'Primair contactpersoon',
addPrimaryContact: 'Primair contactpersoon toevoegen',
settings: 'Instellingen',
+ consolidatedDomainBilling: 'Geconsolideerde domeinfacturering',
+ consolidatedDomainBillingDescription: (domainName: string) =>
+ `Indien ingeschakeld, betaalt de primaire contactpersoon voor alle werkruimten die eigendom zijn van leden van <strong>${domainName}</strong> en ontvangt hij/zij alle factuurbewijzen.`,
+ consolidatedDomainBillingError: 'Geconsolideerde domeinfacturering kon niet worden gewijzigd. Probeer het later opnieuw.',
},
},
};
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index 0aebd058..3e5ce18c 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -7921,7 +7921,17 @@ Oto *paragon testowy*, który pokazuje, jak to działa:`,
subtitle: 'Wymagaj, aby członkowie Twojej domeny logowali się przez Single Sign-On (SSO), ograniczaj tworzenie obszarów roboczych i nie tylko.',
enable: 'Włącz',
},
- admins: {title: 'Administratorzy', findAdmin: 'Znajdź administratora', primaryContact: 'Główny kontakt', addPrimaryContact: 'Dodaj główny kontakt', settings: 'Ustawienia'},
+ admins: {
+ title: 'Administratorzy',
+ findAdmin: 'Znajdź administratora',
+ primaryContact: 'Główny kontakt',
+ addPrimaryContact: 'Dodaj główny kontakt',
+ settings: 'Ustawienia',
+ consolidatedDomainBilling: 'Skonsolidowane rozliczanie domen',
+ consolidatedDomainBillingDescription: (domainName: string) =>
+ `Gdy ta opcja jest włączona, główny kontakt będzie opłacać wszystkie przestrzenie robocze należące do członków <strong>${domainName}</strong> i otrzymywać wszystkie potwierdzenia rozliczeń.`,
+ consolidatedDomainBillingError: 'Nie udało się zmienić zbiorczego rozliczania domeny. Spróbuj ponownie później.',
+ },
},
};
// IMPORTANT: This line is manually replaced in generate translation files by scripts/generateTranslations.ts,
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index 5dd8a001..3c2d07e9 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -7934,6 +7934,10 @@ Aqui está um *recibo de teste* para mostrar como funciona:`,
primaryContact: 'Contato principal',
addPrimaryContact: 'Adicionar contato principal',
settings: 'Configurações',
+ consolidatedDomainBilling: 'Cobrança consolidada de domínio',
+ consolidatedDomainBillingDescription: (domainName: string) =>
+ `Quando ativado, o contato principal pagará por todos os espaços de trabalho pertencentes aos membros de <strong>${domainName}</strong> e receberá todos os recibos de cobrança.`,
+ consolidatedDomainBillingError: 'A cobrança de domínio consolidada não pôde ser alterada. Tente novamente mais tarde.',
},
},
};
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index 58777d34..4817beda 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -7754,7 +7754,16 @@ ${reportName}
addDomain: {title: '添加域', subtitle: '请输入您想访问的私有域名(例如:expensify.com)。', domainName: '域名', newDomain: '新域名'},
domainAdded: {title: '已添加域名', description: '接下来,您需要验证域名的所有权并调整您的安全设置。', configure: '配置'},
enhancedSecurity: {title: '增强的安全性', subtitle: '要求您域内的成员使用单点登录登录、限制工作区创建等。', enable: '启用'},
- admins: {title: '管理员', findAdmin: '查找管理员', primaryContact: '主要联系人', addPrimaryContact: '添加主要联系人', settings: '设置'},
+ admins: {
+ title: '管理员',
+ findAdmin: '查找管理员',
+ primaryContact: '主要联系人',
+ addPrimaryContact: '添加主要联系人',
+ settings: '设置',
+ consolidatedDomainBilling: '合并域名结算',
+ consolidatedDomainBillingDescription: (domainName: string) => `启用后,主要联系人将为<strong>${domainName}</strong>成员拥有的所有工作区付款,并接收所有账单收据。`,
+ consolidatedDomainBillingError: '无法更改合并域账单。请稍后重试。',
+ },
},
};
// IMPORTANT: This line is manually replaced in generate translation files by scripts/generateTranslations.ts,
Note You can apply these changes to your branch by copying the patch to your clipboard, then running |
|
But overall changes look good! @situchan |
That only happens for an even number of toggles. Let's consider this situation
I think that should start working as expected once the I added |
Sounds good |
|
LGTM! |
src/languages/de.ts
Outdated
| settings: 'Einstellungen', | ||
| consolidatedDomainBilling: 'Konsolidierte Domain-Abrechnung', | ||
| consolidatedDomainBillingDescription: (domainName: string) => | ||
| `Wenn diese Option aktiviert ist, bezahlt der Hauptansprechpartner für alle Workspaces, die Mitgliedern von <strong>${domainName}</strong> gehören, und erhält alle Rechnungsbelege.`, |
There was a problem hiding this comment.
<strong> was removed in English. If that's the correct fix, can we apply same to all other languages?
| <View style={[styles.flexRow, styles.renderHTML, styles.mt1]}> | ||
| <RenderHTML html={translate('domain.admins.consolidatedDomainBillingDescription', domain?.email ? Str.extractEmailDomain(domain.email) : '')} /> | ||
| </View> |
There was a problem hiding this comment.
This should be retested. I think engineers are OOO but @war-in do you know any ngrok available at the moment?
There was a problem hiding this comment.
Not really :/ I tested it on my account where I have a domain and it worked fine without ngrok
There was a problem hiding this comment.
also, you can just mock the data
There was a problem hiding this comment.
Mind sharing mock data? So I can test further PRs without ngrok
There was a problem hiding this comment.
I have something like that
Onyx.merge('domain_20998357', {
expensify_adminPermissions_1: "1353644",
expensify_adminPermissions_2: "1999782",
expensify_adminPermissions_3: "12831710",
expensify_adminPermissions_4: "12831943",
expensify_adminPermissions_5: "16530855",
expensify_adminPermissions_6: "21010971",
expensify_adminPermissions_7: "21011234",
expensify_adminPermissions_8: "21011890",
expensify_adminPermissions_9: "21012567",
expensify_adminPermissions_10: "21013321",
expensify_adminPermissions_11: "21014482",
expensify_adminPermissions_12: "21015509",
expensify_adminPermissions_13: "21016224",
expensify_adminPermissions_14: "21017356",
expensify_adminPermissions_15: "21018477",
expensify_adminPermissions_16: "21019588",
expensify_adminPermissions_17: "21020745",
expensify_adminPermissions_18: "21021893",
expensify_adminPermissions_19: "21022941",
expensify_adminPermissions_20: "21024012"
});
do you have a domain? Or should I add you to mine?
There was a problem hiding this comment.
I checked another PR this morning
And it worked
https://expensify.slack.com/archives/C0A1VKRKEE9/p1765797985901779?thread_ts=1765793223.967979&cid=C0A1VKRKEE9
There was a problem hiding this comment.
should I add you to mine?
yes please
situchandrashil7+77526@gmail.com
|
@situchan it looks the same on the workspace workflows page |
mountiny
left a comment
There was a problem hiding this comment.
Looks good, lets rename the param
|
@war-in for clean up, the error message should come from the BE once we have that in place but the way we render this error should be better, we should add classic padding for the error here |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.2.86-0 🚀
|
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.2.86-4 🚀
|






Explanation of Change
PR adds
Consolidated domain billingtoggle to the admin settingsFixed Issues
$ #77745
PROPOSAL:
Tests
At the moment of writing, Vit's VM is not working properly and request is failing (that's why toggle goes back to the previous value)
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2025-12-15.at.19.40.32.mov