Skip to content

Commit b6304f0

Browse files
Merge pull request #5235 from topcoder-platform/gig-apply-fixes
Gig apply fixes
2 parents e6a5319 + 5a9f647 commit b6304f0

File tree

3 files changed

+12
-16
lines changed

3 files changed

+12
-16
lines changed

.circleci/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ workflows:
237237
filters:
238238
branches:
239239
only:
240-
- free
240+
- gig-apply-fixes
241241
# This is alternate dev env for parallel testing
242242
- "build-qa":
243243
context : org-global

src/shared/components/GUIKit/DropdownTerms/index.jsx

+8-14
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,12 @@ function DropdownTerms({
3333
let inputField;
3434
useEffect(() => {
3535
const selectInput = containerRef.current.getElementsByClassName('Select-input');
36-
const selectMenuOuter = containerRef.current.getElementsByClassName('Select-menu-outer');
3736
if (selectInput && selectInput.length) {
38-
const selectControl = containerRef.current.getElementsByClassName(
39-
'Select-control',
40-
);
41-
const height1 = selectMenuOuter && selectMenuOuter.length
42-
? selectMenuOuter[0].offsetHeight
43-
: 0;
44-
const height2 = selectControl && selectControl.length
45-
? selectControl[0].offsetHeight
46-
: 0;
47-
selectInput[0].style.top = focused ? `${height1 + height2 - 1}px` : '0';
4837
inputField = selectInput[0].getElementsByTagName('input');
4938
inputField[0].placeholder = focused ? addNewOptionPlaceholder : '';
5039
inputField[0].style.border = 'none';
5140
inputField[0].style.boxShadow = 'none';
41+
selectInput[0].style.borderTop = 'none';
5242
}
5343
}, [focused, selectedOption]);
5444

@@ -145,9 +135,13 @@ function DropdownTerms({
145135
backspaceRemoves={false}
146136
multi
147137
promptTextCreator={() => null}
148-
filterOptions={() => _.filter(
149-
internalTerms, t => !_.find(selectedOption, { label: t.label }),
150-
).map(o => ({ value: o.label, label: o.label }))}
138+
filterOptions={(option, inputValue) => _.filter(
139+
internalTerms,
140+
t => (inputValue && inputValue.length >= 2
141+
? t.label.toLowerCase().includes(inputValue.toLowerCase())
142+
&& !_.find(selectedOption, { label: t.label })
143+
: !_.find(selectedOption, { label: t.label })),
144+
)}
151145
/>
152146
<img width="15" height="9" styleName="iconDropdown" src={iconDown} alt="dropdown-arrow-icon" />
153147
</div>

src/shared/containers/Gigs/RecruitCRMJobApply.jsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,9 @@ class RecruitCRMJobApplyContainer extends React.Component {
125125
}
126126
// require atleast 1 skill
127127
if (!prop || prop === 'skills') {
128-
if (!_.find(formData.skills, { selected: true })) formErrors.skills = 'Please, add technical skills';
128+
const skills = _.filter(formData.skills, ['selected', true]);
129+
if (!skills.length) formErrors.skills = 'Please, add technical skills';
130+
else if (skills.map(skill => skill.label).join(',').length >= 100) formErrors.skills = 'Sum of all skill characters may not be greater than 100';
129131
else delete formErrors.skills;
130132
}
131133
// have accepted terms

0 commit comments

Comments
 (0)