[NoQA] Implement the freeze and unfreeze options for admins#83600
[NoQA] Implement the freeze and unfreeze options for admins#83600ShridharGoel wants to merge 5 commits intoExpensify:mainfrom
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".
src/pages/workspace/expensifyCard/WorkspaceExpensifyCardDetailsPage.tsx
Outdated
Show resolved
Hide resolved
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
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