|
|
@ -1,17 +1,13 @@
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
BuildingOffice2Icon,
|
|
|
|
ArrowTrendingUpIcon,
|
|
|
|
ChatBubbleBottomCenterTextIcon,
|
|
|
|
BuildingOfficeIcon,
|
|
|
|
CurrencyDollarIcon,
|
|
|
|
MapPinIcon,
|
|
|
|
ScaleIcon,
|
|
|
|
} from '@heroicons/react/20/solid';
|
|
|
|
} from '@heroicons/react/24/outline';
|
|
|
|
|
|
|
|
import { HorizontalDivider } from '@tih/ui';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import { JobTypeLabel } from '~/components/offers/constants';
|
|
|
|
import type { OfferDisplayData } from '~/components/offers/types';
|
|
|
|
import type { OfferDisplayData } from '~/components/offers/types';
|
|
|
|
|
|
|
|
|
|
|
|
import {
|
|
|
|
import { getLocationDisplayText } from '~/utils/offers/string';
|
|
|
|
getCompanyDisplayText,
|
|
|
|
|
|
|
|
getJobDisplayText,
|
|
|
|
|
|
|
|
} from '~/utils/offers/string';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
type Props = Readonly<{
|
|
|
|
type Props = Readonly<{
|
|
|
|
offer: OfferDisplayData;
|
|
|
|
offer: OfferDisplayData;
|
|
|
@ -37,32 +33,55 @@ export default function OfferCard({
|
|
|
|
}: Props) {
|
|
|
|
}: Props) {
|
|
|
|
function UpperSection() {
|
|
|
|
function UpperSection() {
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<div className="flex justify-between px-8">
|
|
|
|
<div className="px-4 py-5 sm:px-6">
|
|
|
|
<div className="flex flex-col">
|
|
|
|
<div className="flex justify-between">
|
|
|
|
{(companyName || location) && (
|
|
|
|
<div>
|
|
|
|
<div className="flex flex-row">
|
|
|
|
<h3 className="text-lg font-medium leading-6 text-slate-900">
|
|
|
|
<span>
|
|
|
|
{jobTitle} {jobType && <>({JobTypeLabel[jobType]})</>}
|
|
|
|
<BuildingOffice2Icon className="mr-3 h-5" />
|
|
|
|
</h3>
|
|
|
|
</span>
|
|
|
|
<div className="mt-1 flex flex-row flex-wrap space-x-4 sm:mt-0">
|
|
|
|
<span className="font-bold">
|
|
|
|
{companyName && (
|
|
|
|
{getCompanyDisplayText(companyName, location)}
|
|
|
|
<div className="mt-2 flex items-center text-sm text-slate-500">
|
|
|
|
</span>
|
|
|
|
<BuildingOfficeIcon
|
|
|
|
|
|
|
|
aria-hidden="true"
|
|
|
|
|
|
|
|
className="mr-1.5 h-5 w-5 flex-shrink-0 text-slate-400"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
{companyName}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
{location && (
|
|
|
|
|
|
|
|
<div className="mt-2 flex items-center text-sm text-slate-500">
|
|
|
|
|
|
|
|
<MapPinIcon
|
|
|
|
|
|
|
|
aria-hidden="true"
|
|
|
|
|
|
|
|
className="mr-1.5 h-5 w-5 flex-shrink-0 text-slate-400"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
{getLocationDisplayText(location)}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
{jobLevel && (
|
|
|
|
|
|
|
|
<div className="mt-2 flex items-center text-sm text-slate-500">
|
|
|
|
|
|
|
|
<ArrowTrendingUpIcon
|
|
|
|
|
|
|
|
aria-hidden="true"
|
|
|
|
|
|
|
|
className="mr-1.5 h-5 w-5 flex-shrink-0 text-slate-400"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
{jobLevel}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
)}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
)}
|
|
|
|
|
|
|
|
<div className="ml-8 flex flex-row">
|
|
|
|
|
|
|
|
<p>{getJobDisplayText(jobTitle, jobLevel, jobType)}</p>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{!duration && receivedMonth && (
|
|
|
|
|
|
|
|
<div className="font-light text-slate-400">
|
|
|
|
|
|
|
|
<p>{receivedMonth}</p>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
)}
|
|
|
|
<div className="space-y-2">
|
|
|
|
{duration && (
|
|
|
|
{!duration && receivedMonth && (
|
|
|
|
<div className="font-light text-slate-400">
|
|
|
|
<div className="text-sm text-slate-500">
|
|
|
|
<p>{`${duration} months`}</p>
|
|
|
|
<p>{receivedMonth}</p>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
{duration && (
|
|
|
|
|
|
|
|
<div className="text-sm text-slate-500">
|
|
|
|
|
|
|
|
<p>{`${duration} months`}</p>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
)}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
)}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -78,60 +97,69 @@ export default function OfferCard({
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<div className="border-t border-slate-200 px-4 py-5 sm:px-6">
|
|
|
|
<HorizontalDivider />
|
|
|
|
<dl className="grid grid-cols-2 gap-x-4 gap-y-8 sm:grid-cols-4">
|
|
|
|
<div className="px-8">
|
|
|
|
{totalCompensation && (
|
|
|
|
<div className="flex flex-col py-2">
|
|
|
|
<div className="col-span-1">
|
|
|
|
{(totalCompensation || monthlySalary) && (
|
|
|
|
<dt className="text-sm font-medium text-slate-500">
|
|
|
|
<div className="flex flex-row">
|
|
|
|
Total Compensation
|
|
|
|
<span>
|
|
|
|
</dt>
|
|
|
|
<CurrencyDollarIcon className="mr-3 h-5" />
|
|
|
|
<dd className="mt-1 text-sm text-slate-900">
|
|
|
|
</span>
|
|
|
|
{totalCompensation}
|
|
|
|
<span>
|
|
|
|
</dd>
|
|
|
|
<p>
|
|
|
|
</div>
|
|
|
|
{totalCompensation && `TC: ${totalCompensation}`}
|
|
|
|
)}
|
|
|
|
{monthlySalary && `Monthly Salary: ${monthlySalary}`}
|
|
|
|
{monthlySalary && (
|
|
|
|
</p>
|
|
|
|
<div className="col-span-1">
|
|
|
|
</span>
|
|
|
|
<dt className="text-sm font-medium text-slate-500">
|
|
|
|
</div>
|
|
|
|
Monthly Salary
|
|
|
|
)}
|
|
|
|
</dt>
|
|
|
|
{(base || stocks || bonus) && totalCompensation && (
|
|
|
|
<dd className="mt-1 text-sm text-slate-900">{monthlySalary}</dd>
|
|
|
|
<div className="ml-8 flex flex-row font-light">
|
|
|
|
</div>
|
|
|
|
<p>
|
|
|
|
)}
|
|
|
|
Base / year: {base ?? 'N/A'} ⋅ Stocks / year:{' '}
|
|
|
|
{base && (
|
|
|
|
{stocks ?? 'N/A'} ⋅ Bonus / year: {bonus ?? 'N/A'}
|
|
|
|
<div className="col-span-1">
|
|
|
|
</p>
|
|
|
|
<dt className="text-sm font-medium text-slate-500">
|
|
|
|
</div>
|
|
|
|
Base Salary
|
|
|
|
)}
|
|
|
|
</dt>
|
|
|
|
</div>
|
|
|
|
<dd className="mt-1 text-sm text-slate-900">{base}</dd>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
{stocks && (
|
|
|
|
|
|
|
|
<div className="col-span-1">
|
|
|
|
|
|
|
|
<dt className="text-sm font-medium text-slate-500">Stocks</dt>
|
|
|
|
|
|
|
|
<dd className="mt-1 text-sm text-slate-900">{stocks}</dd>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
{bonus && (
|
|
|
|
|
|
|
|
<div className="col-span-1">
|
|
|
|
|
|
|
|
<dt className="text-sm font-medium text-slate-500">Bonus</dt>
|
|
|
|
|
|
|
|
<dd className="mt-1 text-sm text-slate-900">{bonus}</dd>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
)}
|
|
|
|
{negotiationStrategy && (
|
|
|
|
{negotiationStrategy && (
|
|
|
|
<div className="flex flex-col py-2">
|
|
|
|
<div className="col-span-2">
|
|
|
|
<div className="flex flex-row">
|
|
|
|
<dt className="text-sm font-medium text-slate-500">
|
|
|
|
<span>
|
|
|
|
Negotiation Strategy
|
|
|
|
<ScaleIcon className="h-5 w-5" />
|
|
|
|
</dt>
|
|
|
|
</span>
|
|
|
|
<dd className="mt-1 text-sm text-slate-900">
|
|
|
|
<span className="overflow-wrap ml-2">
|
|
|
|
{negotiationStrategy}
|
|
|
|
"{negotiationStrategy}"
|
|
|
|
</dd>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
)}
|
|
|
|
)}
|
|
|
|
{otherComment && (
|
|
|
|
{otherComment && (
|
|
|
|
<div className="flex flex-col py-2">
|
|
|
|
<div className="col-span-2">
|
|
|
|
<div className="flex flex-row">
|
|
|
|
<dt className="text-sm font-medium text-slate-500">Others</dt>
|
|
|
|
<span>
|
|
|
|
<dd className="mt-1 text-sm text-slate-900">{otherComment}</dd>
|
|
|
|
<ChatBubbleBottomCenterTextIcon className="h-5 w-5" />
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<span className="overflow-wrap ml-2">"{otherComment}"</span>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
)}
|
|
|
|
)}
|
|
|
|
</div>
|
|
|
|
</dl>
|
|
|
|
</>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<div className="mx-8 my-4 block rounded-md border-b border-gray-300 bg-white py-4">
|
|
|
|
<div className="block rounded-lg border border-slate-200 bg-white">
|
|
|
|
<UpperSection />
|
|
|
|
<UpperSection />
|
|
|
|
<BottomSection />
|
|
|
|
<BottomSection />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|