Skip to content

Commit 8dad809

Browse files
authored
feat(onboarding-ui): remove type field in company data section (#1002)
1 parent bad19d5 commit 8dad809

File tree

7 files changed

+15
-72
lines changed

7 files changed

+15
-72
lines changed

packages/onboarding-ui/src/flows/SelfHostedRegistration/mocks.ts

+5-15
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,6 @@ export const validatePassword: Validate<string> = (password: string) => {
4848
return true;
4949
};
5050

51-
export const organizationTypes: [string, string][] = [
52-
['community', 'Community'],
53-
['enterprise', 'Enterprise'],
54-
['government', 'Government'],
55-
['nonprofit', 'Nonprofit'],
56-
];
57-
5851
export const organizationIndustryOptions: [string, string][] = [
5952
['aerospaceDefense', 'Aerospace and Defense'],
6053
['blockchain', 'Blockchain'],
@@ -85,14 +78,11 @@ export const organizationIndustryOptions: [string, string][] = [
8578
];
8679

8780
export const organizationSizeOptions: [string, string][] = [
88-
['0', '1-10 people'],
89-
['1', '11-50 people'],
90-
['2', '51-100 people'],
91-
['3', '101-250 people'],
92-
['4', '251-500 people'],
93-
['5', '501-1000 people'],
94-
['6', '1001-4000 people'],
95-
['7', '4000 or more people'],
81+
['0', '1-250 people'],
82+
['1', '251-500 people'],
83+
['2', '501-1000 people'],
84+
['3', '1001-4000 people'],
85+
['4', '4001 or more people'],
9686
];
9787

9888
export const countryOptions: [string, string][] = [

packages/onboarding-ui/src/flows/SelfHostedRegistration/stories.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import {
1717
logSubmit,
1818
organizationIndustryOptions,
1919
organizationSizeOptions,
20-
organizationTypes,
2120
validateEmail,
2221
validatePassword,
2322
validateUsername,
@@ -103,7 +102,6 @@ export const SelfHostedRegistration: Story = ({ offline }) => {
103102
<OrganizationInfoPage
104103
currentStep={2}
105104
stepCount={4}
106-
organizationTypeOptions={organizationTypes}
107105
organizationIndustryOptions={organizationIndustryOptions}
108106
organizationSizeOptions={organizationSizeOptions}
109107
countryOptions={countryOptions}

packages/onboarding-ui/src/forms/OrganizationInfoForm/OrganizationInfoForm.spec.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ it('renders without crashing', () => {
88
<OrganizationInfoForm
99
currentStep={1}
1010
stepCount={1}
11-
organizationTypeOptions={[]}
1211
organizationIndustryOptions={[]}
1312
organizationSizeOptions={[]}
1413
countryOptions={[]}

packages/onboarding-ui/src/forms/OrganizationInfoForm/OrganizationInfoForm.stories.tsx

+5-14
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@ export default {
1616
args: {
1717
currentStep: 1,
1818
stepCount: 1,
19-
organizationTypeOptions: [
20-
['community', 'Community'],
21-
['enterprise', 'Enterprise'],
22-
['government', 'Government'],
23-
['nonprofit', 'Nonprofit'],
24-
],
2519
organizationIndustryOptions: [
2620
['aerospaceDefense', 'Aerospace and Defense'],
2721
['blockchain', 'Blockchain'],
@@ -51,14 +45,11 @@ export default {
5145
['other', 'Other'],
5246
],
5347
organizationSizeOptions: [
54-
['0', '1-10 people'],
55-
['1', '11-50 people'],
56-
['2', '51-100 people'],
57-
['3', '101-250 people'],
58-
['4', '251-500 people'],
59-
['5', '501-1000 people'],
60-
['6', '1001-4000 people'],
61-
['7', '4000 or more people'],
48+
['0', '1-250 people'],
49+
['1', '251-500 people'],
50+
['2', '501-1000 people'],
51+
['3', '1001-4000 people'],
52+
['4', '4001 or more people'],
6253
],
6354
countryOptions: [
6455
...Object.entries(countries).map(

packages/onboarding-ui/src/forms/OrganizationInfoForm/OrganizationInfoForm.tsx

-25
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import { useTranslation } from 'react-i18next';
1919

2020
export type OrganizationInfoPayload = {
2121
organizationName: string;
22-
organizationType: string;
2322
organizationIndustry: string;
2423
organizationSize: string;
2524
country: string;
@@ -28,7 +27,6 @@ export type OrganizationInfoPayload = {
2827
type OrganizationInfoFormProps = {
2928
currentStep: number;
3029
stepCount: number;
31-
organizationTypeOptions: SelectOption[];
3230
organizationIndustryOptions: SelectOption[];
3331
organizationSizeOptions: SelectOption[];
3432
countryOptions: SelectOption[];
@@ -42,7 +40,6 @@ type OrganizationInfoFormProps = {
4240
const OrganizationInfoForm = ({
4341
currentStep,
4442
stepCount,
45-
organizationTypeOptions,
4643
organizationIndustryOptions,
4744
organizationSizeOptions,
4845
countryOptions,
@@ -57,7 +54,6 @@ const OrganizationInfoForm = ({
5754
const isMobile = !breakpoints.includes('md');
5855

5956
const organizationNameField = useUniqueId();
60-
const organizationTypeField = useUniqueId();
6157
const organizationIndustryField = useUniqueId();
6258
const organizationSizeField = useUniqueId();
6359
const countryField = useUniqueId();
@@ -102,27 +98,6 @@ const OrganizationInfoForm = ({
10298
<Field.Error>{t('component.form.requiredField')}</Field.Error>
10399
)}
104100
</Field>
105-
<Field>
106-
<Field.Label htmlFor={organizationTypeField}>
107-
{t('form.organizationInfoForm.fields.organizationType.label')}
108-
</Field.Label>
109-
<Field.Row>
110-
<Controller
111-
name='organizationType'
112-
control={control}
113-
render={({ field }) => (
114-
<Select
115-
{...field}
116-
options={organizationTypeOptions}
117-
placeholder={t(
118-
'form.organizationInfoForm.fields.organizationType.placeholder'
119-
)}
120-
id={organizationTypeField}
121-
/>
122-
)}
123-
/>
124-
</Field.Row>
125-
</Field>
126101
<Field>
127102
<Field.Label htmlFor={organizationIndustryField}>
128103
{t('form.organizationInfoForm.fields.organizationIndustry.label')}

packages/onboarding-ui/src/pages/OrganizationInfoPage/OrganizationInfoPage.stories.tsx

+5-14
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,6 @@ export default {
1717
args: {
1818
currentStep: 1,
1919
stepCount: 1,
20-
organizationTypeOptions: [
21-
['community', 'Community'],
22-
['enterprise', 'Enterprise'],
23-
['government', 'Government'],
24-
['nonprofit', 'Nonprofit'],
25-
],
2620
organizationIndustryOptions: [
2721
['aerospaceDefense', 'Aerospace and Defense'],
2822
['blockchain', 'Blockchain'],
@@ -52,14 +46,11 @@ export default {
5246
['other', 'Other'],
5347
],
5448
organizationSizeOptions: [
55-
['0', '1-10 people'],
56-
['1', '11-50 people'],
57-
['2', '51-100 people'],
58-
['3', '101-250 people'],
59-
['4', '251-500 people'],
60-
['5', '501-1000 people'],
61-
['6', '1001-4000 people'],
62-
['7', '4000 or more people'],
49+
['0', '1-250 people'],
50+
['1', '251-500 people'],
51+
['2', '501-1000 people'],
52+
['3', '1001-4000 people'],
53+
['4', '4001 or more people'],
6354
],
6455
countryOptions: [
6556
...Object.entries(countries).map(

packages/onboarding-ui/src/pages/OrganizationInfoPage/OrganizationInfoPage.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ type OrganizationInfoPageProps = {
1515
description?: ReactNode;
1616
currentStep: number;
1717
stepCount: number;
18-
organizationTypeOptions: SelectOption[];
1918
organizationIndustryOptions: SelectOption[];
2019
organizationSizeOptions: SelectOption[];
2120
countryOptions: SelectOption[];

0 commit comments

Comments
 (0)