Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Eclipse Foundation
IT
Websites
membership.eclipse.org
Commits
26304dca
Commit
26304dca
authored
Aug 10, 2021
by
Zhou Fang
Committed by
Martin Lowe
Aug 18, 2021
Browse files
Added employee count
parent
5ae9742d
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/main/www/src/Utils/formFunctionHelpers.js
View file @
26304dca
...
...
@@ -220,14 +220,16 @@ export function matchCompanyFieldsToBackend(organizationData, formId) {
address
:
{
city
:
organizationData
.
address
.
city
,
country
:
organizationData
.
address
.
country
,
postal_code
:
organizationData
.
address
.
postalCode
,
province_state
:
organizationData
.
address
.
provinceOrState
,
postal_code
:
organizationData
.
address
.
postalCode
||
''
,
province_state
:
organizationData
.
address
.
provinceOrState
||
''
,
street
:
organizationData
.
address
.
street
,
},
form_id
:
formId
,
id
:
organizationData
.
id
,
legal_name
:
organizationData
.
legalName
,
twitter
:
organizationData
.
twitterHandle
||
''
,
aggregate_revenue
:
`
${
organizationData
.
revenue
}
${
organizationData
.
currency
}
`
,
employee_count
:
organizationData
.
employeeCount
,
};
if
(
organizationData
.
address
.
id
)
{
...
...
src/main/www/src/components/Application/CompanyInformation/CompanyInformationCompany.js
View file @
26304dca
...
...
@@ -23,13 +23,10 @@ const CompanyInformationCompany = ({ formik, useStyles }) => {
.
getNames
()
.
map
((
item
)
=>
({
label
:
item
,
value
:
item
}));
const
handle
Revenue
Change
=
(
value
)
=>
{
formik
.
setFieldValue
(
'
organization.revenue
'
,
value
);
const
handle
Field
Change
=
(
value
,
fieldName
)
=>
{
formik
.
setFieldValue
(
fieldName
,
value
);
};
const
handleCurrencyChange
=
(
value
)
=>
{
formik
.
setFieldValue
(
'
organization.currency
'
,
value
);
};
return
(
<>
<
h2
className
=
"
fw-600 h4
"
id
=
{
organizationName
.
name
}
>
...
...
@@ -61,9 +58,9 @@ const CompanyInformationCompany = ({ formik, useStyles }) => {
/
>
<
/div
>
<
/div
>
<
p
>
Let
us
know
your
corporate
revenue
from
all
the
A
ffiliates
.
<
/p
>
<
p
>
Let
us
know
your
corporate
revenue
from
all
the
a
ffiliates
.
<
/p
>
<
div
className
=
"
row
"
>
<
div
className
=
"
col-md-
8
"
>
<
div
className
=
"
col-md-
10
"
>
<
Input
name
=
{
organizationRevenue
.
revenue
.
name
}
labelName
=
{
organizationRevenue
.
revenue
.
label
}
...
...
@@ -71,17 +68,29 @@ const CompanyInformationCompany = ({ formik, useStyles }) => {
requiredMark
=
{
true
}
type
=
{
'
number
'
}
value
=
{
formik
.
values
.
organization
.
revenue
}
onChange
=
{(
ev
)
=>
handle
Revenue
Change
(
ev
.
target
.
value
)}
onChange
=
{(
ev
)
=>
handle
Field
Change
(
ev
.
target
.
value
,
'
organization.revenue
'
)}
ariaLabel
=
{
`
${
organizationRevenue
.
revenue
.
name
}
`
}
/
>
<
/div
>
<
div
className
=
"
col-md-
4
"
>
<
div
className
=
"
col-md-
6
"
>
<
DropdownMenu
inputLabel
=
{
organizationRevenue
.
currency
.
label
}
inputName
=
{
organizationRevenue
.
currency
.
name
}
inputValue
=
{
formik
.
values
.
organization
.
currency
}
optionsArray
=
{
OPTIONS_FOR_REVENUE_CURRENCY
}
handleChange
=
{(
ev
)
=>
handleCurrencyChange
(
ev
.
target
.
value
)}
handleChange
=
{(
ev
)
=>
handleFieldChange
(
ev
.
target
.
value
,
'
organization.currency
'
)}
/
>
<
/div
>
<
div
className
=
"
col-md-8
"
>
<
Input
name
=
{
organizationRevenue
.
employeeCount
.
name
}
labelName
=
{
organizationRevenue
.
employeeCount
.
label
}
placeholder
=
{
organizationRevenue
.
employeeCount
.
placeholder
}
requiredMark
=
{
true
}
type
=
{
'
number
'
}
value
=
{
formik
.
values
.
organization
.
employeeCount
}
onChange
=
{(
ev
)
=>
handleFieldChange
(
ev
.
target
.
value
,
'
organization.employeeCount
'
)}
ariaLabel
=
{
`
${
organizationRevenue
.
employeeCount
.
name
}
`
}
/
>
<
/div
>
<
/div
>
...
...
src/main/www/src/components/UIComponents/FormComponents/formFieldModel.js
View file @
26304dca
...
...
@@ -16,6 +16,7 @@ const vatNumber = 'VAT Number';
const
countryOfRegistration
=
'
Country of Registration
'
;
const
REVENUE
=
'
Revenue
'
;
const
CURRENCY
=
'
Currency
'
;
const
EMPLOYEE_COUNT
=
'
Employee Count
'
;
export
const
requiredErrorMsg
=
'
is required
'
;
...
...
@@ -28,6 +29,7 @@ export const initialValues = {
legalName
:
''
,
revenue
:
''
,
currency
:
''
,
employeeCount
:
''
,
address
:
{
id
:
''
,
street
:
''
,
...
...
@@ -143,6 +145,11 @@ export const formField = {
label
:
CURRENCY
,
placeholder
:
CURRENCY
,
},
employeeCount
:
{
name
:
'
employeeCount
'
,
label
:
EMPLOYEE_COUNT
,
placeholder
:
EMPLOYEE_COUNT
,
},
},
organizationAddress
:
{
address
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment