Skip to content

Commit

Permalink
Fix Menu Component. Change OR-40 Amount Fields to use Currency Pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
AnthonyTrinh8 committed May 28, 2022
1 parent 51508f6 commit 403ce6a
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 28 deletions.
8 changes: 1 addition & 7 deletions src/components/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ import UserSettings from './UserSettings'
import Urls from 'ustaxes/data/urls'
import StateQuestions from './StateQuestions'

import ORWFHDCInput from './stateForms/OR/ORWFHDC'

import { isMobileOnly as isMobile } from 'react-device-detect'
import HealthSavingsAccounts from './savingsAccounts/healthSavingsAccounts'
import IRA from './savingsAccounts/IRA'
Expand Down Expand Up @@ -177,10 +175,6 @@ export const drawerSections: Section[] = [
title: 'State Questions',
items: [item('State Questions', Urls.stateQuestions, <StateQuestions />)]
},
{
title: 'OR Forms',
items: [item('OR-WFHDC', Urls.orforms.orwfhdc, <ORWFHDCInput />)]
},
{
title: 'Results',
items: [
Expand All @@ -207,7 +201,7 @@ const yearSpecificPages: Partial<{ [k in TaxYear]: Section[] }> = {
}

export const drawerSectionsForYear = (year: TaxYear): Section[] => [
...drawerSections.slice(0, -2),
...drawerSections.slice(0, -1),
...(yearSpecificPages[year] || []),
drawerSections[drawerSections.length - 1]
]
Expand Down
16 changes: 14 additions & 2 deletions src/components/StateQuestions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@ import { Helmet } from 'react-helmet'
import { Grid, List, ListItem, Link } from '@material-ui/core'
import { useDispatch, useSelector, TaxesState } from 'ustaxes/redux'
import { StateQuestionTagName, StateResponses, State } from 'ustaxes/core/data'
import { Patterns } from 'ustaxes/components/Patterns'
import { getRequiredStateQuestions } from 'ustaxes/core/data/stateQuestions'
import { LabeledCheckbox, LabeledInput, GenericLabeledDropdown } from './input'
import {
LabeledCheckbox,
LabeledInput,
GenericLabeledDropdown,
boxLabel
} from './input'
import { answerStateQuestion } from 'ustaxes/redux/actions'
import { FormProvider, useForm } from 'react-hook-form'
import { usePager } from './pager'
Expand Down Expand Up @@ -210,7 +216,13 @@ const StateQuestions = (): ReactElement => {
/>
)
} else {
return <LabeledInput name={q.tag} label={q.text} />
return (
<LabeledInput
label={boxLabel(q.tag.slice(3, 5), q.text)}
patternConfig={Patterns.currency}
name={q.tag}
/>
)
}
})()}
</div>
Expand Down
32 changes: 16 additions & 16 deletions src/core/data/stateQuestions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const stateQuestions: StateQuestion[] = [
),
q(
'OR_21_INTEREST_ON_INSTALLMENT_SALES',
'Enter amount here',
'Interest on certain installment sales',
escapeHtmlTags(`<p><strong><u>21.</u> Interest on certain installment sales. </strong> Did you have installment sales that required you to pay
interest on the deferred tax liability for federal purposes? If so, you must also compute interest for Oregon
using the same method as for federal. The annual interest rate is 4 percent for 2021 and 2022.</p>`),
Expand All @@ -60,7 +60,7 @@ export const stateQuestions: StateQuestion[] = [
),
q(
'OR_24_POLITICAL_CONTRIBUTION_CREDIT',
'Enter amount here',
'Political Contribution Credit',
escapeHtmlTags(`<p><strong><u>24.</u> Political Contribution Credit. </strong> If your federal AGI isn’t more than $75,000 ($150,000 if you’re filing
a joint return), you may claim a standard credit of up to $50 ($100 if you’re filing a joint return) for cash contributions you made during 2021 to any
<ul>
Expand All @@ -73,7 +73,7 @@ export const stateQuestions: StateQuestion[] = [
),
q(
'OR_25_TOTAL_STANDARD_CREDITS_FROM_OR_ASC',
'Enter amount here',
'Total standard credits from Schedule OR-ASC, Section C',
escapeHtmlTags(
`<p><strong><u>25.</u> Total standard credits from Schedule OR-ASC, Section C. </strong> Enter your total standard credits from Schedule OR-ASC. <strong>Include Schedule OR-ASC with your return.</strong></p>`
),
Expand All @@ -82,7 +82,7 @@ export const stateQuestions: StateQuestion[] = [
),
q(
'OR_28_TOTAL_CARRYFORWARD_CREDITS_FROM_OR_ASC',
'Enter amount here',
'Total carryforward credits from Schedule OR-ASC, Section D',
escapeHtmlTags(
`<p><strong><u>28.</u> Total carryforward credits from Schedule OR-ASC, Section D. </strong> Enter your total carryforward credits from Schedule OR-ASC. Line 28 can’t be more than line 27. <strong>Include Schedule OR-ASC with your return.</strong></p>`
),
Expand All @@ -91,7 +91,7 @@ export const stateQuestions: StateQuestion[] = [
),
q(
'OR_30_TOTAL_CREDIT_RECAPTURES_FROM_OR_ASC',
'Enter amount here',
'Total credit recaptures from Schedule OR-ASC, Section E',
escapeHtmlTags(
'<p><strong><u>30.</u> Total credit recaptures from Schedule OR-ASC, Section E. </strong> Enter your total credit recaptures from Schedule OR-ASC. <strong>Include Schedule OR-ASC with your return.</strong></p>'
),
Expand All @@ -100,7 +100,7 @@ export const stateQuestions: StateQuestion[] = [
),
q(
'OR_32_OREGON_INCOME_TAX_WITHHELD',
'Enter amount here',
'Oregon income tax withheld',
escapeHtmlTags(
'<p><strong><u>32.</u> Oregon income tax withheld.</strong> Enter the total <strong>Oregon</strong> tax withheld from your wages and other income. State tax withheld from wages is shown in box 17 of Form W-2 and in the State area of various 1099 forms. <strong>Don’t</strong> include FICA (Social Security) tax withheld or tax withheld from your wages by other states. <strong>You must include a legible, unaltered copy</strong> of your Form W-2 from each job and any Form 1099 showing Oregon income tax withheld with your Oregon return.</p><p>If you don’t have a Form W-2 or 1099, you must provide other proof of Oregon tax withheld. Proof may include a copy of a final paycheck stub or a letter from your employer. If you file before February 1, 2022, we can only accept a Form W-2 or 1099 as proof.</p><p>If you have tax to pay, you may want to increase the amount your employer or other payer withholds from your wages. For withholding information, go to <a href="https://www.oregon.gov/dor/personal">www.oregon.gov/dor/personal.</a></p>'
),
Expand All @@ -109,7 +109,7 @@ export const stateQuestions: StateQuestion[] = [
),
q(
'OR_33_AMOUNT_APPLIED_FROM_PRIOR_YEAR_REFUND',
'Enter amount here',
'Amount applied from your prior year’s tax refund',
escapeHtmlTags(
'<p><strong><u>33.</u> Amount applied from your prior year’s tax refund.</strong> Enter the amount of any prior-year refund you applied as a payment of 2021 estimated tax. If we adjusted your applied refund, be sure to use the adjusted amount. If you need to verify your applied refund amount, log into or create your Revenue Online account at <a href="https://www.oregon.gov/dor">www.oregon.gov/dor</a> or contact us.</p>'
),
Expand All @@ -118,7 +118,7 @@ export const stateQuestions: StateQuestion[] = [
),
q(
'OR_34_ESTIMATED_TAX_PAYMENTS',
'Enter amount here',
'Estimated tax payments for 2021',
escapeHtmlTags(
'<p><strong><u>34.</u> Estimated tax payments for 2021.</strong> Enter the total estimated tax payments you made before filing your 2021 Oregon return. For calendar-year filers, these payments were due April 15, 2021; June 15, 2021; September 15, 2021; and January 18, 2022. <strong>Include all</strong> payments you made up to the date you filed your original or amended return. <strong>Don’t include</strong> the amount reported on line 33. If you need to verify your estimated payments, log into or create your Revenue Online account at <a href="https://www.oregon.gov/dor">www.oregon.gov/dor</a> or contact us.</p>'
),
Expand All @@ -127,7 +127,7 @@ export const stateQuestions: StateQuestion[] = [
),
q(
'OR_36_53_KICKER_OREGON_SURPLUS_CREDIT',
'Enter amount here',
'Kicker (Oregon surplus) credit',
escapeHtmlTags(
'<p><strong><u>36 / 53.</u> Kicker (Oregon surplus) credit.</strong> See instructions.</p>'
),
Expand All @@ -143,7 +143,7 @@ export const stateQuestions: StateQuestion[] = [
),
q(
'OR_37_TOTAL_REFUNDABLE_CREDITS_FROM_OR_ASC',
'Enter amount here',
'Total refundable credits from Schedule OR-ASC',
escapeHtmlTags(
'<p><strong><u>37.</u> Total refundable credits from Schedule OR-ASC.</strong> Enter your total refundable credits from Schedule OR-ASC, Section F. <strong>Include Schedule OR-ASC with your return.</strong></p>'
),
Expand All @@ -152,7 +152,7 @@ export const stateQuestions: StateQuestion[] = [
),
q(
'OR_41_PENALTY_FOR_FILING_LATE',
'Enter amount here',
'Penalty and interest for filing or paying late',
escapeHtmlTags(
'<p><strong><u>41.</u> Penalty and interest for filing or paying late.</strong> See instructions.</p>'
),
Expand All @@ -161,7 +161,7 @@ export const stateQuestions: StateQuestion[] = [
),
q(
'OR_42_INTEREST_ON_UNDERPAYMENT_OF_EST_TAX',
'Enter amount here',
'Interest on underpayment of estimated tax',
escapeHtmlTags(
'<p><strong><u>42.</u> Interest on underpayment of estimated tax.</strong> Underpayment interest is charged if:</p>'
),
Expand All @@ -184,7 +184,7 @@ export const stateQuestions: StateQuestion[] = [
),
q(
'OR_46_ESTIMATED_TAX',
'Enter amount here',
'Estimated Tax',
escapeHtmlTags(
'<p><strong><u>46.</u> Estimated Tax.</strong> Fill in the portion of line 45 you want applied to your open estimated tax account.</p>'
),
Expand All @@ -193,7 +193,7 @@ export const stateQuestions: StateQuestion[] = [
),
q(
'OR_47_CHARITABLE_CHECKOFF_DONATIONS',
'Enter amount here',
'Charitable checkoff',
escapeHtmlTags(
'<p><strong><u>47.</u> Charitable checkoff.</strong> Enter the amount from line 30 of Schedule OR-DONATE. For more information, see the schedule instructions. You can download Schedule OR-DONATE and instructions from our website or you can contact us to order it.</p><p><strong>Note:</strong> If your refund—after any application to an open estimated tax account—is less than your total donation amount, your donations will be prorated.</p>'
),
Expand All @@ -202,7 +202,7 @@ export const stateQuestions: StateQuestion[] = [
),
q(
'OR_48_POLITICAL_PARTY_3DOLLAR_CHECKOFF',
'Enter amount here',
'Political party checkoff',
escapeHtmlTags(
'<p><strong><u>48.</u> Political party checkoff.</strong> You may use your refund to contribute $3 to the Oregon political party of your choice. If you’re filing a joint return, you and your spouse may each contribute $3. <strong>Note:</strong> Your contribution will <strong>reduce</strong> your refund and <strong>does not</strong> qualify for the political contribution credit.</p><p>To make a contribution:</p><ol><li>Designate the political party of your choice using the party’s code from the alphabetized list below.<ul><li>If <strong>you</strong> contribute, enter <strong>one</strong> code in box 48a.</li><li>If <strong>your spouse</strong> contributes on a joint return, enter <strong>one</strong> code in box 48b.</li></ul></li></ol><p>Enter only one code per taxpayer. Spouses filing a joint return don’t have to enter the same code.</p><ol><li>Enter your total contribution amount.<ul><li>If you <strong>or</strong> your spouse contribute, enter $3.</li><li>If both you <strong>and</strong> your spouse contribute on a joint return, enter $6.</li></ul></li></ol><p><strong>Note:</strong> Your political party contribution <strong>won’t</strong> be made if:</p><ul><li>Your refund—after any application to an open estimated tax account or charitable checkoff donation— is less than your total contribution amount.</li><li>You enter an amount but don’t designate a party (or parties).</li><li>You designate a party (or parties) but don’t enter an amount.</li><li>You enter more than one party code per taxpayer.</li></ul><p><strong>Instructions for amended returns.</strong> Enter the amount, if any, from a refund on your original return that you applied as a political party contribution. If line 5 of the <strong>Amended worksheet</strong> shows a refund and you didn’t make the maximum political party contribution on your original return, you may use the refund to make a contribution on your amended return.</p>'
),
Expand All @@ -228,7 +228,7 @@ export const stateQuestions: StateQuestion[] = [
),
q(
'OR_49_529_COLLEGE_SAVINGS_PLAN_DEPOSITS',
'Enter amount here',
'Oregon college or MFS 529 savings plan',
escapeHtmlTags(
'<p><strong><u>49.</u> Oregon college or MFS 529 savings plan.</strong> Enter the total from Schedule OR-529. For minimum deposit amounts and other information, see the schedule instructions. You can download Schedule OR-529 from our website or you can contact us to order it.</p><p><strong>Note:</strong> If the amount of your refund—after any application to an open estimated tax account, charitable checkoff donation, or political party contribution—is less than the total amount you want to deposit, no deposit will be made.</p><p><strong>Instructions for amended returns.</strong> Enter the amount, if any, from a refund on your original return that you applied as an Oregon college or MFS 529 savings plan deposit. If line 5 of the <strong>Amended worksheet</strong> shows a refund, add the amount you want to apply as a deposit and include an amended Schedule OR-529 with your amended return. The refund will be applied for the year in which you’re filing the amended return.</p>'
),
Expand Down
3 changes: 0 additions & 3 deletions src/data/urls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ const Urls = {
createPdf: '/createpdf',
settings: '/settings',
stateQuestions: '/statequestions',
orforms: {
orwfhdc: '/state/oregon/orwfhdc'
},
help: '/help',
Y2021: {
credits: `/Y2021/credits`
Expand Down

0 comments on commit 403ce6a

Please sign in to comment.