revert: remove Home and Office commuter exclusions - #99777
Conversation
This reverts commit 1c7808f, the merge of "Allow Home and Office Commuter exclusions" (#94316), which caused bugs in production. Removes the HOME_AND_OFFICE exclusion method, the homeAddressRequired guard modal and its isDistanceRequest flag, the AddHomeAddress time-sensitive item, the HomeAddressRequiredContent report action, and their translations. "Add setting to prevent manual/odometer distance requests for a given policy" (#99433) merged on top of this and shares the same guard hook, so the conflicts were resolved to keep it intact: the useBlockDistanceRequest rename, the requireMapOrGPS setting and its toggle, and getDistanceExpenseTypeForPolicy at the distance entry points all stay. The hook returns to blocking manual/odometer flows only, now keyed off isMapOrGPSRequired so it still covers both requireMapOrGPS and commuter exclusions.
🦜 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 db454098..fc9705b4 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -7318,7 +7318,7 @@ Der Control-Tarif beginnt bei 9 $ pro aktivem Mitglied und Monat.`,
summaryDisabled: 'Kein Ausschluss von Pendelstrecken',
summaryFixedDistance: ({distance, unit}: {distance: number; unit: string}) => `${distance} ${unit} pro Abrechnung ausschließen`,
optionDisabledTitle: 'Pendelfahrten nicht ausschließen',
- optionDisabledHelp: 'Es wird kein Ausschluss für den Arbeitsweg angewendet.',
+ optionDisabledHelp: 'Es wird kein Arbeitsweg-Ausschluss angewendet.',
optionFixedDistanceTitle: 'Eine feste Entfernung pro Antrag ausschließen',
optionFixedDistanceHelp: 'Ziehen Sie die gleiche Pendelstrecke von jeder Abrechnung ab. Am besten für Mitglieder geeignet, die eine Abrechnung pro Arbeitstag einreichen.',
distanceLabel: 'Entfernung',
diff --git a/src/languages/es.ts b/src/languages/es.ts
index ed72cc6a..c4181b95 100644
--- a/src/languages/es.ts
+++ b/src/languages/es.ts
@@ -9,7 +9,6 @@
* - Improve the prompts in prompts/translation, or
* - Improve context annotations in src/languages/en.ts
*/
-
import CONST from '@src/CONST';
import type {OriginalMessageReportPreview, OriginalMessageSettlementAccountLocked, PersonalRulesModifiedFields, PolicyRulesModifiedFields} from '@src/types/onyx/OriginalMessage';
@@ -7286,7 +7285,7 @@ El plan Controlar empieza en 9 $ por miembro activo al mes.`,
summaryDisabled: 'Sin exclusión por desplazamiento al trabajo',
summaryFixedDistance: ({distance, unit}: {distance: number; unit: string}) => `Excluir ${distance} ${unit} por reclamación`,
optionDisabledTitle: 'No excluir los desplazamientos al trabajo',
- optionDisabledHelp: 'No se aplica ninguna exclusión de desplazamiento.',
+ optionDisabledHelp: 'No se aplica ninguna exclusión por desplazamiento.',
optionFixedDistanceTitle: 'Excluir una distancia fija por reclamación',
optionFixedDistanceHelp: 'Resta la misma distancia de desplazamiento de cada solicitud. Ideal para personas que envían una solicitud por día laborable.',
distanceLabel: 'Distancia',
diff --git a/src/languages/it.ts b/src/languages/it.ts
index adb23abf..8b597f57 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -7281,7 +7281,7 @@ Il piano Control parte da 9 $ al mese per ogni membro attivo.`,
summaryDisabled: 'Nessuna esclusione per il tragitto',
summaryFixedDistance: ({distance, unit}: {distance: number; unit: string}) => `Escludi ${distance} ${unit} per rimborso`,
optionDisabledTitle: 'Non escludere gli spostamenti casa-lavoro',
- optionDisabledHelp: 'Non è applicata alcuna esclusione per il tragitto casa-lavoro.',
+ optionDisabledHelp: 'Nessuna esclusione del tragitto casa-lavoro è applicata.',
optionFixedDistanceTitle: 'Escludi una distanza fissa per richiesta',
optionFixedDistanceHelp: 'Detrai la stessa distanza del tragitto casa-lavoro da ogni richiesta. Ideale per chi invia una richiesta per ogni giorno lavorativo.',
distanceLabel: 'Distanza',
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index 522ad75c..7e6d8957 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -7189,7 +7189,7 @@ Control プランは、アクティブメンバー1人あたり月額 $9 から
summaryDisabled: '通勤除外なし',
summaryFixedDistance: ({distance, unit}: {distance: number; unit: string}) => `申請ごとに ${distance} ${unit} を除外します`,
optionDisabledTitle: '通勤を除外しない',
- optionDisabledHelp: '通勤除外は適用されていません。',
+ optionDisabledHelp: '通勤の除外は適用されていません。',
optionFixedDistanceTitle: '申請ごとに一定距離を除外します',
optionFixedDistanceHelp: '各申請から同じ通勤距離を差し引きます。1勤務日につき1件の申請を行うメンバーに最適です。',
distanceLabel: '距離',
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index b2c58fa1..f6c917fb 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -7286,7 +7286,7 @@ Plan Control zaczyna się od 9 USD za aktywnego członka miesięcznie.`,
summaryDisabled: 'Bez wykluczenia dojazdów',
summaryFixedDistance: ({distance, unit}: {distance: number; unit: string}) => `Wyklucz ${distance} ${unit} na zgłoszenie`,
optionDisabledTitle: 'Nie wykluczaj dojazdów',
- optionDisabledHelp: 'Nie zastosowano wyłączenia dojazdów.',
+ optionDisabledHelp: 'Nie zastosowano wykluczenia dojazdów do pracy.',
optionFixedDistanceTitle: 'Wyklucz stały dystans na każde rozliczenie',
optionFixedDistanceHelp: 'Odejmij tę samą odległość dojazdu od każdego rozliczenia. Najlepsze dla osób, które składają jedno rozliczenie na każdy dzień pracy.',
distanceLabel: 'Dystans',
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index 9ce96e20..0dc0681c 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -7008,7 +7008,7 @@ _如需更详细的说明,请[访问我们的帮助网站](${CONST.NETSUITE_IM
summaryDisabled: '不排除通勤',
summaryFixedDistance: ({distance, unit}: {distance: number; unit: string}) => `每次报销排除 ${distance} ${unit}`,
optionDisabledTitle: '不要排除通勤',
- optionDisabledHelp: '未应用通勤排除规则。',
+ optionDisabledHelp: '未应用通勤排除。',
optionFixedDistanceTitle: '为每笔报销排除固定距离',
optionFixedDistanceHelp: '从每笔报销中扣除相同的通勤距离。最适合每个工作日提交一笔报销的成员使用。',
distanceLabel: '距离',
Note You can apply these changes to your branch by copying the patch to your clipboard, then running |
|
🚧 francoisl has triggered a test Expensify/App build. You can view the workflow run here. |
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.
|
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
Discussing in https://expensify.slack.com/archives/C01GTK53T8Q/p1787883510578759, we might not need this as it's supposed to be behind a beta. |
Explanation of Change
This reverts commit 1c7808f, the merge of "Allow Home and Office Commuter exclusions"
(#94316), which caused bugs in production.
Removes the HOME_AND_OFFICE exclusion method, the homeAddressRequired guard modal and its isDistanceRequest flag, the AddHomeAddress time-sensitive item, the HomeAddressRequiredContent report action, and their translations.
"Add setting to prevent manual/odometer distance requests for a given policy" (#99433) merged on top of this and shares the same guard hook, so the conflicts were resolved to keep it intact: the useBlockDistanceRequest rename, the requireMapOrGPS setting and its toggle, and getDistanceExpenseTypeForPolicy at the distance entry points all stay. The hook returns to blocking manual/odometer flows only, now keyed off isMapOrGPSRequired so it still covers both requireMapOrGPS and commuter exclusions.
Fixed Issues
Some or all of:
#99752
#99752
#99740
#99735
#99731
#99725
#99724
#99722
#99720
#99713
#99712
#99711
#99710
#99709
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari