Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
904ca23
Enable/disable per diem rates
shubham1206agra Oct 22, 2024
81b4213
Fix illustration file name
shubham1206agra Oct 22, 2024
eff827c
Adjusting comments
shubham1206agra Oct 22, 2024
0d0ffa1
Fix illustration file name
shubham1206agra Oct 22, 2024
cc201f0
Fix getPerDiemCustomUnit
shubham1206agra Oct 22, 2024
84afa28
Fix access
shubham1206agra Oct 22, 2024
feb8e97
Fix button color
shubham1206agra Oct 22, 2024
4b6ccc7
Making feature control only
shubham1206agra Oct 22, 2024
95e7819
Fixing text:
shubham1206agra Oct 23, 2024
c6ade13
Fixing command EnablePolicyPerDiem
shubham1206agra Oct 23, 2024
c70846d
Fixing ts
shubham1206agra Oct 23, 2024
bc92c1a
Fixing command name
shubham1206agra Oct 23, 2024
078e6b0
Merge branch 'Expensify:main' into per-diem-1
shubham1206agra Oct 28, 2024
fd961f6
Merge branch 'Expensify:main' into per-diem-1
shubham1206agra Oct 29, 2024
c6c7c42
Merge branch 'main' into per-diem-1
shubham1206agra Oct 29, 2024
d5e9497
Fixing wrong navigation
shubham1206agra Oct 30, 2024
0736acc
Merge branch 'main' into per-diem-1
shubham1206agra Oct 30, 2024
5db6a7f
Hiding option behind beta
shubham1206agra Oct 30, 2024
58d9ff8
Fixing some more functions
shubham1206agra Oct 30, 2024
9d6cf46
Fixing translations
shubham1206agra Oct 30, 2024
c9eb213
Merge branch 'Expensify:main' into per-diem-1
shubham1206agra Oct 31, 2024
5e7769c
Apply suggestions from code review
shubham1206agra Oct 31, 2024
9ba1217
Merge branch 'main' into per-diem-1
shubham1206agra Nov 5, 2024
64226e9
Merge branch 'main' into per-diem-1
shubham1206agra Nov 6, 2024
79867aa
Fixing feature name variable
shubham1206agra Nov 6, 2024
a7a5974
Added spanish translations
shubham1206agra Nov 6, 2024
5fd7a43
Apply suggestions from code review
shubham1206agra Nov 6, 2024
5be926c
Fix page alignment
shubham1206agra Nov 6, 2024
42a19ae
Added per diem learn more link
shubham1206agra Nov 7, 2024
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -847,6 +847,7 @@ const CONST = {
UPWORK_URL: 'https://github.com/Expensify/App/issues?q=is%3Aopen+is%3Aissue+label%3A%22Help+Wanted%22',
DEEP_DIVE_EXPENSIFY_CARD: 'https://community.expensify.com/discussion/4848/deep-dive-expensify-card-and-quickbooks-online-auto-reconciliation-how-it-works',
DEEP_DIVE_ERECEIPTS: 'https://community.expensify.com/discussion/5542/deep-dive-what-are-ereceipts/',
DEEP_DIVE_PER_DIEM: 'https://community.expensify.com/discussion/4772/how-to-add-a-single-rate-per-diem',
GITHUB_URL: 'https://github.com/Expensify/App',
TERMS_URL: `${USE_EXPENSIFY_URL}/terms`,
PRIVACY_URL: `${USE_EXPENSIFY_URL}/privacy`,
Expand Down Expand Up @@ -2468,6 +2469,7 @@ const CONST = {
ARE_INVOICES_ENABLED: 'areInvoicesEnabled',
ARE_TAXES_ENABLED: 'tax',
ARE_RULES_ENABLED: 'areRulesEnabled',
ARE_PER_DIEM_RATES_ENABLED: 'arePerDiemRatesEnabled',
},
DEFAULT_CATEGORIES: [
'Advertising',
Expand Down Expand Up @@ -2634,6 +2636,7 @@ const CONST = {

CUSTOM_UNITS: {
NAME_DISTANCE: 'Distance',
NAME_PER_DIEM_INTERNATIONAL: 'Per Diem International',
DISTANCE_UNIT_MILES: 'mi',
DISTANCE_UNIT_KILOMETERS: 'km',
MILEAGE_IRS_RATE: 0.67,
Expand Down Expand Up @@ -6095,6 +6098,14 @@ const CONST = {
description: 'workspace.upgrade.rules.description' as const,
icon: 'Rules',
},
perDiem: {
id: 'perDiem' as const,
alias: 'per-diem',
name: 'Per diem',
title: 'workspace.upgrade.perDiem.title' as const,
description: 'workspace.upgrade.perDiem.description' as const,
icon: 'PerDiem',
},
};
},
REPORT_FIELD_TYPES: {
Expand Down
4 changes: 4 additions & 0 deletions src/ROUTES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1273,6 +1273,10 @@ const ROUTES = {
route: 'settings/workspaces/:policyID/distance-rates/:rateID/tax-rate/edit',
getRoute: (policyID: string, rateID: string) => `settings/workspaces/${policyID}/distance-rates/${rateID}/tax-rate/edit` as const,
},
WORKSPACE_PER_DIEM: {
route: 'settings/workspaces/:policyID/per-diem',
getRoute: (policyID: string) => `settings/workspaces/${policyID}/per-diem` as const,
},
RULES_CUSTOM_NAME: {
route: 'settings/workspaces/:policyID/rules/name',
getRoute: (policyID: string) => `settings/workspaces/${policyID}/rules/name` as const,
Expand Down
1 change: 1 addition & 0 deletions src/SCREENS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,7 @@ const SCREENS = {
RULES_MAX_EXPENSE_AMOUNT: 'Rules_Max_Expense_Amount',
RULES_MAX_EXPENSE_AGE: 'Rules_Max_Expense_Age',
RULES_BILLABLE_DEFAULT: 'Rules_Billable_Default',
PER_DIEM: 'Per_Diem',
},

EDIT_REQUEST: {
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 @@ -35,6 +35,7 @@ const WIDE_LAYOUT_INACTIVE_SCREENS: string[] = [
SCREENS.SETTINGS.TROUBLESHOOT,
SCREENS.SETTINGS.SAVE_THE_WORLD,
SCREENS.WORKSPACE.RULES,
SCREENS.WORKSPACE.PER_DIEM,
];

export default WIDE_LAYOUT_INACTIVE_SCREENS;
2 changes: 2 additions & 0 deletions src/components/Icon/Illustrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ import MoneyWings from '@assets/images/simple-illustrations/simple-illustration_
import OpenSafe from '@assets/images/simple-illustrations/simple-illustration__opensafe.svg';
import PalmTree from '@assets/images/simple-illustrations/simple-illustration__palmtree.svg';
import Pencil from '@assets/images/simple-illustrations/simple-illustration__pencil.svg';
import PerDiem from '@assets/images/simple-illustrations/simple-illustration__perdiem.svg';
import PiggyBank from '@assets/images/simple-illustrations/simple-illustration__piggybank.svg';
import Profile from '@assets/images/simple-illustrations/simple-illustration__profile.svg';
import QRCode from '@assets/images/simple-illustrations/simple-illustration__qr-code.svg';
Expand Down Expand Up @@ -264,4 +265,5 @@ export {
OtherCompanyCardDetail,
StripeCompanyCardDetail,
WellsFargoCompanyCardDetail,
PerDiem,
};
30 changes: 30 additions & 0 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2337,6 +2337,7 @@ const translations = {
displayedAs: 'Displayed as',
plan: 'Plan',
profile: 'Profile',
perDiem: 'Per diem',
bankAccount: 'Bank account',
connectBankAccount: 'Connect bank account',
testTransactions: 'Test transactions',
Expand Down Expand Up @@ -2401,6 +2402,25 @@ const translations = {
}
},
},
perDiem: {
subtitle: 'Set per diem rates to control daily employee spend. ',
destination: 'Destination',
subrate: 'Subrate',
amount: 'Amount',
deleteRates: () => ({
one: 'Delete rate',
other: 'Delete rates',
}),
deletePerDiemRate: 'Delete per diem rate',
areYouSureDelete: () => ({
one: 'Are you sure you want to delete this rate?',
other: 'Are you sure you want to delete these rates?',
}),
emptyList: {
title: 'Per diem',
subtitle: 'Set per diem rates to control daily employee spend. Import rates from a spreadsheet to get started.',
},
},
qbd: {
exportOutOfPocketExpensesDescription: 'Set how out-of-pocket expenses export to QuickBooks Desktop.',
exportOutOfPocketExpensesCheckToogle: 'Mark checks as “print later”',
Expand Down Expand Up @@ -3291,6 +3311,10 @@ const translations = {
title: 'Distance rates',
subtitle: 'Add, update, and enforce rates.',
},
perDiem: {
title: 'Per diem',
subtitle: 'Set Per diem rates to control daily employee spend.',
},
expensifyCard: {
title: 'Expensify Card',
subtitle: 'Gain insights and control over spend.',
Expand Down Expand Up @@ -4067,6 +4091,12 @@ const translations = {
description: `Rules run in the background and keep your spend under control so you don't have to sweat the small stuff.\n\nRequire expense details like receipts and descriptions, set limits and defaults, and automate approvals and payments – all in one place.`,
onlyAvailableOnPlan: 'Rules are only available on the Control plan, starting at ',
},
perDiem: {
title: 'Per diem',
description:
'Per diem is a great way to keep your daily costs compliant and predictable whenever your employees travel. Enjoy features like custom rates, default categories, and more granular details like destinations and subrates.',
onlyAvailableOnPlan: 'Per diem are only available on the Control plan, starting at ',

@c3024 c3024 Nov 7, 2024

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
onlyAvailableOnPlan: 'Per diem are only available on the Control plan, starting at ',
onlyAvailableOnPlan: 'Per diem is only available on the Control plan, starting at ',

NIT: Google says plural for per diem is per diems.

So, it might need to be confirmed if this should be "Per diems are" or "Per diem is" or retain as it is.

},
pricing: {
amount: '$9 ',
perActiveMember: 'per active member per month.',
Expand Down
30 changes: 30 additions & 0 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2358,6 +2358,7 @@ const translations = {
rules: 'Reglas',
plan: 'Plan',
profile: 'Perfil',
perDiem: 'Per diem',

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Gonals Can we get spansish translations please?

bankAccount: 'Cuenta bancaria',
displayedAs: 'Mostrado como',
connectBankAccount: 'Conectar cuenta bancaria',
Expand Down Expand Up @@ -2424,6 +2425,25 @@ const translations = {
}
},
},
perDiem: {
subtitle: 'Establece las tasas per diem para controlar los gastos diarios de los empleados. ',
destination: 'Destino',
subrate: 'Subtasa',
amount: 'Cantidad',
deleteRates: () => ({
one: 'Eliminar tasa',
other: 'Eliminar tasas',
}),
deletePerDiemRate: 'Eliminar tasa per diem',
areYouSureDelete: () => ({
one: '¿Estás seguro de que quieres eliminar esta tasa?',
other: '¿Estás seguro de que quieres eliminar estas tasas?',
}),
emptyList: {
title: 'Per diem',
subtitle: 'Establece dietas per diem para controlar el gasto diario de los empleados. Importa las tarifas desde una hoja de cálculo para comenzar.',
},
},
qbd: {
exportOutOfPocketExpensesDescription: 'Establezca cómo se exportan los gastos de bolsillo a QuickBooks Desktop.',
exportOutOfPocketExpensesCheckToogle: 'Marcar los cheques como “imprimir más tarde”',
Expand Down Expand Up @@ -3332,6 +3352,10 @@ const translations = {
title: 'Tasas de distancia',
subtitle: 'Añade, actualiza y haz cumplir las tasas.',
},
perDiem: {
title: 'Per diem',
subtitle: 'Establece las tasas per diem para controlar los gastos diarios de los empleados.',
},
expensifyCard: {
title: 'Tarjeta Expensify',
subtitle: 'Obtén información y control sobre tus gastos.',
Expand Down Expand Up @@ -4113,6 +4137,12 @@ const translations = {
description: `Las reglas se ejecutan en segundo plano y mantienen tus gastos bajo control para que no tengas que preocuparte por los detalles pequeños.\n\nExige detalles de los gastos, como recibos y descripciones, establece límites y valores predeterminados, y automatiza las aprobaciones y los pagos, todo en un mismo lugar.`,
onlyAvailableOnPlan: 'Las reglas están disponibles solo en el plan Control, que comienza en ',
},
perDiem: {
title: 'Per diem',
description:
'Las dietas per diem (ej.: $100 por día para comidas) son una excelente forma de mantener los gastos diarios predecibles y ajustados a las políticas de la empresa, especialmente si tus empleados viajan por negocios. Disfruta de funciones como tasas personalizadas, categorías por defecto y detalles más específicos como destinos y subtasas.',
onlyAvailableOnPlan: 'Las dietas per diem solo están disponibles en el plan Control, a partir de ',
},
note: {
upgradeWorkspace: 'Mejore su espacio de trabajo para acceder a esta función, o',
learnMore: 'más información',
Expand Down
5 changes: 5 additions & 0 deletions src/libs/API/parameters/OpenPolicyPerDiemRatesPageParams.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
type OpenPolicyPerDiemRatesPageParams = {
policyID: string;
};

export default OpenPolicyPerDiemRatesPageParams;
7 changes: 7 additions & 0 deletions src/libs/API/parameters/TogglePolicyPerDiemParams.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
type TogglePolicyPerDiemParams = {
policyID: string;
enabled: boolean;
customUnitID: string;
};

export default TogglePolicyPerDiemParams;
2 changes: 2 additions & 0 deletions src/libs/API/parameters/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -346,4 +346,6 @@ export type {default as UpdateInvoiceCompanyNameParams} from './UpdateInvoiceCom
export type {default as UpdateInvoiceCompanyWebsiteParams} from './UpdateInvoiceCompanyWebsiteParams';
export type {default as UpdateQuickbooksDesktopExpensesExportDestinationTypeParams} from './UpdateQuickbooksDesktopExpensesExportDestinationTypeParams';
export type {default as UpdateQuickbooksDesktopCompanyCardExpenseAccountTypeParams} from './UpdateQuickbooksDesktopCompanyCardExpenseAccountTypeParams';
export type {default as TogglePolicyPerDiemParams} from './TogglePolicyPerDiemParams';
export type {default as OpenPolicyPerDiemRatesPageParams} from './OpenPolicyPerDiemRatesPageParams';
export type {default as TogglePlatformMuteParams} from './TogglePlatformMuteParams';
Loading