|
|
@ -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,33 +33,56 @@ 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 className="ml-8 flex flex-row">
|
|
|
|
|
|
|
|
<p>{getJobDisplayText(jobTitle, jobLevel, jobType)}</p>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div className="space-y-2">
|
|
|
|
{!duration && receivedMonth && (
|
|
|
|
{!duration && receivedMonth && (
|
|
|
|
<div className="font-light text-slate-400">
|
|
|
|
<div className="text-sm text-slate-500">
|
|
|
|
<p>{receivedMonth}</p>
|
|
|
|
<p>{receivedMonth}</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
)}
|
|
|
|
)}
|
|
|
|
{duration && (
|
|
|
|
{duration && (
|
|
|
|
<div className="font-light text-slate-400">
|
|
|
|
<div className="text-sm text-slate-500">
|
|
|
|
<p>{`${duration} months`}</p>
|
|
|
|
<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>
|
|
|
|
|
|
|
|
{totalCompensation && `TC: ${totalCompensation}`}
|
|
|
|
|
|
|
|
{monthlySalary && `Monthly Salary: ${monthlySalary}`}
|
|
|
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
)}
|
|
|
|
)}
|
|
|
|
{(base || stocks || bonus) && totalCompensation && (
|
|
|
|
{monthlySalary && (
|
|
|
|
<div className="ml-8 flex flex-row font-light">
|
|
|
|
<div className="col-span-1">
|
|
|
|
<p>
|
|
|
|
<dt className="text-sm font-medium text-slate-500">
|
|
|
|
Base / year: {base ?? 'N/A'} ⋅ Stocks / year:{' '}
|
|
|
|
Monthly Salary
|
|
|
|
{stocks ?? 'N/A'} ⋅ Bonus / year: {bonus ?? 'N/A'}
|
|
|
|
</dt>
|
|
|
|
</p>
|
|
|
|
<dd className="mt-1 text-sm text-slate-900">{monthlySalary}</dd>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
)}
|
|
|
|
)}
|
|
|
|
|
|
|
|
{base && (
|
|
|
|
|
|
|
|
<div className="col-span-1">
|
|
|
|
|
|
|
|
<dt className="text-sm font-medium text-slate-500">
|
|
|
|
|
|
|
|
Base Salary
|
|
|
|
|
|
|
|
</dt>
|
|
|
|
|
|
|
|
<dd className="mt-1 text-sm text-slate-900">{base}</dd>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{negotiationStrategy && (
|
|
|
|
)}
|
|
|
|
<div className="flex flex-col py-2">
|
|
|
|
{stocks && (
|
|
|
|
<div className="flex flex-row">
|
|
|
|
<div className="col-span-1">
|
|
|
|
<span>
|
|
|
|
<dt className="text-sm font-medium text-slate-500">Stocks</dt>
|
|
|
|
<ScaleIcon className="h-5 w-5" />
|
|
|
|
<dd className="mt-1 text-sm text-slate-900">{stocks}</dd>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<span className="overflow-wrap ml-2">
|
|
|
|
|
|
|
|
"{negotiationStrategy}"
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</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>
|
|
|
|
</div>
|
|
|
|
)}
|
|
|
|
)}
|
|
|
|
{otherComment && (
|
|
|
|
{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
|
|
|
|
<ChatBubbleBottomCenterTextIcon className="h-5 w-5" />
|
|
|
|
</dt>
|
|
|
|
</span>
|
|
|
|
<dd className="mt-1 text-sm text-slate-900">
|
|
|
|
<span className="overflow-wrap ml-2">"{otherComment}"</span>
|
|
|
|
{negotiationStrategy}
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
{otherComment && (
|
|
|
|
|
|
|
|
<div className="col-span-2">
|
|
|
|
|
|
|
|
<dt className="text-sm font-medium text-slate-500">Others</dt>
|
|
|
|
|
|
|
|
<dd className="mt-1 text-sm text-slate-900">{otherComment}</dd>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
)}
|
|
|
|
)}
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
</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>
|
|
|
|