Skip to content

Commit 30a4b30

Browse files
authored
Merge pull request #770 from topcoder-platform/profiles-app
Profiles app -> dev
2 parents 9241562 + 0f11ee7 commit 30a4b30

File tree

10 files changed

+89
-23
lines changed

10 files changed

+89
-23
lines changed

src/apps/profiles/src/member-profile/page-layout/ProfilePageLayout.module.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
height: 100%;
88

99
.profileHeaderWrap {
10-
background: url('../../lib/assets/profile-header-bg.png') no-repeat right center / auto, linear-gradient(#0d83c5, #0e89d5);
10+
background: url('../../lib/assets/profile-header-bg.png') no-repeat right top / auto, linear-gradient(#0d83c5, #0e89d5);
1111

1212
.profileHeaderContent {
1313
padding: 0;
14-
max-height: 200px;
14+
max-height: 260px;
1515
overflow: visible;
1616

1717
@include ltelg {
@@ -57,7 +57,7 @@
5757
.profileInfoRight {
5858
display: flex;
5959
flex-direction: column;
60-
margin-top: -215px;
60+
margin-top: -275px;
6161

6262
@include ltelg {
6363
margin-top: 0;

src/apps/profiles/src/member-profile/page-layout/ProfilePageLayout.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,11 @@ const ProfilePageLayout: FC<ProfilePageLayoutProps> = (props: ProfilePageLayoutP
8080

8181
<div className={styles.sectionWrap}>
8282
<div className={styles.skillsWrap}>
83-
<MemberSkillsInfo profile={props.profile} authProfile={props.authProfile} />
83+
<MemberSkillsInfo
84+
profile={props.profile}
85+
authProfile={props.authProfile}
86+
refreshProfile={props.refreshProfile}
87+
/>
8488
</div>
8589
</div>
8690

src/apps/profiles/src/member-profile/profile-header/OpenForGigsModifyModal/OpenForGigsModifyModal.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,10 @@ const OpenForGigsModifyModal: FC<OpenForGigsModifyModalProps> = (props: OpenForG
9595
>
9696
<div className={styles.modalBody}>
9797
<p>
98-
Currently
99-
{openForWork ? ' ' : ' not '}
100-
available for work.
101-
Get found in search results when potential clients look for services
102-
and them reach out to you for free.
98+
{openForWork
99+
? 'Currently available for work.'
100+
: `Mark your availability to get found in search results when potential
101+
clients look for services and let them reach out to you for free.`}
103102
</p>
104103
<FormToggleSwitch
105104
name='openForWork'

src/apps/profiles/src/member-profile/profile-header/ProfileHeader.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
.photoWrap {
1111
position: relative;
12-
margin-right: $sp-13;
12+
margin-right: 60px;
1313

1414
.verifiedBadge {
1515
position: absolute;

src/apps/profiles/src/member-profile/skills/MemberSkillsInfo.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import styles from './MemberSkillsInfo.module.scss'
1414
interface MemberSkillsInfoProps {
1515
profile: UserProfile
1616
authProfile: UserProfile | undefined
17+
refreshProfile: (handle: string) => void
1718
}
1819

1920
const MemberSkillsInfo: FC<MemberSkillsInfoProps> = (props: MemberSkillsInfoProps) => {
@@ -47,6 +48,13 @@ const MemberSkillsInfo: FC<MemberSkillsInfoProps> = (props: MemberSkillsInfoProp
4748
setIsEditMode(false)
4849
}
4950

51+
function handleModyfSkillsSave(): void {
52+
setTimeout(() => {
53+
setIsEditMode(false)
54+
props.refreshProfile(props.profile.handle)
55+
}, 1500)
56+
}
57+
5058
return memberEMSISkills ? (
5159
<div className={styles.container}>
5260
<div className={styles.titleWrap}>
@@ -98,8 +106,8 @@ const MemberSkillsInfo: FC<MemberSkillsInfoProps> = (props: MemberSkillsInfoProp
98106
{
99107
isEditMode && (
100108
<ModifySkillsModal
101-
// profile={props.profile}
102109
onClose={handleModyfSkillsModalClose}
110+
onSave={handleModyfSkillsSave}
103111
/>
104112
)
105113
}

src/apps/profiles/src/member-profile/skills/ModifySkillsModal/ModifySkillsModal.module.scss

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,29 @@
33
.container {
44
display: flex;
55
flex-direction: column;
6+
7+
:global(.body-main-bold) {
8+
font-size: 20px;
9+
margin-bottom: $sp-2;
10+
}
11+
12+
.skillPicker {
13+
margin-top: $sp-4;
14+
}
615
}
716

817
.modalButtons {
918
display: flex;
1019
justify-content: space-between;
1120
width: 100%;
1221
}
22+
23+
.skillsModal {
24+
@include gtemd {
25+
overflow: visible !important;
26+
}
27+
}
28+
29+
.skillsModalBody {
30+
overflow: visible !important;
31+
}

src/apps/profiles/src/member-profile/skills/ModifySkillsModal/ModifySkillsModal.tsx

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,42 @@
11
import { Dispatch, FC, SetStateAction, useState } from 'react'
2+
import { toast } from 'react-toastify'
23

3-
// import { UserProfile } from '~/libs/core'
44
import { BaseModal, Button } from '~/libs/ui'
5+
import { MemberSkillEditor, useMemberSkillEditor } from '~/libs/shared'
56

67
import styles from './ModifySkillsModal.module.scss'
78

89
interface ModifySkillsModalProps {
9-
// profile: UserProfile
1010
onClose: () => void
11+
onSave: () => void
1112
}
1213

1314
const ModifySkillsModal: FC<ModifySkillsModalProps> = (props: ModifySkillsModalProps) => {
1415
const [isSaving, setIsSaving]: [boolean, Dispatch<SetStateAction<boolean>>]
1516
= useState<boolean>(false)
1617

18+
const { formInput: emsiFormInput, saveSkills: saveEmsiSkills }: MemberSkillEditor = useMemberSkillEditor()
19+
1720
function handleModifySkillsSave(): void {
1821
setIsSaving(true)
22+
23+
saveEmsiSkills()
24+
.then(() => {
25+
toast.success('Skills updated successfully.', { position: toast.POSITION.BOTTOM_RIGHT })
26+
props.onSave()
27+
})
28+
.catch(() => {
29+
toast.error('Failed to update your skills.', { position: toast.POSITION.BOTTOM_RIGHT })
30+
setIsSaving(false)
31+
})
1932
}
2033

2134
return (
2235
<BaseModal
36+
bodyClassName={styles.skillsModalBody}
37+
classNames={{
38+
modal: styles.skillsModal,
39+
}}
2340
onClose={props.onClose}
2441
open
2542
size='lg'
@@ -39,7 +56,17 @@ const ModifySkillsModal: FC<ModifySkillsModalProps> = (props: ModifySkillsModalP
3956
/>
4057
</div>
4158
)}
42-
/>
59+
>
60+
<div className={styles.container}>
61+
<p className='body-main-bold'>What are your skills?</p>
62+
<p>
63+
Understanding your skills will allow us to connect you to the right opportunities.
64+
</p>
65+
<div className={styles.skillPicker}>
66+
{emsiFormInput}
67+
</div>
68+
</div>
69+
</BaseModal>
4370
)
4471
}
4572

src/apps/profiles/src/member-profile/work-expirence/ModifyWorkExpirenceModal/ModifyWorkExpirenceModal.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ const ModifyWorkExpirenceModal: FC<ModifyWorkExpirenceModalProps> = (props: Modi
214214
onClose={props.onClose}
215215
open
216216
size='lg'
217-
title='Work Experience'
217+
title='Experience'
218218
buttons={(
219219
<div className={styles.modalButtons}>
220220
<Button
@@ -336,7 +336,7 @@ const ModifyWorkExpirenceModal: FC<ModifyWorkExpirenceModalProps> = (props: Modi
336336
</div>
337337
<InputText
338338
name='currentlyWorking'
339-
label='I am currently working in this role'
339+
label='I am currently in this role'
340340
error={formErrors.currentlyWorking}
341341
dirty
342342
tabIndex={-1}
@@ -348,7 +348,7 @@ const ModifyWorkExpirenceModal: FC<ModifyWorkExpirenceModalProps> = (props: Modi
348348
{editedItemIndex === undefined ? <IconOutline.PlusCircleIcon /> : undefined}
349349
<Button
350350
link
351-
label={`${editedItemIndex !== undefined ? 'Edit' : 'Add'} Job to your List`}
351+
label={`${editedItemIndex !== undefined ? 'Edit' : 'Add another'} experience to your List`}
352352
onClick={handleFormAction}
353353
/>
354354
{editedItemIndex !== undefined && (

src/libs/ui/lib/components/form/form-groups/form-input/input-date-picker/InputDatePicker.module.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
select {
4848
border: none;
4949
background-color: transparent;
50+
margin: auto;
5051

5152
option:hover {
5253
background-color: $turq-160;

src/libs/ui/lib/components/form/form-groups/form-input/input-date-picker/InputDatePicker.tsx

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,13 @@ const InputDatePicker: FC<InputDatePickerProps> = (props: InputDatePickerProps)
6060
}: any): JSX.Element {
6161
return (
6262
<div className={styles.headerWrap}>
63-
<button onClick={decreaseMonth} disabled={prevMonthButtonDisabled} type='button'>
64-
<IconOutline.ArrowCircleLeftIcon />
65-
</button>
63+
{
64+
props.showMonthPicker !== false && (
65+
<button onClick={decreaseMonth} disabled={prevMonthButtonDisabled} type='button'>
66+
<IconOutline.ArrowCircleLeftIcon />
67+
</button>
68+
)
69+
}
6670

6771
{
6872
props.showMonthPicker !== false && (
@@ -90,9 +94,13 @@ const InputDatePicker: FC<InputDatePickerProps> = (props: InputDatePickerProps)
9094
))}
9195
</select>
9296

93-
<button onClick={increaseMonth} disabled={nextMonthButtonDisabled} type='button'>
94-
<IconOutline.ArrowCircleRightIcon />
95-
</button>
97+
{
98+
props.showMonthPicker !== false && (
99+
<button onClick={increaseMonth} disabled={nextMonthButtonDisabled} type='button'>
100+
<IconOutline.ArrowCircleRightIcon />
101+
</button>
102+
)
103+
}
96104
</div>
97105
)
98106
}

0 commit comments

Comments
 (0)