Repository navigation
Add 'Require company cards for all purchases' configuration - #76728
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
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.
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
BE PR is merged, waiting for deploy |
|
This should be good @ikevin127 |
|
🔄 Checking... |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandroid-hybrid.mp4Android: mWeb Chromeandroid-mweb.mp4iOS: HybridAppios-hybrid.moviOS: mWeb Safariios-mweb.movMacOS: Chrome / Safariweb.mov |
ikevin127
left a comment
There was a problem hiding this comment.
🟢 LGTM - tests well while offline as well 👍
@JS00001 policy?.requireCompanyCardsEnabled is enabled or disabled, here's an example of this issue:
ios-hybrid.mov
…github.com:Expensify/App into jsenyitko-add-company-cards-violation
|
@ikevin127 I think that last issue is a case that isnt common enough to add extra logic for The user would have to be: So I think we should leave the logic in its simplest version of just checking for the violation |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/Valforte in version: 9.2.79-0 🚀
|
|
This PR failing because of a regression issue 527467828-41ef34d5-f5bc-428a-ab2b-2abbb5d165d8.mp4 |
|
🚀 Deployed to staging by https://github.com/Valforte in version: 9.2.81-0 🚀
|
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 9.2.81-5 🚀
|
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 9.2.81-5 🚀
|
Explanation of Change
Adds the 'Require Company Cards for All Purchases' violation, which requires members of a policy to use company cards for purchases (via a violation)
Fixed Issues
$ #76673
Tests
Create a policy
Enable workspace rules
Ensure that you cannot toggle the 'Require company cards for all purchases' option until you have a card feed
Connect a card feed
Ensure that you can now enable the 'Require company cards for all purchases' rule
Enable the rule
Create a cash expense - The expense should have a violation that cannot be dismissed: "Company card purchases required"
Create a card expense (or import some from the feed) - The expense should not have a violation
Create an expense by importing a personal card
Move the expense to a report on the policy
A violation should show up: "Company card purchases required"
Disable the rule in the workspace settings
All of the violations should disappear
Offline tests
N/A
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
Screen.Recording.2025-12-04.at.1.27.57.PM.mov