Add 'Apply Cash Back to My Expensify Bill' toggle to card settings#87956
Add 'Apply Cash Back to My Expensify Bill' toggle to card settings#87956allgandalf wants to merge 16 commits intoExpensify:mainfrom
Conversation
|
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 |
|
@ZhenjaHorbach 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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3309561d34
ℹ️ 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".
|
@JS00001 assigning you here since pull bearer assigned you in the Auth PR https://github.com/Expensify/Auth/pull/21079 |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
| applyCashbackToBill: 'Apply cash back to my Expensify bill', | ||
| applyCashbackToBillDescription: 'Cash back from the Expensify Card will be used towards payment for your Expensify bill.', |
There was a problem hiding this comment.
asking copy confirmation on slack https://expensify.slack.com/archives/C07NMDKEFMH/p1776671920436959?thread_ts=1776114531.642309&cid=C07NMDKEFMH
| @@ -32,6 +36,11 @@ function WorkspaceCardSettingsPage({route}: WorkspaceCardSettingsPageProps) { | |||
| const [bankAccountList] = useOnyx(ONYXKEYS.BANK_ACCOUNT_LIST); | |||
| const [cardSettings] = useOnyx(`${ONYXKEYS.COLLECTION.PRIVATE_EXPENSIFY_CARD_SETTINGS}${defaultFundID}`); | |||
There was a problem hiding this comment.
It seems like we are using the expensify card settings NVP here, but I dont think we are in the auth PR
There was a problem hiding this comment.
yeah we write to DOMAIN_MEMBER in Auth, but getFullExpensifyCardsSettingsForOnyx reads that value and injects it into the PRIVATE_EXPENSIFYCARD_SETTINGS response. so the frontend reads from PRIVATE_EXPENSIFY_CARD_SETTINGS Onyx key and the value is always the current DOMAIN_MEMBER state, kept in sync by the backend
| @@ -0,0 +1,6 @@ | |||
| type ToggleCardCashbackToBillParams = { | |||
| workspaceAccountID: number; | |||
There was a problem hiding this comment.
Lets make this the domain account ID
| workspaceAccountID: number; | |
| domainAccountID: number; |
There was a problem hiding this comment.
keeping workspaceAccountID to match the existing UpdateCardSettlementFrequencyParams pattern in the same file. the Web-E handler accepts both policyAccountID and workspaceAccountID (same as UpdateCardSettlementFrequency) before passing as domainAccountID to Auth
|
Let us know when there are screenshots/videos to review. |
|
will let you know, we need to deploy auth and Web-E first so put this in draft |
Explanation of Change
Adds the "Apply Cash Back to My Expensify Bill" toggle to the workspace Expensify Card settings page. This toggle exists in Expensify Classic but was missing from NewDot.
The toggle allows workspace admins to choose whether their Expensify Card cash back is applied toward their Expensify bill or sent to their settlement account. It defaults to enabled (matching Classic behavior).
Visibility constraints (matching Classic):
Related PRs (must be merged together for the feature to work):
Fixed Issues
$ #77925
Tests
Offline tests
QA Steps
PR Author Checklist
Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari