Repository navigation
[NoQA] Implement the freeze and unfreeze options for admins - #83600
Conversation
| if (!card) { | ||
| return; | ||
| } | ||
| freezeCardAction(Number(card?.fundID ?? defaultFundID ?? CONST.DEFAULT_NUMBER_ID), card, session?.accountID ?? CONST.DEFAULT_NUMBER_ID); |
There was a problem hiding this comment.
❌ CONSISTENCY-3 (docs)
The expression Number(card?.fundID ?? defaultFundID ?? CONST.DEFAULT_NUMBER_ID) is duplicated in both handleConfirmFreeze (this line) and handleConfirmUnfreeze (line 131). Both handlers also share the same if (!card) { return; } guard clause and similar structure.
Extract the shared fund ID computation into a local variable above both handlers:
const workspaceAccountID = Number(card?.fundID ?? defaultFundID ?? CONST.DEFAULT_NUMBER_ID);Then use workspaceAccountID in both handleConfirmFreeze and handleConfirmUnfreeze.
Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 50584d43ed
ℹ️ 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".
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
| textStyles={styles.cardBadgeText} | ||
| text={translate(isVirtual ? 'workspace.expensifyCard.virtual' : 'workspace.expensifyCard.physical')} | ||
| {canManageCardFreeze && isCardFrozen(card) ? ( | ||
| <FrozenCardHeader |
There was a problem hiding this comment.
How about moving FrozenCardIndicator to a components and using it here too?
There was a problem hiding this comment.
Didn't get this, can you rephrase?
There was a problem hiding this comment.
I meant we can reuse the common component FrozenCardIndicator to follow the DRY principle
There was a problem hiding this comment.
FrozenCardHeader was used inside FrozenCardIndicator.
WorkspaceExpensifyCardDetailsPage used FrozenCardHeader directly and ExpensifyCardPage was using FrozenCardIndicator. So, FrozenCardHeader is the actual shared part, hence added it in ExpensifyCardPage also and removed the FrozenCardIndicator.
|
I face the crash. I think for the workspace expensify card we need to avoid updating onyx of key Screen.Recording.2026-03-02.at.22.01.35.mov |
|
@Pujan92 Updated |
|
No, the API was returning an error. I had assumed it's because they are still working on the release 2 backend changes. |
Pujan92
left a comment
There was a problem hiding this comment.
LGTM! Functionality needs to be tested once the BE is ready.
Screen.Recording.2026-03-04.at.09.32.48.mov
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2026-03-04.at.09.30.37.mov
|
We did not find an internal engineer to review this PR, trying to assign a random engineer to #81644 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
|
🚧 @MariaHCD has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ 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/MariaHCD in version: 9.3.31-0 🚀
|
|
🚀 Deployed to production by https://github.com/blimpich in version: 9.3.31-12 🚀
|

Explanation of Change
Implement the freeze and unfreeze options for admins
Fixed Issues
$ #81644, #81646
PROPOSAL:
Tests
Offline tests
QA Steps
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
Android: Native
Screen.Recording.2026-02-27.at.2.49.13.AM.mov
Android: mWeb Chrome
Screen.Recording.2026-02-27.at.2.42.07.AM.mov
iOS: Native
Screen.Recording.2026-02-26.at.11.09.33.PM.mov
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2026-02-26.at.11.02.17.PM.mov