Skip to content

Commit

Permalink
feat/experience: UI bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Thangaraj-Ideas2it committed Nov 3, 2023
1 parent 209e2dc commit 8c6717d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions apps/web-api/src/members/members.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export class MembersService {
},
},
},
experience: true
experience: {include: {companyLogo : true}}
},
});
}
Expand Down Expand Up @@ -446,8 +446,8 @@ export class MembersService {
{
where: { uid: uid },
select: {
email: true,
githubHandler: true,
email: true,
githubHandler: true,
telegramHandler:true,
discordHandler: true,
linkedinHandler: true,
Expand All @@ -458,9 +458,9 @@ export class MembersService {
);
const preferences = {...resp.preferences};
if (!resp.preferences) {
preferences.isnull = true;
preferences.isnull = true;
} else{
preferences.isnull = false;
preferences.isnull = false;
}
preferences.email = resp?.email ? true: false;
preferences.github = resp?.githubHandler ? true: false;
Expand All @@ -475,7 +475,7 @@ export class MembersService {
const user = await this.memberToUserInfo(member);
if (user.leadingTeams.includes(teamUid)) {
return true;
}
}
return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ function AddMemberExperienceForm(props) {
},
};

console.log("calling api")
const imageResponse = await api.post(`/v1/images`, formData, config);
const result = imageResponse.data.image;
onItemChange(expIndex, 'logoUid', result.uid);
Expand Down Expand Up @@ -146,7 +145,7 @@ function AddMemberExperienceForm(props) {
</div>}
<div className="flex-1">
<label className="text-[14px] font-[600]">Company Name*</label>
<input placeholder="Ex: Microsoft" className="text-[14px] mt-[12px] border-solid border-[1px] border-[#CBD5E1] px-[12px] py-[8px] rounded-[8px] w-full" type="text" value={exp.companyName} onChange={(e) => onItemChange(expIndex, 'companyName', e.target.value)} />
<input maxLength={100} placeholder="Ex: Microsoft" className="text-[14px] mt-[12px] border-solid border-[1px] border-[#CBD5E1] px-[12px] py-[8px] rounded-[8px] w-full" type="text" value={exp.companyName} onChange={(e) => onItemChange(expIndex, 'companyName', e.target.value)} />
</div>
</div>
<div className="mt-8px flex gap-[8px]">
Expand All @@ -158,7 +157,7 @@ function AddMemberExperienceForm(props) {
{/******************************** TITLE ***********************************/}
<div className="my-[20px]">
<label className="text-[14px] font-[600]">Title*</label>
<input placeholder="Ex: Senior Architect" className="text-[14px] mt-[12px] border-solid border-[1px] border-[#CBD5E1] px-[12px] py-[8px] rounded-[8px] w-full" type="text" value={exp.title} onChange={(e) => onItemChange(expIndex, 'title', e.target.value)} />
<input maxLength={100} placeholder="Ex: Senior Architect" className="text-[14px] mt-[12px] border-solid border-[1px] border-[#CBD5E1] px-[12px] py-[8px] rounded-[8px] w-full" type="text" value={exp.title} onChange={(e) => onItemChange(expIndex, 'title', e.target.value)} />
</div>


Expand Down Expand Up @@ -191,7 +190,7 @@ function AddMemberExperienceForm(props) {
{/******************************** DESCRIPTION ***********************************/}
<div className="mt-[20px]">
<label className="text-[14px] font-[600]">Description</label>
<textarea rows={5} ref={descriptionRef} placeholder="" className="text-[14px] mt-[12px] border-solid border-[1px] border-[#CBD5E1] px-[12px] py-[8px] rounded-[8px] w-full" value={exp.description} onChange={(e) => onItemChange(expIndex, 'description', e.target.value)} />
<textarea rows={5} maxLength={2000} ref={descriptionRef} placeholder="" className="text-[14px] mt-[12px] border-solid border-[1px] border-[#CBD5E1] px-[12px] py-[8px] rounded-[8px] w-full" value={exp.description} onChange={(e) => onItemChange(expIndex, 'description', e.target.value)} />
{descriptionRef.current && <p className="text-[#475569] font-[500] text-[12px]">{`${descriptionRef?.current?.value?.length} of 2000 characters used`}</p>}
</div>
</div>}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,8 @@ export function EditMemberModal({
}),
experience: member?.experience.map(exp => {
exp.startDate = new Date(exp.startDate);
exp.endDate = new Date(exp.endDate);
exp.endDate = exp.endDate ? new Date(exp.endDate) : null;

return exp;
}),
preferences: member?.preferences ?? JSON.parse(JSON.stringify(PRIVACY_CONSTANTS.DEFAULT_SETTINGS))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function MemberExperience(props) {
{experiences.map((exp, expIndex) => <div key={`exp-${expIndex}`} className="border-[1px] border-solid border-[#E2E8F0] border-t-0 border-l-0 border-r-0 p-[16px]">
<div className="flex gap-[16px]">
<div>
<img src={exp.companyLogo ? exp.companyLogo : '/assets/images/icons/company-logo-default.svg'} />
<img className="w-[40px] h-[40px] object-contain" src={exp?.companyLogo?.url ? exp.companyLogo.url : '/assets/images/icons/company-logo-default.svg'} />
</div>
<div>
<p className="text-[14px] text-[#0F172A] font-[600]">{exp.title}</p>
Expand Down

0 comments on commit 8c6717d

Please sign in to comment.