[offers][fix] fix profile location display (#497)

pull/499/head
Zhang Ziqing 2 years ago committed by GitHub
parent f7d1c8d2c4
commit 7e06e07df4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -246,7 +246,7 @@ export default function ProfileHeader({
{(experiences[0]?.companyName || {(experiences[0]?.companyName ||
experiences[0]?.jobLevel || experiences[0]?.jobLevel ||
experiences[0]?.jobTitle) && ( experiences[0]?.jobTitle) && (
<div className="flex flex-row"> <div className="flex flex-row text-slate-600">
<span> <span>
<BuildingOffice2Icon className="mr-2.5 h-5 w-5" /> <BuildingOffice2Icon className="mr-2.5 h-5 w-5" />
</span> </span>
@ -262,7 +262,7 @@ export default function ProfileHeader({
</p> </p>
</div> </div>
)} )}
<div className="flex flex-row"> <div className="flex flex-row text-slate-600">
<CalendarDaysIcon className="mr-2.5 h-5" /> <CalendarDaysIcon className="mr-2.5 h-5" />
<p> <p>
<span className="mr-2 font-bold">YOE:</span> <span className="mr-2 font-bold">YOE:</span>

@ -42,9 +42,9 @@ export default function OfferTableRow({
<td className="py-4 px-4">{convertMoneyToString(income)}</td> <td className="py-4 px-4">{convertMoneyToString(income)}</td>
{jobType === JobType.FULLTIME && ( {jobType === JobType.FULLTIME && (
<td className="py-4 px-4"> <td className="py-4 px-4">
{`${baseSalary && convertMoneyToString(baseSalary)} / ${ {`${convertMoneyToString(baseSalary)} / ${convertMoneyToString(
bonus && convertMoneyToString(bonus) bonus,
} / ${stocks && convertMoneyToString(stocks)}`} )} / ${convertMoneyToString(stocks)}`}
</td> </td>
)} )}
<td className="py-4 px-4">{formatDate(monthYearReceived)}</td> <td className="py-4 px-4">{formatDate(monthYearReceived)}</td>

@ -132,6 +132,7 @@ export default function OfferProfile() {
? getLabelForJobTitleType(experience.title as JobTitleType) ? getLabelForJobTitleType(experience.title as JobTitleType)
: null, : null,
jobType: experience.jobType || undefined, jobType: experience.jobType || undefined,
location: experience.location,
monthlySalary: experience.monthlySalary monthlySalary: experience.monthlySalary
? convertMoneyToString(experience.monthlySalary) ? convertMoneyToString(experience.monthlySalary)
: null, : null,

@ -4,7 +4,11 @@ import { Currency } from './CurrencyEnum';
export const baseCurrencyString = Currency.USD.toString(); export const baseCurrencyString = Currency.USD.toString();
export function convertMoneyToString({ currency, value }: Money) { export function convertMoneyToString(money: Money | undefined) {
if (!money) {
return '-';
}
const { currency, value } = money;
if (!value) { if (!value) {
return '-'; return '-';
} }

Loading…
Cancel
Save