-
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
[Simplified Collect][Taxes] Creating new taxes #37967
[Simplified Collect][Taxes] Creating new taxes #37967
Conversation
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
Co-authored-by: DylanDylann <[email protected]>
return covertTaxNameToID(`${name}_${nextID}`); | ||
} | ||
|
||
function createPolicyTax(policyID: string, taxRate: TaxRate) { |
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.
We kept the create policy tags / categories in the policy.ts actions file. I think we should keep this in as well @luacmartins
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 we have decided to use a new file in the design doc:
https://docs.google.com/document/d/12FZycslrIE95QoKM8DZ37H_wLbH9w1jt3uA-a6BCqtc/edit#heading=h.2c5k7uahsdxe
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.
Ok thanks for the link. I think we should then follow up with similar update for other Policy features. @luacmartins
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.
Yea, I think we can clean this up later and create an utils file for each of them. Created issue here
src/libs/actions/TaxRate.ts
Outdated
taxRates: { | ||
taxes: { | ||
[taxRate.code]: { | ||
pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD, |
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.
+1 this has to be removed, user will remove the error using the red brick road and clicking X
@kosmydel Updated suggestion: #37967 (comment) |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-03-18.at.21.22.55.movAndroid: mWeb ChromeScreen.Recording.2024-03-18.at.20.58.04.moviOS: NativeScreen.Recording.2024-03-18.at.21.23.27.moviOS: mWeb SafariScreen.Recording.2024-03-18.at.20.48.57.movMacOS: Chrome / SafariScreen.Recording.2024-03-18.at.20.46.46.movMacOS: DesktopScreen.Recording.2024-03-18.at.20.58.45.mov |
return covertTaxNameToID(`${name}_${nextID}`); | ||
} | ||
|
||
function createPolicyTax(policyID: string, taxRate: TaxRate) { |
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.
Yea, I think we can clean this up later and create an utils file for each of them. Created issue here
@luacmartins looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
✋ 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/luacmartins in version: 1.4.54-0 🚀
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 1.4.54-4 🚀
|
maxLength={CONST.TAX_RATES.NAME_MAX_LENGTH} | ||
multiline={false} | ||
role={CONST.ROLE.PRESENTATION} | ||
autoFocus |
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.
Details
This PR introduces the ability to create a new tax rate on the Taxes page:
WorkspaceNewTaxPage
,TextPicker
component,AmountPicker
component.Fixed Issues
$ #37793
PROPOSAL: N/A
Tests
Taxes
feature in theMore features
tab.Add rate
button in the top right corner.Add rate
modal.Offline tests
Offline mode scenario:
Failure scenario:
Simulate failing network requests
in the Troubleshoot menu.brickRoadIndicator
is displayed in the LHN list (near theTaxes
item).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 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 & iOS: Native
native.mov
Android & iOS: mWeb
mweb.mov
MacOS: Chrome / Safari
Uploading web.mov…
MacOS: Desktop
desktop.mov