Repository navigation
Widen domain-group card preferred workspace to company card feeds - #100127
NicolasBonet merged 18 commits into
Conversation
Add a shared useIsDomainUsingCard hook so both gate sites (existing-group toggle and create-group flow) unlock the setting when the domain has an Expensify Card feed OR a company card feed, instead of Expensify Card only. Update the label, description and disabled-state copy accordingly.
|
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 bun ./scripts/generateTranslations.ts --helpTypically, you'd want to translate only what you changed by running |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1933d05310
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…oup-card-preferred-workspace
|
@marufsharifi Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
@trjExpensify would you be able to test the first three steps using your TRJ Private Domain question? IIRC, it's verified and doesn't have an Expensify card feed. All the private domains I have access to have Expensify card feeds. |
|
🚧 joekaufmanexpensify has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
|
@joekaufmanexpensify it's not a verified domain, sorry. @twisterdotcom might have on expensipie.com? 🤔 |
|
@dilshodmackbook-sketch, have you checked this: #100127 (comment) |
|
@MelvinBot Review |
ReviewThe hook itself is clean, correctly domain-scoped, and reuses the right helper. One thing should be confirmed before this merges: nothing in the domain flow fetches the domain's company card feeds, so the toggle may still stay locked for exactly the admins this fixes. 1. 🚩 The company card NVP may never be loaded on the Groups page
The only call the domain flow makes is
2. No loading state — false "Locked" and a wrong error modal on cold loadThe hook returns a bare Suggest returning 3. Drop the manual
|
|
@dilshodmackbook-sketch, could you please check the above comments. thanks. |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@marufsharifi addressed the comment above, ready for another review. thanks. |
|
thanks! |
|
@dilshodmackbook-sketch Bug
Expected behavior: We should be able to disable it manually but not be able to re-enable since card feed is already deleted and required. Actual behavior: We are not able to disable it manually. RF-1.mp4 |
Adds regression tests for the existing-group toggle: when the override is already on and the domain has no card feed, the switch stays unlocked so an admin can still turn it off manually, and pressing it writes overridePreferredPolicyWithCardPolicy=false through the normal update action (no dependency on a card feed being present). It then re-locks so it can't be turned back on until a feed exists.
|
@marufsharifi the failing step here isn't removing the card feed, it's the domain reset right before it. Reset (OldDot > Domain admins > Reset Domain) permanently deletes the group settings too, not just the feed, so the security group no longer exists on the server when the toggle is tapped. That's the "Auth UpdateDomainSecurityGroup returned an error": there's no group left to write to. Remove only the card feed and keep the group, and it works as intended. The toggle stays tappable while it's on, you can turn it off manually, and it re-locks once off so it can't be turned back on without a feed: fix_99110_disable_after_feed_removed.mp4Also added tests for this case (override on + no feed) so it stays covered. |
🦜 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 722cc4cb..094fd5df 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -11083,9 +11083,9 @@ Hier ist ein *Testbeleg*, um dir zu zeigen, wie es funktioniert:`,
permissions: 'Gruppenberechtigungen',
createNewGroupButton: 'Neue Gruppe',
createGroupSubmitButton: 'Gruppe erstellen',
- expensifyCardPreferredWorkspace: 'Bevorzugter Workspace für Expensify Card',
+ expensifyCardPreferredWorkspace: 'Bevorzugter Arbeitsbereich für Karte',
expensifyCardPreferredWorkspaceDescription:
- 'Alle Expensify Card-Transaktionen werden im bevorzugten Expensify Card-Arbeitsbereich anstelle des bevorzugten Arbeitsbereichs erstellt. Durch Aktivieren dieser Funktion wird die Einstellung des bevorzugten Arbeitsbereichs nur für Expensify Card-Transaktionen überschrieben.',
+ 'Alle Transaktionen der Expensify Karte und der Firmenkarte werden im bevorzugten Karten-Arbeitsbereich statt im bevorzugten Arbeitsbereich erstellt. Wenn Sie diese Funktion aktivieren, wird die Einstellung des bevorzugten Arbeitsbereichs nur für Kartentransaktionen überschrieben.',
strictlyEnforceWorkspaceRules: 'Workspace-Regeln strikt durchsetzen',
strictlyEnforceWorkspaceRulesDescription: 'Alle Workspace-Regeln müssen erfüllt sein, bevor ein Bericht eingereicht wird. Manuelle Ausnahmen sind nicht zulässig.',
restrictExpenseWorkspaceCreation: 'Erstellen/Entfernen von Ausgaben-Workspaces einschränken',
@@ -11104,7 +11104,7 @@ Hier ist ein *Testbeleg*, um dir zu zeigen, wie es funktioniert:`,
restrictDefaultLoginSelectionDescription:
'Verhindert, dass Mitglieder ihre Login-E-Mail-Adresse außerhalb der Unternehmensdomäne ändern, um Richtlinienbeschränkungen zu umgehen.',
expensifyCardPreferredWorkspaceDisabledMessage:
- 'Um diese Einstellung zu aktivieren, aktiviere zuerst einen bevorzugten Workspace und richte Expensify Cards in deiner Domain ein.',
+ 'Um diese Einstellung zu aktivieren, aktivieren Sie bitte zuerst einen bevorzugten Arbeitsbereich und richten Sie eine Expensify Karte oder einen Firmenkarten-Feed in Ihrer Domain ein.',
findGroup: 'Gruppe suchen',
},
},
diff --git a/src/languages/el.ts b/src/languages/el.ts
index 9dbe5350..48bb06d4 100644
--- a/src/languages/el.ts
+++ b/src/languages/el.ts
@@ -11293,9 +11293,9 @@ ${reportName}`,
permissions: 'Δικαιώματα ομάδας',
createNewGroupButton: 'Νέα ομάδα',
createGroupSubmitButton: 'Δημιουργία ομάδας',
- expensifyCardPreferredWorkspace: 'Προτιμώμενος χώρος εργασίας για την Κάρτα Expensify',
+ expensifyCardPreferredWorkspace: 'Προτιμώμενος χώρος εργασίας κάρτας',
expensifyCardPreferredWorkspaceDescription:
- 'Όλες οι συναλλαγές με Κάρτα Expensify θα δημιουργούνται στο προτιμώμενο χώρο εργασίας Κάρτας Expensify αντί για τον προτιμώμενο χώρο εργασίας. Η ενεργοποίηση αυτής της δυνατότητας θα παρακάμψει τη ρύθμιση προτιμώμενου χώρου εργασίας μόνο για τις συναλλαγές με Κάρτα Expensify.',
+ 'Όλες οι συναλλαγές με Κάρτα Expensify και εταιρική κάρτα θα δημιουργούνται στον προτιμώμενο χώρο εργασίας για κάρτες αντί για τον προτιμώμενο χώρο εργασίας. Η ενεργοποίηση αυτής της δυνατότητας θα παρακάμψει τη ρύθμιση προτιμώμενου χώρου εργασίας μόνο για συναλλαγές με κάρτα.',
strictlyEnforceWorkspaceRules: 'Επιβάλετε αυστηρά τους κανόνες του χώρου εργασίας',
strictlyEnforceWorkspaceRulesDescription: 'Πρέπει να πληρούνται όλοι οι κανόνες του χώρου εργασίας πριν από την υποβολή μιας αναφοράς. Δεν επιτρέπονται χειροκίνητες εξαιρέσεις.',
restrictExpenseWorkspaceCreation: 'Περιορισμός δημιουργίας/διαγραφής χώρου εργασίας εξόδων',
@@ -11314,7 +11314,7 @@ ${reportName}`,
restrictDefaultLoginSelectionDescription:
'Αποτρέψτε τα μέλη από το να αλλάζουν το email σύνδεσής τους σε διεύθυνση εκτός του εταιρικού τους domain, ώστε να αποφύγετε περιορισμούς πολιτικών.',
expensifyCardPreferredWorkspaceDisabledMessage:
- 'Για να ενεργοποιήσετε αυτήν τη ρύθμιση, ενεργοποιήστε πρώτα ένα προτιμώμενο χώρο εργασίας και ρυθμίστε τις Κάρτες Expensify στον τομέα σας.',
+ 'Για να ενεργοποιήσετε αυτήν τη ρύθμιση, ενεργοποιήστε πρώτα ένα προτιμώμενο χώρο εργασίας και ρυθμίστε μια Κάρτα Expensify ή μια ροή εταιρικής κάρτας στον τομέα σας.',
findGroup: 'Εύρεση ομάδας',
},
},
diff --git a/src/languages/es.ts b/src/languages/es.ts
index a59b0750..b8fc9e46 100644
--- a/src/languages/es.ts
+++ b/src/languages/es.ts
@@ -11303,9 +11303,9 @@ ${reportName}`,
permissions: 'Permisos de grupo',
createNewGroupButton: 'Nuevo grupo',
createGroupSubmitButton: 'Crear grupo',
- expensifyCardPreferredWorkspace: 'Espacio de trabajo preferido para Expensify Card',
+ expensifyCardPreferredWorkspace: 'Espacio de trabajo preferido para la tarjeta',
expensifyCardPreferredWorkspaceDescription:
- 'Todas las transacciones de Expensify Card se crearán en el espacio de trabajo preferido de Expensify Card en lugar del espacio de trabajo preferido. Al habilitar esta función, la configuración de espacio de trabajo preferido se aplicará solo a las transacciones de Expensify Card.',
+ 'Todas las transacciones de la Tarjeta Expensify y de las tarjetas de empresa se crearán en el espacio de trabajo preferido para tarjetas en lugar del espacio de trabajo preferido. Al habilitar esta función, se reemplazará la configuración de espacio de trabajo preferido solo para las transacciones con tarjeta.',
strictlyEnforceWorkspaceRules: 'Hacer cumplir estrictamente las reglas del espacio de trabajo',
strictlyEnforceWorkspaceRulesDescription: 'Todas las reglas del espacio de trabajo deben cumplirse antes de enviar un informe. No se permiten excepciones manuales.',
restrictExpenseWorkspaceCreation: 'Restringir la creación/eliminación de espacios de trabajo de gastos',
@@ -11324,7 +11324,7 @@ ${reportName}`,
restrictDefaultLoginSelection: 'Restringir el inicio de sesión predeterminado',
restrictDefaultLoginSelectionDescription: 'Evita que los miembros cambien su correo de inicio de sesión fuera del dominio de la empresa para eludir restricciones de políticas.',
expensifyCardPreferredWorkspaceDisabledMessage:
- 'Para habilitar esta configuración, primero habilita un espacio de trabajo preferido y configura las Tarjetas Expensify en tu dominio.',
+ 'Para habilitar esta opción, primero habilita un espacio de trabajo preferido y configura una Tarjeta Expensify o una alimentación de tarjeta de empresa en tu dominio.',
findGroup: 'Encontrar grupo',
},
},
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index e1361f18..b14774ad 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -11112,9 +11112,9 @@ Voici un *reçu test* pour vous montrer comment ça fonctionne :`,
permissions: 'Autorisations du groupe',
createNewGroupButton: 'Nouveau groupe',
createGroupSubmitButton: 'Créer le groupe',
- expensifyCardPreferredWorkspace: 'Espace de travail préféré pour la carte Expensify',
+ expensifyCardPreferredWorkspace: 'Espace de travail préféré pour la carte',
expensifyCardPreferredWorkspaceDescription:
- "Toutes les transactions Expensify Card seront créées dans l'espace de travail préféré Expensify Card au lieu de l'espace de travail préféré.",
+ 'Toutes les transactions par Carte Expensify et carte d’entreprise seront créées dans l’Espace de travail préféré pour les cartes au lieu de l’Espace de travail préféré. L’activation de cette fonctionnalité remplacera le paramètre d’Espace de travail préféré pour les transactions par carte uniquement.',
strictlyEnforceWorkspaceRules: 'Appliquer strictement les règles de l’espace de travail',
strictlyEnforceWorkspaceRulesDescription:
'Toutes les règles de l’espace de travail doivent être respectées avant de soumettre un rapport. Aucune exception manuelle n’est autorisée.',
@@ -11135,7 +11135,7 @@ Voici un *reçu test* pour vous montrer comment ça fonctionne :`,
restrictDefaultLoginSelectionDescription:
'Empêche les membres de modifier leur e-mail de connexion en dehors du domaine de leur entreprise afin d’éviter les restrictions de politique.',
expensifyCardPreferredWorkspaceDisabledMessage:
- 'Pour activer ce paramètre, veuillez d’abord activer un espace de travail préféré et configurer les cartes Expensify sur votre domaine.',
+ 'Pour activer ce paramètre, commencez par activer un espace de travail préféré et configurer une Carte Expensify ou un flux de cartes de société sur votre domaine.',
findGroup: 'Trouver un groupe',
},
},
diff --git a/src/languages/it.ts b/src/languages/it.ts
index cf590c1b..1d0c5855 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -11040,9 +11040,9 @@ Ecco una *ricevuta di prova* per mostrarti come funziona:`,
permissions: 'Autorizzazioni del gruppo',
createNewGroupButton: 'Nuovo gruppo',
createGroupSubmitButton: 'Crea gruppo',
- expensifyCardPreferredWorkspace: 'Workspace preferito per Expensify Card',
+ expensifyCardPreferredWorkspace: 'Spazio di lavoro preferito per la carta',
expensifyCardPreferredWorkspaceDescription:
- "Tutte le transazioni Expensify Card verranno create nell'area di lavoro preferita Expensify Card anziché nell'area di lavoro preferita.",
+ 'Tutte le transazioni effettuate con Carta Expensify e con carte aziendali verranno create nello spazio di lavoro Preferito per le carte invece che nello spazio di lavoro Preferito. Abilitando questa funzionalità, l’impostazione dello spazio di lavoro Preferito verrà ignorata solo per le transazioni con carta.',
strictlyEnforceWorkspaceRules: 'Applica rigorosamente le regole dello spazio di lavoro',
strictlyEnforceWorkspaceRulesDescription: 'Tutte le regole dello spazio di lavoro devono essere soddisfatte prima di inviare un rapporto. Non sono consentite eccezioni manuali.',
restrictExpenseWorkspaceCreation: 'Limita la creazione/rimozione dell’area di lavoro spese',
@@ -11061,7 +11061,7 @@ Ecco una *ricevuta di prova* per mostrarti come funziona:`,
restrictDefaultLoginSelection: 'Limita la selezione di accesso predefinita',
restrictDefaultLoginSelectionDescription: 'Impedisce ai membri di modificare l’email di accesso al di fuori del dominio aziendale per eludere le restrizioni delle policy.',
expensifyCardPreferredWorkspaceDisabledMessage:
- 'Per abilitare questa impostazione, abilita prima uno spazio di lavoro preferito e configura le Expensify Card per il tuo dominio.',
+ 'Per abilitare questa impostazione, prima abilita uno spazio di lavoro preferito e configura una Carta Expensify o un flusso di carte aziendali sul tuo dominio.',
findGroup: 'Trova gruppo',
},
},
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index 3f3c9c12..72967d0a 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -10882,8 +10882,9 @@ ${reportName}`,
permissions: 'グループの権限',
createNewGroupButton: '新しいグループ',
createGroupSubmitButton: 'グループを作成',
- expensifyCardPreferredWorkspace: 'Expensify Card の優先ワークスペース',
- expensifyCardPreferredWorkspaceDescription: 'すべてのExpensify Cardトランザクションは、優先ワークスペースではなくExpensify Card優先ワークスペースで作成されます。',
+ expensifyCardPreferredWorkspace: 'カード優先ワークスペース',
+ expensifyCardPreferredWorkspaceDescription:
+ 'すべての Expensify カードおよび会社カードの取引は、「優先ワークスペース」ではなく「カード優先ワークスペース」で作成されます。この機能を有効にすると、カード取引に限り、優先ワークスペースの設定が上書きされます。',
strictlyEnforceWorkspaceRules: 'ワークスペースのルールを厳密に適用する',
strictlyEnforceWorkspaceRulesDescription: 'レポートを送信する前にすべてのワークスペースのルールを満たす必要があります。手動による例外は許可されていません。',
restrictExpenseWorkspaceCreation: '経費ワークスペースの作成/削除を制限する',
@@ -10900,7 +10901,8 @@ ${reportName}`,
noWorkspacesMessage: 'このドメインにワークスペースがありません。この制限を有効にするにはワークスペースが必要です。',
restrictDefaultLoginSelection: 'デフォルトのログイン選択を制限する',
restrictDefaultLoginSelectionDescription: 'メンバーがポリシー制限を回避するために、ログイン用のメールアドレスを会社のドメイン以外に変更することを防ぎます。',
- expensifyCardPreferredWorkspaceDisabledMessage: 'この設定を有効にするには、まず優先するワークスペースを有効にし、ドメインでExpensify Cardsを設定してください。',
+ expensifyCardPreferredWorkspaceDisabledMessage:
+ 'この設定を有効にするには、まず優先ワークスペースを有効にし、ドメイン上で Expensify カードまたは会社カードフィードを設定してください。',
findGroup: 'グループを検索',
},
},
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index c82199cd..b92c0162 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -11004,8 +11004,9 @@ Hier is een *proefbon* om je te laten zien hoe het werkt:`,
permissions: 'Groepsmachtigingen',
createNewGroupButton: 'Nieuwe groep',
createGroupSubmitButton: 'Groep aanmaken',
- expensifyCardPreferredWorkspace: 'Expensify Card voorkeurswerkruimte',
- expensifyCardPreferredWorkspaceDescription: 'Alle Expensify Card-transacties worden aangemaakt in de Expensify Card-voorkeurswerkruimte in plaats van de voorkeurswerkruimte.',
+ expensifyCardPreferredWorkspace: 'Voorkeurswerkruimte voor kaart',
+ expensifyCardPreferredWorkspaceDescription:
+ 'Alle transacties met de Expensify Kaart en bedrijfspassen worden aangemaakt in de kaartvoorkeurswerkruimte in plaats van in de voorkeurswerkruimte. Als je deze functie inschakelt, wordt de instelling voor de voorkeurswerkruimte overschreven, maar alleen voor kaarttransacties.',
strictlyEnforceWorkspaceRules: 'Werkruimteregels strikt afdwingen',
strictlyEnforceWorkspaceRulesDescription:
'Aan alle werkruimteregels moet worden voldaan voordat een rapport kan worden ingediend. Handmatige uitzonderingen zijn niet toegestaan.',
@@ -11023,7 +11024,8 @@ Hier is een *proefbon* om je te laten zien hoe het werkt:`,
noWorkspacesMessage: 'Er zijn geen werkruimtes op dit domein. Een werkruimte is vereist om deze beperking in te schakelen.',
restrictDefaultLoginSelection: 'Standaard login-selectie beperken',
restrictDefaultLoginSelectionDescription: 'Voorkomt dat leden hun login-e-mail wijzigen naar een adres buiten het bedrijfsdomein om beleidsbeperkingen te omzeilen.',
- expensifyCardPreferredWorkspaceDisabledMessage: 'Om deze instelling in te schakelen, schakelt u eerst een voorkeurswerkruimte in en stelt u Expensify Cards in op uw domein.',
+ expensifyCardPreferredWorkspaceDisabledMessage:
+ 'Schakel eerst een voorkeurswerkruimte in en stel een Expensify Kaart of een bedrijfskaartfeed in op je domein om deze instelling in te schakelen.',
findGroup: 'Groep zoeken',
},
},
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index 7322d4b5..29d402a3 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -11023,9 +11023,9 @@ Oto *paragon testowy*, żeby pokazać Ci, jak to działa:`,
permissions: 'Uprawnienia grupy',
createNewGroupButton: 'Nowa grupa',
createGroupSubmitButton: 'Utwórz grupę',
- expensifyCardPreferredWorkspace: 'Preferowany workspace karty Expensify',
+ expensifyCardPreferredWorkspace: 'Preferowane miejsce pracy karty',
expensifyCardPreferredWorkspaceDescription:
- 'Wszystkie transakcje Expensify Card będą tworzone w preferowanym obszarze roboczym Expensify Card zamiast w preferowanym obszarze roboczym.',
+ 'Wszystkie transakcje z Karty Expensify i kart firmowych będą tworzone w preferowanej przestrzeni roboczej dla kart zamiast w preferowanej przestrzeni roboczej. Włączenie tej funkcji nadpisze ustawienie preferowanej przestrzeni roboczej tylko dla transakcji kartowych.',
strictlyEnforceWorkspaceRules: 'Ściśle egzekwuj reguły przestrzeni roboczej',
strictlyEnforceWorkspaceRulesDescription: 'Przed przesłaniem raportu muszą zostać spełnione wszystkie reguły przestrzeni roboczej. Ręczne wyjątki są niedozwolone.',
restrictExpenseWorkspaceCreation: 'Ogranicz tworzenie/usuwanie przestrzeni roboczej wydatków',
@@ -11042,7 +11042,8 @@ Oto *paragon testowy*, żeby pokazać Ci, jak to działa:`,
noWorkspacesMessage: 'W tej domenie nie ma żadnych obszarów roboczych. Obszar roboczy jest wymagany, aby włączyć to ograniczenie.',
restrictDefaultLoginSelection: 'Ogranicz wybór domyślnego logowania',
restrictDefaultLoginSelectionDescription: 'Zapobiega zmianie adresu e-mail do logowania przez członków na adres spoza domeny firmowej, aby obejść ograniczenia zasad.',
- expensifyCardPreferredWorkspaceDisabledMessage: 'Aby włączyć to ustawienie, najpierw włącz preferowane miejsce pracy i skonfiguruj karty Expensify w swojej domenie.',
+ expensifyCardPreferredWorkspaceDisabledMessage:
+ 'Aby włączyć to ustawienie, najpierw włącz preferowany workspace i skonfiguruj Kartę Expensify lub zasilanie kart firmowych w swojej domenie.',
findGroup: 'Znajdź grupę',
},
},
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index 3e966e28..b0d34b9b 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -10997,9 +10997,9 @@ Aqui está um *comprovante de teste* para mostrar como funciona:`,
permissions: 'Permissões do grupo',
createNewGroupButton: 'Novo grupo',
createGroupSubmitButton: 'Criar grupo',
- expensifyCardPreferredWorkspace: 'Espaço de trabalho preferido para o cartão Expensify',
+ expensifyCardPreferredWorkspace: 'Workspace de cartão preferencial',
expensifyCardPreferredWorkspaceDescription:
- 'Todas as transações do Expensify Card serão criadas no espaço de trabalho preferido do Expensify Card em vez do espaço de trabalho preferido.',
+ 'Todas as transações do Cartão Expensify e de cartões corporativos serão criadas no Espaço de Trabalho Preferencial de Cartão em vez do Espaço de Trabalho Preferencial. Ativar este recurso substituirá a configuração de Espaço de Trabalho Preferencial apenas para transações de cartão.',
strictlyEnforceWorkspaceRules: 'Aplicar rigorosamente as regras do espaço de trabalho',
strictlyEnforceWorkspaceRulesDescription: 'Todas as regras do espaço de trabalho devem ser atendidas antes de enviar um relatório. Não são permitidas exceções manuais.',
restrictExpenseWorkspaceCreation: 'Restringir a criação/remoção de espaços de trabalho de despesas',
@@ -11018,7 +11018,8 @@ Aqui está um *comprovante de teste* para mostrar como funciona:`,
restrictDefaultLoginSelection: 'Restringir seleção de login padrão',
restrictDefaultLoginSelectionDescription:
'Impede que os membros alterem o e-mail de login para um endereço fora do domínio da empresa, evitando que burlem restrições de políticas.',
- expensifyCardPreferredWorkspaceDisabledMessage: 'Para ativar esta configuração, primeiro ative um workspace preferido e configure os Cartões Expensify no seu domínio.',
+ expensifyCardPreferredWorkspaceDisabledMessage:
+ 'Para ativar esta configuração, primeiro ative um espaço de trabalho preferido e configure um Cartão Expensify ou um feed de cartão corporativo no seu domínio.',
findGroup: 'Encontrar grupo',
},
},
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index 59bed8db..4cda337e 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -10611,8 +10611,8 @@ ${reportName}`,
permissions: '群组权限',
createNewGroupButton: '新建群组',
createGroupSubmitButton: '创建群组',
- expensifyCardPreferredWorkspace: 'Expensify Card 首选工作区',
- expensifyCardPreferredWorkspaceDescription: '所有Expensify Card交易将在Expensify Card首选工作区而非首选工作区中创建。',
+ expensifyCardPreferredWorkspace: '卡首选工作区',
+ expensifyCardPreferredWorkspaceDescription: '所有 Expensify 卡和公司卡交易将创建在“卡首选工作区”,而不是“首选工作区”。启用此功能后,将仅对卡交易覆盖“首选工作区”的设置。',
strictlyEnforceWorkspaceRules: '严格执行工作空间规则',
strictlyEnforceWorkspaceRulesDescription: '提交报告前必须满足所有工作空间规则。不允许手动例外。',
restrictExpenseWorkspaceCreation: '限制创建/删除费用工作区',
@@ -10628,7 +10628,7 @@ ${reportName}`,
noWorkspacesMessage: '此域上没有工作区。启用此限制需要一个工作区。',
restrictDefaultLoginSelection: '限制默认登录选择',
restrictDefaultLoginSelectionDescription: '防止成员将登录邮箱更改为公司域名以外的地址,以规避政策限制。',
- expensifyCardPreferredWorkspaceDisabledMessage: '要启用此设置,请先启用一个首选工作区,并在您的域上完成 Expensify Cards 的设置。',
+ expensifyCardPreferredWorkspaceDisabledMessage: '如需启用此设置,请先启用一个首选工作区,并在您的域上设置 Expensify 卡或公司卡交易导入。',
findGroup: '查找群组',
},
},
Note You can apply these changes to your branch by copying the patch to your clipboard, then running |
|
@joekaufmanexpensify yeah that's cleaner, went with your approach. now the toggles keep exactly what the person set, nothing flips on its own. on Create we re-check the dependency and if it's gone (workspace or card feed removed from another tab/device) we block the submit and show the oops error explaining why. and if they turn a toggle off themselves while its condition isn't met, it locks the same way it would on a cold load. covered both scenarios in the tests too |
|
Great, thank you! |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandrid.ntative.movAndroid: mWeb Chromeandroidweb.mp4iOS: HybridAppiosnative.moviOS: mWeb Safariios.web.movMacOS: Chrome / Safariweb.mov |
|
@dilshodmackbook-sketch, could you please merge the main? thanks. |
…oup-card-preferred-workspace
@marufsharifi done |
|
@NicolasBonet Done |
|
🚧 NicolasBonet has triggered a test Expensify/App build. You can view the workflow run 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. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/NicolasBonet in version: 9.4.81-0 🚀
|
|
Yes — one help site article needed updating, and the draft PR is up: Docs updates for E/A#100127 Card preferred workspace now covers company card feeds ( What was stale. docs/articles/new-expensify/domains/Create-and-Manage-Domain-Groups.md had a section titled "What Expensify Card preferred workspace does" that said the toggle posts Expensify Card transactions only. After this PR the label is Card preferred workspace and it covers company card feeds too, so a Domain Admin with only a third-party feed would read that the setting doesn't apply to them. What the docs PR changes.
It also includes two small UI-exact fixes in the same article that Two things you should check.
Articles I checked and left alone
@dilshodmackbook-sketch, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR |
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.4.81-1 🚀
|
1 similar comment
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.4.81-1 🚀
|
Explanation of Change
The domain-group "Card preferred workspace" toggle was gated on
isDomainUsingExpensifyCard, which is only truthy when the domain has an Expensify Card feed (presence ofprivate_expensifyCardSettings_{domainAccountID}). A domain whose only card data is a third-party company card feed therefore couldn't enable the setting — even though the override already applies to those feeds once it's on. The label, description, and disabled-state error copy were also worded as Expensify-Card-only.This PR (frontend only, NewDot only):
useIsDomainUsingCard(domainAccountID)hook that returnstruewhen the domain has an Expensify Card feed OR a company card feed. The company-feed check reads the domain-scopedsharedNVP_private_domain_member_{domainAccountID}key and reusesgetOriginalCompanyFeeds(called withoutfeedKeysWithCards, so a connected feed with no assigned cards yet still qualifies, and pending/deleting feeds and the Expensify Card bank placeholder are excluded). Both reads use boolean selectors to avoid re-renders on unrelated feed writes.ExpensifyCardPreferredWorkspaceToggle(existing group) andDomainGroupCreatePage(create group) — so they can't drift. The existing&& !isActiveescape hatch is kept, so a group that already has the setting on is never locked out.No change to
overridePreferredPolicyWithCardPolicyor the override write; this only widens when the toggle can be enabled. Behavior for domains that already have the setting on is unchanged.Fixed Issues
$ #99110
PROPOSAL: #99110 (comment)
Tests
Prerequisite: sign in as a domain admin.
Offline tests
Same as Tests — the toggle is gated on Onyx data that is already cached, so eligibility and copy render identically offline.
QA Steps
Same as Tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, 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.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
Screen.Recording.2026-09-02.at.15.03.03.mov
Android: mWeb Chrome
Screen.Recording.2026-09-02.at.14.51.09.mov
iOS: Native
Screen.Recording.2026-09-02.at.15.09.08.mov
iOS: mWeb Safari
Screen.Recording.2026-09-02.at.14.51.09.mov
MacOS: Chrome / Safari
Screen.Recording.2026-09-02.at.12.03.59.mov