-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[NoQA] Feature: Travel Invoicing - Release 2.4: Update Settlement Frequency Flow #79810
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[NoQA] Feature: Travel Invoicing - Release 2.4: Update Settlement Frequency Flow #79810
Conversation
…7-travel-invoicing-21
…7-travel-invoicing-21
…7-travel-invoicing-21
…7-travel-invoicing-21
…7-travel-invoicing-21
|
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.
|
|
@parasharrajat 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] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b58d69d992
ℹ️ 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".
src/pages/workspace/travel/WorkspaceTravelSettlementFrequencyPage.tsx
Outdated
Show resolved
Hide resolved
|
🟢 Ready for review! |
joekaufmanexpensify
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Design doc implementation
Explanation of Change
2.4 Update Settlement Frequency Flow
UX Flow
Default Value: When Travel Invoicing is first enabled, the settlement frequency defaults to Monthly (matching
CONST.EXPENSIFY_CARD.FREQUENCY_SETTING.MONTHLY). This aligns with typical business billing cycles and mirrors Expensify Card behavior. Users can change to daily if preferred.Data & Onyx
Current frequency comes from
getTravelSettlementFrequency(policy)(e.g., 'monthly', 'weekly').We map backend values to localized labels via a pure helper:
getLocalizedSettlementFrequencyLabel(frequency, translate).Actions
New function in
src/libs/actions/TravelInvoicing.ts:updateTravelInvoiceSettlementFrequency({policyID, frequency}):UpdateTravelInvoiceSettlementFrequency.Promiseand surfaces failures as localized errors.Components & reuse
Frequency selector:
SelectionList+RadioListItem, same as other simple settings pickers.WorkspaceTravelInvoicingSection:MenuItemwith a right‑aligned label for the localized frequency.Testing
Component tests:
updateTravelInvoiceSettlementFrequencywith the correct payload.Fixed Issues
$ #78676
PROPOSAL:
Tests
Note
Right now in order to test the section locally - tester can edit / comment out two blocks of code to be able to see the new section in Workspace Settings > Travel, below is a diff:
DIFF
Prerequisites
paymentBankAccountIDis set).Test 1: View Settlement Frequency Row
Steps:
Expected Results:
Test 2: Open Frequency Selection Screen
Steps:
Expected Results:
Test 3: Change Frequency (Online)
Steps:
Expected Results:
✅ Selection immediately updates to "Daily"
✅ Screen navigates back to Travel Invoicing section
✅ Settlement frequency row now displays "Daily"
Verify that no errors appear in the JS console
Offline tests
Test 5: Change Frequency While Offline (Optimistic Update)
Steps:
Expected Results:
Test 6: Reconnect After Offline Change (Success)
Steps:
Expected Results:
QA Steps
Same as tests.
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
web.mov
ios-hybrid.mov