Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/src/features/idir/company/IDIRCreateCompany.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export const IDIRCreateCompany = React.memo(() => {
>
<div className="create-profile-steps__create-profile">
<FormProvider {...companyAndUserFormMethods}>
<CompanyInformationWizardForm showCompanyName />
<CompanyInformationWizardForm />
<div className="create-profile-section create-profile-section--nav">
<Stack direction="row" spacing={3}>
<Button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export const CompanyAndUserInfoSteps = ({
/>
</>
)}
<CompanyInformationWizardForm showCompanyName={!isBusinessBCeID} />
<CompanyInformationWizardForm />
</div>
<div className="create-profile-section create-profile-section--nav">
<Stack direction="row" spacing={3}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,71 +15,62 @@ import { CompanyPrimaryContactForm } from "../../manageProfile/components/forms/
* The Company Wizard Form contains multiple subs forms including
* Company Info, Company Contact, and Primary Contact forms.
*/
export const CompanyInformationWizardForm = memo(
({ showCompanyName = false }: { showCompanyName?: boolean }) => {
const FEATURE = ORBC_FORM_FEATURES.COMPANY_INFORMATION_WIZARD;
export const CompanyInformationWizardForm = memo(() => {
const FEATURE = ORBC_FORM_FEATURES.COMPANY_INFORMATION_WIZARD;

return (
<div className="company-info-wizard-form">
{showCompanyName && (
<>
<Typography
variant="h2"
className="company-info-wizard-form__heading"
>
Client Name
</Typography>
<WarningBcGovBanner
className="company-info-wizard-form__banner"
msg={BANNER_MESSAGES.CLIENT_NAME_MUST_BE_REGISTERED_OWNER}
/>
<CustomFormComponent
type="input"
feature={FEATURE}
options={{
name: "legalName",
rules: {
required: true,
validate: {
validateLegalName: (legalName: string) =>
isValidOptionalString(legalName, {
maxLength: 150,
}) || invalidDBALength(1, 150),
},
},
label: "Client Name",
}}
/>
</>
)}
<Typography variant="h2" className="company-info-wizard-form__heading">
Doing Business As (DBA)
</Typography>
<CustomFormComponent
type="input"
feature={FEATURE}
options={{
name: "alternateName",
rules: {
required: false,
validate: {
validateAlternateName: (alternateName: string) =>
isValidOptionalString(alternateName, { maxLength: 150 }) ||
invalidDBALength(1, 150),
},
return (
<div className="company-info-wizard-form">
<Typography variant="h2" className="company-info-wizard-form__heading">
Client Name
</Typography>
<WarningBcGovBanner
className="company-info-wizard-form__banner"
msg={BANNER_MESSAGES.CLIENT_NAME_MUST_BE_REGISTERED_OWNER}
/>
<CustomFormComponent
type="input"
feature={FEATURE}
options={{
name: "legalName",
rules: {
required: true,
validate: {
validateLegalName: (legalName: string) =>
isValidOptionalString(legalName, {
maxLength: 150,
}) || invalidDBALength(1, 150),
},
label: "DBA",
}}
/>
},
label: "Client Name",
}}
/>
<Typography variant="h2" className="company-info-wizard-form__heading">
Doing Business As (DBA)
</Typography>
<CustomFormComponent
type="input"
feature={FEATURE}
options={{
name: "alternateName",
rules: {
required: false,
validate: {
validateAlternateName: (alternateName: string) =>
isValidOptionalString(alternateName, { maxLength: 150 }) ||
invalidDBALength(1, 150),
},
},
label: "DBA",
}}
/>

<Typography variant="h2" className="company-info-wizard-form__heading">
Contact Details
</Typography>
<CompanyPrimaryContactForm feature={FEATURE} />
<CompanyInfoGeneralForm feature={FEATURE} />
</div>
);
},
);
<Typography variant="h2" className="company-info-wizard-form__heading">
Contact Details
</Typography>
<CompanyPrimaryContactForm feature={FEATURE} />
<CompanyInfoGeneralForm feature={FEATURE} />
</div>
);
});

CompanyInformationWizardForm.displayName = "CompanyInformationWizardForm";
Loading