-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[OldDot Rules Migration] Category Rules #48171
[OldDot Rules Migration] Category Rules #48171
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple small details
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't it be flag-amount
as in the design doc table?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think that the same table is missing the /workspaces/ in the category rules urls
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@WojtekBoman Did you resolve this comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I've updated the category urls in the doc :)
@@ -429,6 +429,11 @@ const SCREENS = { | |||
CATEGORY_PAYROLL_CODE: 'Category_Payroll_Code', | |||
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', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as above
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! |
Going in for the final review now...
I think what you have there for resetting the approver makes sense. WRT the tax rate. I don't think we need to do anything there. In the old app there are only 3 options to choose from so "none" isn't an option whereas for the approver, yes, they can be removed. Overall, LGTM 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes LGTM
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 :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
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:
workspaceRules
beta. If you run the app locally you can modify thecanUseWorkspaceRules
orcanUseAllBetas
function inPermissions.ts
to always returntrue
.Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.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