[OldDot Rules Migration] Category Rules#48171
Conversation
| getRoute: (policyID: string, categoryName: string) => `settings/workspaces/${policyID}/categories/${encodeURIComponent(categoryName)}/tax-rate` as const, | ||
| }, | ||
| WORSKPACE_CATEGORY_FLAG_AMOUNTS_OVER: { | ||
| route: 'settings/workspaces/:policyID/categories/:categoryName/flag-amounts', |
There was a problem hiding this comment.
shouldn't it be flag-amount as in the design doc table?
There was a problem hiding this comment.
This is correct, I named it wrong in the design doc, I thought the site was called Flag Amount over. I'll adjust the table in the doc
| getRoute: (policyID: string, categoryName: string) => `settings/workspaces/${policyID}/categories/${encodeURIComponent(categoryName)}/require-receipts-over` as const, | ||
| }, | ||
| WORSKPACE_CATEGORY_APPROVER: { | ||
| route: 'settings/workspaces/:policyID/categories/:categoryName/approver', |
There was a problem hiding this comment.
i think that the same table is missing the /workspaces/ in the category rules urls
There was a problem hiding this comment.
Yes, I've updated the category urls in the doc :)
| CATEGORY_GL_CODE: 'Category_GL_Code', | ||
| CATEGORY_SETTINGS: 'Category_Settings', | ||
| CATEGORY_DEFAULT_TAX_RATE: 'Category_Default_Tax_Rate', | ||
| CATEGORY_FLAG_AMOUNTS_OVER: 'Category_Flag_Amounts_Over', |
src/pages/workspace/categories/CategoryRequireReceiptsOverPage.tsx
Outdated
Show resolved
Hide resolved
src/pages/workspace/categories/ExpenseLimitTypeSelector/ExpenseLimitTypeSelector.tsx
Outdated
Show resolved
Hide resolved
|
@dukenv0307 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] |
|
bump @dukenv0307 for review! |
|
Tagging in Design for a last look as I'm not sure if anyone's had a chance to check these changes yet (running an AdHoc build so maybe @shawnborton or someone can peep this before I hit merge). |
This comment has been minimized.
This comment has been minimized.
|
Sorry if I missed something, but do I have to be in a beta or something? I don't see the approvers in my categories? |
|
@dubielzyk-expensify Could you send a screenshot? And can you check if the members list is available on the Members page in the workspace settings? |
|
Yes there is a beta! |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪
|
|
Just took this for a spin and it looks pretty good from a design perspective! |
|
@marcaaron Conflicts solved :) |
dubielzyk-expensify
left a comment
There was a problem hiding this comment.
Looks good for me too. Great work
|
thanks @WojtekBoman. Stellar job here 🙇 |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
| areCommentsRequired: CONST.RED_BRICK_ROAD_PENDING_ACTION.UPDATE, | ||
| }, | ||
| areCommentsRequired, | ||
| commentHint: updatedCommentHint, |
There was a problem hiding this comment.
This does not reset the hint as this API does not support this on the backend. We have to call the API to do that. #52399
| return translate(`workspace.rules.categoryRules.requireReceiptsOverList.never`); | ||
| } | ||
|
|
||
| const maxExpenseAmountToDisplay = policy?.maxExpenseAmount === CONST.DISABLED_MAX_EXPENSE_VALUE ? 0 : policy?.maxExpenseAmount; |
There was a problem hiding this comment.
We used wrong property as maxAmount here which caused #54916
cc: @marcaaron
Details
This PR adds a new section to the Category settings:
Category rules. This section allows user to:Implementation details on how the actions listed above work can be found here
Fixed Issues
$ #47015
PROPOSAL:
Tests
Precondition:
workspaceRulesbeta. If you run the app locally you can modify thecanUseWorkspaceRulesorcanUseAllBetasfunction inPermissions.tsto always returntrue.Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))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.2024-08-30.at.16.28.19.mp4
Android: mWeb Chrome
Screen.Recording.2024-08-30.at.16.33.34.mov
iOS: Native
Screen.Recording.2024-08-30.at.16.24.41.mp4
iOS: mWeb Safari
Screen.Recording.2024-08-30.at.16.21.56.mp4
MacOS: Chrome / Safari
Screen.Recording.2024-08-30.at.17.18.56.mp4
MacOS: Desktop
Screen.Recording.2024-08-30.at.16.39.39.mov