Skip to content

Commit

Permalink
enhancement(TaxForms): allow country editing for W9 (#10524)
Browse files Browse the repository at this point in the history
  • Loading branch information
Betree committed Jul 5, 2024
1 parent d263bb2 commit fcaab20
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
3 changes: 0 additions & 3 deletions components/StyledInputLocation.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ const StyledInputLocation = ({
errors,
prefix,
required,
disableCountryChange,
onLoadSuccess,
useStructuredForFallback,
}) => {
Expand All @@ -55,7 +54,6 @@ const StyledInputLocation = ({
<InputTypeCountry
{...inputProps}
inputId={id}
disabled={disableCountryChange}
value={location?.country}
autoDetect={autoDetectCountry}
onChange={country => {
Expand Down Expand Up @@ -133,7 +131,6 @@ StyledInputLocation.propTypes = {
onChange: PropTypes.func,
onLoadSuccess: PropTypes.func,
autoDetectCountry: PropTypes.bool,
disableCountryChange: PropTypes.bool,
required: PropTypes.bool,
labelFontWeight: PropTypes.any,
labelFontSize: PropTypes.any,
Expand Down
4 changes: 1 addition & 3 deletions components/dashboard/sections/tax-information/W9Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ export const getInitialValuesForW9 = (
return merge(generateInitialValuesFromSchema(schema), {
signer,
accountNumbers: `@${account.slug} (#${account.id})`,
location:
account.location?.country === 'US' ? pick(account.location, ['country', 'structured']) : { country: 'US' },
location: { country: 'US', ...pick(account.location, ['country', 'structured']) },
...(baseValues.submitterType === SubmitterType.Individual
? { federalTaxClassification: FederalTaxClassification.Individual }
: { federalTaxClassification: null }),
Expand Down Expand Up @@ -97,7 +96,6 @@ export const W9TaxFormFields = ({ formik }: { formik: FormikProps<W9TaxFormValue
onChange={value => setFieldValue(field.name, value)}
labelFontWeight="normal"
autoDetectCountry={false}
disableCountryChange
errors={field.error}
useStructuredForFallback={true}
required={field.required}
Expand Down
2 changes: 1 addition & 1 deletion components/dashboard/sections/tax-information/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const PendingTaxFormView = ({
<FormattedMessage defaultMessage="You will receive an email with a link to fill out a form." id="V2vf/v" />
</p>
) : (
<Button size="lg" onClick={() => setHasTaxInformationForm(true)}>
<Button onClick={() => setHasTaxInformationForm(true)}>
<FilePenLine className="mr-1" size={16} />
<FormattedMessage defaultMessage="Fill Tax Information" id="TxJpk1" />
</Button>
Expand Down

0 comments on commit fcaab20

Please sign in to comment.