diff --git a/apps/portal/src/components/offers/profile/EducationCard.tsx b/apps/portal/src/components/offers/profile/EducationCard.tsx new file mode 100644 index 00000000..603c74cd --- /dev/null +++ b/apps/portal/src/components/offers/profile/EducationCard.tsx @@ -0,0 +1,60 @@ +import { + BuildingLibraryIcon, + LightBulbIcon, +} from '@heroicons/react/24/outline'; + +// To be replaced by form enums +// eslint-disable-next-line no-shadow +export enum EducationBackgroundType { + Bachelor = 'Bachelor', + Diploma = 'Diploma', + Masters = 'Masters', + PhD = 'PhD', + Professional = 'Professional', + Seconday = 'Secondary', + SelfTaught = 'Self-taught', +} + +type EducationEntity = { + backgroundType?: EducationBackgroundType; + field?: string; + fromMonth?: string; + school?: string; + toMonth?: string; +}; + +type Props = Readonly<{ + education: EducationEntity; +}>; + +export default function EducationCard({ + education: { backgroundType, field, fromMonth, school, toMonth }, +}: Props) { + return ( +
+
+
+
+ + + {field + ? `${backgroundType ?? 'N/A'}, ${field}` + : backgroundType ?? `N/A`} + +
+ {school && ( +
+ + {school} +
+ )} +
+ {(fromMonth || toMonth) && ( +
+

{`${fromMonth ?? 'N/A'} - ${toMonth ?? 'N/A'}`}

+
+ )} +
+
+ ); +} diff --git a/apps/portal/src/components/offers/profile/OfferCard.tsx b/apps/portal/src/components/offers/profile/OfferCard.tsx new file mode 100644 index 00000000..875c38db --- /dev/null +++ b/apps/portal/src/components/offers/profile/OfferCard.tsx @@ -0,0 +1,124 @@ +import { + BuildingOffice2Icon, + ChatBubbleBottomCenterTextIcon, + CurrencyDollarIcon, + ScaleIcon, +} from '@heroicons/react/24/outline'; +import { HorizontalDivider } from '@tih/ui'; + +type OfferEntity = { + base?: string; + bonus?: string; + companyName: string; + duration?: string; // For background + jobLevel?: string; + jobTitle: string; + location: string; + monthlySalary?: string; + negotiationStrategy?: string; + otherComment?: string; + receivedMonth: string; + stocks?: string; + totalCompensation?: string; +}; + +type Props = Readonly<{ + offer: OfferEntity; +}>; + +export default function OfferCard({ + offer: { + companyName = 'Meta', + jobTitle = 'Senior Engineer', + jobLevel, + location = 'Singapore', + receivedMonth = 'Jun 2021', + totalCompensation = '350.1k', + base = '0k', + stocks = '0k', + bonus = '0k', + duration, + monthlySalary, + negotiationStrategy, + otherComment, + }, +}: Props) { + function UpperSection() { + return ( +
+
+
+ + + {location ? `${companyName}, ${location}` : companyName} + +
+
+

{jobLevel ? `${jobTitle}, ${jobLevel}` : jobTitle}

+
+
+ {receivedMonth && ( +
+

{receivedMonth}

+
+ )} + {duration && ( +
+

{duration}

+
+ )} +
+ ); + } + + function BottomSection() { + return ( +
+
+
+ +

+ {totalCompensation + ? `TC: ${totalCompensation}` + : `Monthly Salary: ${monthlySalary}`} +

+
+ + {totalCompensation && ( +
+

+ Base / year: {base} ⋅ Stocks / year: {stocks} ⋅ Bonus / year:{' '} + {bonus} +

+
+ )} +
+ {negotiationStrategy && ( +
+
+ + + "{negotiationStrategy}" + +
+
+ )} + {otherComment && ( +
+
+ + "{otherComment}" +
+
+ )} +
+ ); + } + return ( +
+ + + +
+ ); +} diff --git a/apps/portal/src/components/offers/profile/ProfilePhotoHolder.tsx b/apps/portal/src/components/offers/profile/ProfilePhotoHolder.tsx new file mode 100644 index 00000000..bb079e5a --- /dev/null +++ b/apps/portal/src/components/offers/profile/ProfilePhotoHolder.tsx @@ -0,0 +1,12 @@ +export default function ProfilePhotoHolder() { + return ( + + + + + + ); +} diff --git a/apps/portal/src/pages/offers/profile/[offerProfileId].tsx b/apps/portal/src/pages/offers/profile/[offerProfileId].tsx new file mode 100644 index 00000000..5ca79635 --- /dev/null +++ b/apps/portal/src/pages/offers/profile/[offerProfileId].tsx @@ -0,0 +1,241 @@ +import { useState } from 'react'; +import { + AcademicCapIcon, + BookmarkSquareIcon, + BriefcaseIcon, + BuildingOffice2Icon, + CalendarDaysIcon, + PencilSquareIcon, + TrashIcon, +} from '@heroicons/react/24/outline'; +import { Button, Tabs, TextArea } from '@tih/ui'; + +import { EducationBackgroundType } from '~/components/offers/profile/EducationCard'; +import EducationCard from '~/components/offers/profile/EducationCard'; +import OfferCard from '~/components/offers/profile/OfferCard'; +import ProfilePhotoHolder from '~/components/offers/profile/ProfilePhotoHolder'; + +export default function OfferProfile() { + const [selectedTab, setSelectedTab] = useState('offers'); + // Const [isDialogOpen, setIsDialogOpen] = useState(false); + function renderActionList() { + return ( + //
+ //
+ +
+
+ ); + } + function ProfileHeader() { + return ( +
+
+
+ +
+
+
+

anonymised-name

+
+ {renderActionList()} +
+
+
+ + Current: + Level 4 Google +
+
+ + YOE: + 4 +
+
+
+ +
+ setSelectedTab(value)} + /> +
+
+ ); + } + + function ProfileDetails() { + if (selectedTab === 'offers') { + return ( + <> + {[ + { + base: undefined, + bonus: undefined, + companyName: 'Meta', + id: 1, + jobLevel: 'G5', + jobTitle: 'Software Engineer', + location: 'Singapore', + monthlySalary: undefined, + negotiationStrategy: + 'Nostrud nulla aliqua deserunt commodo id aute.', + otherComment: + 'Pariatur ut est voluptate incididunt consequat do veniam quis irure adipisicing. Deserunt laborum dolor quis voluptate enim.', + receivedMonth: 'Jun 2022', + stocks: undefined, + totalCompensation: undefined, + }, + { + companyName: 'Meta', + id: 2, + jobLevel: 'G5', + jobTitle: 'Software Engineer', + location: 'Singapore', + receivedMonth: 'Jun 2022', + }, + { + companyName: 'Meta', + id: 3, + jobLevel: 'G5', + jobTitle: 'Software Engineer', + location: 'Singapore', + receivedMonth: 'Jun 2022', + }, + ].map((offer) => ( + + ))} + + ); + } + if (selectedTab === 'background') { + return ( + <> +
+ + Work Experience +
+ +
+ + Education +
+ + + ); + } + return
Detail page for {selectedTab}
; + } + + function ProfileComments() { + return ( +
+

Discussions

+