Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/ONYXKEYS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,9 @@ const ONYXKEYS = {
/** The NVP containing the user's account level in-app export templates */
NVP_CSV_EXPORT_LAYOUTS: 'nvp_expensify_csvExportLayouts',

/** This NVP contains personal expense rules */
NVP_EXPENSE_RULES: 'nvp_expensify_expenseRules',

/** A timestamp of when the user created a GPS expense for the first time */
NVP_FIRST_CREATED_GPS_EXPENSE_DATE_NEW_DOT: 'nvp_firstCreatedGpsExpenseDateNewDot',

Expand Down Expand Up @@ -1373,6 +1376,7 @@ type OnyxValuesMapping = {
[ONYXKEYS.ONBOARDING_USER_REPORTED_INTEGRATION]: OnboardingAccounting;
[ONYXKEYS.HYBRID_APP]: OnyxTypes.HybridApp;
[ONYXKEYS.NVP_CSV_EXPORT_LAYOUTS]: Record<string, OnyxTypes.ExportTemplate>;
[ONYXKEYS.NVP_EXPENSE_RULES]: OnyxTypes.ExpenseRule[];
[ONYXKEYS.NVP_FIRST_CREATED_GPS_EXPENSE_DATE_NEW_DOT]: string;
[ONYXKEYS.NVP_LAST_DISTANCE_EXPENSE_TYPE]: DistanceExpenseType;
[ONYXKEYS.NVP_REPORT_LAYOUT_GROUP_BY]: string;
Expand Down
1 change: 1 addition & 0 deletions src/ROUTES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ const ROUTES = {
route: 'settings/wallet/card/:cardID/activate',
getRoute: (cardID: string) => `settings/wallet/card/${cardID}/activate` as const,
},
SETTINGS_RULES: 'settings/rules',
SETTINGS_LEGAL_NAME: 'settings/profile/legal-name',
SETTINGS_DATE_OF_BIRTH: 'settings/profile/date-of-birth',
SETTINGS_PHONE_NUMBER: 'settings/profile/phone',
Expand Down
4 changes: 4 additions & 0 deletions src/SCREENS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ const SCREENS = {
PAYMENT_CURRENCY: 'Settings_Payment_Currency',
},

RULES: {
ROOT: 'Settings_Rules',
},

WALLET: {
ROOT: 'Settings_Wallet',
VERIFY_ACCOUNT: 'Settings_Wallet_VerifyAccount',
Expand Down
1 change: 1 addition & 0 deletions src/components/FocusTrap/WIDE_LAYOUT_INACTIVE_SCREENS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const WIDE_LAYOUT_INACTIVE_SCREENS: string[] = [
SCREENS.SETTINGS.PREFERENCES.ROOT,
SCREENS.SETTINGS.SECURITY,
SCREENS.SETTINGS.WALLET.ROOT,
SCREENS.SETTINGS.RULES.ROOT,
SCREENS.SETTINGS.ABOUT,
SCREENS.WORKSPACES_LIST,
SCREENS.SETTINGS.SUBSCRIPTION.ROOT,
Expand Down
16 changes: 12 additions & 4 deletions src/components/SelectionListWithModal/CustomListHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,18 @@ type CustomListHeaderProps = {
leftHeaderText?: string | undefined;
rightHeaderText?: string | undefined;
rightHeaderMinimumWidth?: number;
shouldDivideEqualWidth?: boolean;
shouldShowRightCaret?: boolean;
};

function CustomListHeader({canSelectMultiple, leftHeaderText = '', rightHeaderText = '', rightHeaderMinimumWidth = 60, shouldShowRightCaret = false}: CustomListHeaderProps) {
function CustomListHeader({
canSelectMultiple,
leftHeaderText = '',
rightHeaderText = '',
rightHeaderMinimumWidth = 60,
shouldDivideEqualWidth = false,
shouldShowRightCaret = false,
}: CustomListHeaderProps) {
const styles = useThemeStyles();
const StyleUtils = useStyleUtils();

Expand All @@ -26,9 +34,9 @@ function CustomListHeader({canSelectMultiple, leftHeaderText = '', rightHeaderTe
canSelectMultiple && styles.pl3,
]}
>
<Text style={styles.textMicroSupporting}>{leftHeaderText}</Text>
<View style={[StyleUtils.getMinimumWidth(rightHeaderMinimumWidth), shouldShowRightCaret && styles.mr6]}>
<Text style={[styles.textMicroSupporting, styles.textAlignCenter]}>{rightHeaderText}</Text>
<Text style={[styles.textMicroSupporting, shouldDivideEqualWidth && styles.flex1]}>{leftHeaderText}</Text>
<View style={[shouldDivideEqualWidth ? styles.flex1 : StyleUtils.getMinimumWidth(rightHeaderMinimumWidth), shouldShowRightCaret && styles.mr6]}>
<Text style={[styles.textMicroSupporting, !shouldDivideEqualWidth && styles.textAlignCenter]}>{rightHeaderText}</Text>
</View>
</View>
);
Expand Down
16 changes: 16 additions & 0 deletions src/languages/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,7 @@ const translations: TranslationDeepObject<typeof en> = {
showMore: 'Mehr anzeigen',
showLess: 'Weniger anzeigen',
merchant: 'Händler',
change: 'Ändern',
category: 'Kategorie',
report: 'Bericht',
billable: 'Verrechenbar',
Expand Down Expand Up @@ -2377,6 +2378,21 @@ ${amount} für ${merchant} – ${date}`,
defaultPaymentMethod: 'Standard',
bankAccountLastFour: (lastFour: string) => `Bankkonto • ${lastFour}`,
},
expenseRulesPage: {
title: 'Ausgabenregeln',
subtitle: 'Diese Regeln gelten für deine Ausgaben. Wenn du in einen Workspace einreichst, können die Workspace-Regeln diese gegebenenfalls außer Kraft setzen.',
emptyRules: {title: 'Du hast noch keine Regeln erstellt', subtitle: 'Füge eine Regel hinzu, um Spesenberichte zu automatisieren.'},
changes: {
billable: (value: boolean) => `Ausgabe ${value ? 'verrechenbar' : 'nicht abrechenbar'} aktualisieren`,
category: (value: string) => `Kategorie auf „${value}“ aktualisieren`,
comment: (value: string) => `Beschreibung in „${value}“ ändern`,
merchant: (value: string) => `Händler aktualisieren auf „${value}“`,
reimbursable: (value: boolean) => `Ausgabe ${value ? 'erstattungsfähig' : 'nicht erstattungsfähig'} aktualisieren`,
report: (value: string) => `Einen Bericht mit dem Namen „${value}“ hinzufügen`,
tag: (value: string) => `Tag auf „${value}“ aktualisieren`,
tax: (value: string) => `Steuersatz auf ${value} aktualisieren`,
},
},
preferencesPage: {
appSection: {
title: 'App-Einstellungen',
Expand Down
19 changes: 19 additions & 0 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,7 @@ const translations = {
showMore: 'Show more',
showLess: 'Show less',
merchant: 'Merchant',
change: 'Change',
category: 'Category',
report: 'Report',
billable: 'Billable',
Expand Down Expand Up @@ -2329,6 +2330,24 @@ const translations = {
defaultPaymentMethod: 'Default',
bankAccountLastFour: (lastFour: string) => `Bank Account • ${lastFour}`,
},
expenseRulesPage: {
title: 'Expense rules',
subtitle: 'These rules will apply to your expenses. If you submit to a workspace, then the workspace rules may override them.',
emptyRules: {
title: "You haven't created any rules",
subtitle: 'Add a rule to automate expense reporting.',
},
changes: {
billable: (value: boolean) => `Update expense ${value ? 'billable' : 'non-billable'}`,
category: (value: string) => `Update category to "${value}"`,
comment: (value: string) => `Change description to "${value}"`,
merchant: (value: string) => `Update merchant to "${value}"`,
reimbursable: (value: boolean) => `Update expense ${value ? 'reimbursable' : 'non-reimbursable'}`,
report: (value: string) => `Add a report named "${value}"`,
tag: (value: string) => `Update tag to "${value}"`,
tax: (value: string) => `Update tax rate to "${value}"`,
},
},
preferencesPage: {
appSection: {
title: 'App preferences',
Expand Down
19 changes: 19 additions & 0 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ const translations: TranslationDeepObject<typeof en> = {
showMore: 'Mostrar más',
showLess: 'Mostrar menos',
merchant: 'Comerciante',
change: 'Cambio',
Comment thread
situchan marked this conversation as resolved.
Resolved
category: 'Categoría',
report: 'Informe',
billable: 'Facturable',
Expand Down Expand Up @@ -2021,6 +2022,24 @@ ${amount} para ${merchant} - ${date}`,
defaultPaymentMethod: 'Predeterminado',
bankAccountLastFour: (lastFour) => `Cuenta bancaria • ${lastFour}`,
},
expenseRulesPage: {
title: 'Reglas de gastos',
subtitle: 'Estas reglas se aplicarán a tus gastos. Si los envías a un espacio de trabajo, las reglas del espacio de trabajo pueden anularlas.',
emptyRules: {
title: 'Aún no has creado ninguna regla',
subtitle: 'Añade una regla para automatizar los informes de gastos.',
},
changes: {
billable: (value: boolean) => `Actualiza el gasto a ${value ? 'facturable' : 'no facturable'}`,
category: (value: string) => `Actualiza la categoría a "${value}"`,
comment: (value: string) => `Cambia la descripción a "${value}"`,
merchant: (value: string) => `Actualiza el comercio a "${value}"`,
reimbursable: (value: boolean) => `Actualiza el gasto a ${value ? 'reembolsable' : 'no reembolsable'}`,
report: (value: string) => `Añade un informe llamado "${value}"`,
tag: (value: string) => `Actualiza la etiqueta a "${value}"`,
tax: (value: string) => `Actualiza la tasa de impuesto a ${value}`,
},
},
preferencesPage: {
appSection: {
title: 'Preferencias de la aplicación',
Expand Down
16 changes: 16 additions & 0 deletions src/languages/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,7 @@ const translations: TranslationDeepObject<typeof en> = {
showMore: 'Afficher plus',
showLess: 'Afficher moins',
merchant: 'Commerçant',
change: 'Modifier',
category: 'Catégorie',
report: 'Rapport',
billable: 'Facturable',
Expand Down Expand Up @@ -2380,6 +2381,21 @@ ${amount} pour ${merchant} - ${date}`,
defaultPaymentMethod: 'Par défaut',
bankAccountLastFour: (lastFour: string) => `Compte bancaire • ${lastFour}`,
},
expenseRulesPage: {
title: 'Règles de dépenses',
subtitle: 'Ces règles s’appliqueront à vos notes de frais. Si vous soumettez à un espace de travail, alors les règles de l’espace de travail peuvent les remplacer.',
emptyRules: {title: 'Vous n’avez créé aucune règle', subtitle: 'Ajouter une règle pour automatiser la préparation des notes de frais.'},
changes: {
billable: (value: boolean) => `Mettre à jour la dépense ${value ? 'facturable' : 'non facturable'}`,
category: (value: string) => `Mettre à jour la catégorie en « ${value} »`,
comment: (value: string) => `Modifier la description en « ${value} »`,
merchant: (value: string) => `Mettre à jour le marchand en « ${value} »`,
reimbursable: (value: boolean) => `Mettre à jour la dépense ${value ? 'remboursable' : 'non remboursable'}`,
report: (value: string) => `Ajouter un rapport nommé « ${value} »`,
tag: (value: string) => `Mettre à jour le tag sur « ${value} »`,
tax: (value: string) => `Mettre à jour le taux de taxe à ${value}`,
},
},
preferencesPage: {
appSection: {
title: 'Préférences de l’application',
Expand Down
16 changes: 16 additions & 0 deletions src/languages/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,7 @@ const translations: TranslationDeepObject<typeof en> = {
showMore: 'Mostra altro',
showLess: 'Mostra meno',
merchant: 'Esercente',
change: 'Modifica',
category: 'Categoria',
report: 'Report',
billable: 'Fatturabile',
Expand Down Expand Up @@ -2370,6 +2371,21 @@ ${amount} per ${merchant} - ${date}`,
defaultPaymentMethod: 'Predefinito',
bankAccountLastFour: (lastFour: string) => `Conto bancario • ${lastFour}`,
},
expenseRulesPage: {
title: 'Regole spesa',
subtitle: 'Queste regole si applicheranno alle tue spese. Se le invii a uno spazio di lavoro, le regole dello spazio di lavoro potrebbero sostituirle.',
emptyRules: {title: 'Non hai creato alcuna regola', subtitle: 'Aggiungi una regola per automatizzare la rendicontazione delle spese.'},
changes: {
billable: (value: boolean) => `Aggiorna spesa ${value ? 'fatturabile' : 'non fatturabile'}`,
category: (value: string) => `Aggiorna categoria in "${value}"`,
comment: (value: string) => `Modifica la descrizione in "${value}"`,
merchant: (value: string) => `Aggiorna esercente in "${value}"`,
reimbursable: (value: boolean) => `Aggiorna la spesa ${value ? 'rimborsabile' : 'non rimborsabile'}`,
report: (value: string) => `Aggiungi un report chiamato "${value}"`,
tag: (value: string) => `Aggiorna etichetta in "${value}"`,
tax: (value: string) => `Aggiorna l’aliquota fiscale a ${value}`,
},
},
preferencesPage: {
appSection: {
title: 'Preferenze app',
Expand Down
16 changes: 16 additions & 0 deletions src/languages/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,7 @@ const translations: TranslationDeepObject<typeof en> = {
showMore: 'さらに表示',
showLess: '表示を減らす',
merchant: '加盟店',
change: '変更',
category: 'カテゴリ',
report: 'レポート',
billable: '請求可能',
Expand Down Expand Up @@ -2361,6 +2362,21 @@ ${merchant} への ${amount}(${date})`,
defaultPaymentMethod: 'デフォルト',
bankAccountLastFour: (lastFour: string) => `銀行口座 • ${lastFour}`,
},
expenseRulesPage: {
title: '経費ルール',
subtitle: 'これらのルールはあなたの経費に適用されます。ワークスペースに提出する場合、そのワークスペースのルールがこれらより優先されることがあります。',
emptyRules: {title: 'ルールがまだ作成されていません', subtitle: '経費報告を自動化するルールを追加する。'},
changes: {
billable: (value: boolean) => `経費 ${value ? '請求対象' : '請求不可'} を更新`,
category: (value: string) => `カテゴリを「${value}」に更新`,
comment: (value: string) => `説明を「${value}」に変更`,
merchant: (value: string) => `支払先を「${value}」に更新`,
reimbursable: (value: boolean) => `経費 ${value ? '精算対象' : '非精算'} を更新`,
report: (value: string) => `レポート名を「${value}」として追加`,
tag: (value: string) => `タグを「${value}」に更新`,
tax: (value: string) => `税率を${value}に更新`,
},
},
preferencesPage: {
appSection: {
title: 'アプリの設定',
Expand Down
16 changes: 16 additions & 0 deletions src/languages/nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,7 @@ const translations: TranslationDeepObject<typeof en> = {
showMore: 'Meer weergeven',
showLess: 'Minder weergeven',
merchant: 'Handelaar',
change: 'Wijzigen',
category: 'Categorie',
report: 'Rapport',
billable: 'Factureerbaar',
Expand Down Expand Up @@ -2367,6 +2368,21 @@ ${amount} voor ${merchant} - ${date}`,
defaultPaymentMethod: 'Standaard',
bankAccountLastFour: (lastFour: string) => `Bankrekening • ${lastFour}`,
},
expenseRulesPage: {
title: 'Kostenregels',
subtitle: 'Deze regels zijn van toepassing op je uitgaven. Als je ze indient bij een werkruimte, kunnen de regels van de werkruimte deze overschrijven.', //_/\__/_/ \_,_/\__/\__/\_,_/
emptyRules: {title: 'Je hebt nog geen regels aangemaakt', subtitle: 'Voeg een regel toe om onkostendeclaraties te automatiseren.'},
changes: {
billable: (value: boolean) => `Uitgave ${value ? 'factureerbaar' : 'niet-declarabel'} bijwerken`,
category: (value: string) => `Categorie bijwerken naar "${value}"`,
comment: (value: string) => `Beschrijving wijzigen in "${value}"`,
merchant: (value: string) => `Handelaar bijwerken naar "${value}"`,
reimbursable: (value: boolean) => `Uitgave ${value ? 'terugbetaalbaar' : 'niet-vergoedbaar'} bijwerken`,
report: (value: string) => `Een rapport met de naam "${value}" toevoegen`,
tag: (value: string) => `Tag bijwerken naar "${value}"`,
tax: (value: string) => `Belastingtarief bijwerken naar ${value}`,
},
},
preferencesPage: {
appSection: {
title: 'App-voorkeuren',
Expand Down
16 changes: 16 additions & 0 deletions src/languages/pl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,7 @@ const translations: TranslationDeepObject<typeof en> = {
showMore: 'Pokaż więcej',
showLess: 'Pokaż mniej',
merchant: 'Sprzedawca',
change: 'Zmień',
category: 'Kategoria',
report: 'Raport',
billable: 'Do zafakturowania',
Expand Down Expand Up @@ -2363,6 +2364,21 @@ ${amount} dla ${merchant} - ${date}`,
defaultPaymentMethod: 'Domyślne',
bankAccountLastFour: (lastFour: string) => `Konto bankowe • ${lastFour}`,
},
expenseRulesPage: {
title: 'Zasady wydatków',
subtitle: 'Te zasady będą miały zastosowanie do Twoich wydatków. Jeśli wysyłasz je do przestrzeni roboczej, zasady tej przestrzeni roboczej mogą je zastąpić.',
emptyRules: {title: 'Nie utworzyłeś żadnych reguł', subtitle: 'Dodaj regułę, aby zautomatyzować raportowanie wydatków.'},
changes: {
billable: (value: boolean) => `Zaktualizuj wydatek ${value ? 'Fakturowalne' : 'niefakturowalne'}`,
category: (value: string) => `Zaktualizuj kategorię na „${value}”`,
comment: (value: string) => `Zmień opis na „${value}”`,
merchant: (value: string) => `Zaktualizuj sprzedawcę na „${value}”`,
reimbursable: (value: boolean) => `Zaktualizuj wydatek ${value ? 'podlegający zwrotowi' : 'niepodlegający zwrotowi'}`,
report: (value: string) => `Dodaj raport o nazwie „${value}”`,
tag: (value: string) => `Zaktualizuj znacznik na „${value}”`,
tax: (value: string) => `Zaktualizuj stawkę podatku na ${value}`,
},
},
preferencesPage: {
appSection: {
title: 'Preferencje aplikacji',
Expand Down
16 changes: 16 additions & 0 deletions src/languages/pt-BR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,7 @@ const translations: TranslationDeepObject<typeof en> = {
showMore: 'Mostrar mais',
showLess: 'Mostrar menos',
merchant: 'Comerciante',
change: 'Alterar',
category: 'Categoria',
report: 'Relatório',
billable: 'Faturável',
Expand Down Expand Up @@ -2363,6 +2364,21 @@ ${amount} para ${merchant} - ${date}`,
defaultPaymentMethod: 'Padrão',
bankAccountLastFour: (lastFour: string) => `Conta bancária • ${lastFour}`,
},
expenseRulesPage: {
title: 'Regras de despesas',
subtitle: 'Essas regras serão aplicadas às suas despesas. Se você enviar para um workspace, as regras do workspace poderão substituí-las.',
emptyRules: {title: 'Você não criou nenhuma regra', subtitle: 'Adicione uma regra para automatizar o relatório de despesas.'},
changes: {
billable: (value: boolean) => `Atualizar despesa ${value ? 'cobrável' : 'não faturável'}`,
category: (value: string) => `Atualizar categoria para "${value}"`,
comment: (value: string) => `Alterar descrição para "${value}"`,
merchant: (value: string) => `Atualizar comerciante para "${value}"`,
reimbursable: (value: boolean) => `Atualizar despesa ${value ? 'reembolsável' : 'não reembolsável'}`,
report: (value: string) => `Adicione um relatório chamado "${value}"`,
tag: (value: string) => `Atualizar etiqueta para "${value}"`,
tax: (value: string) => `Atualizar taxa de imposto para ${value}`,
},
},
preferencesPage: {
appSection: {
title: 'Preferências do app',
Expand Down
Loading