+
+
+
+ Viewing offers for
+
+
+
+ in
+
+
+
+
+
+
+
+
);
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..b7baac84
--- /dev/null
+++ b/apps/portal/src/pages/offers/profile/[offerProfileId].tsx
@@ -0,0 +1,256 @@
+import { useState } from 'react';
+import {
+ AcademicCapIcon,
+ BookmarkSquareIcon,
+ BriefcaseIcon,
+ BuildingOffice2Icon,
+ CalendarDaysIcon,
+ ClipboardDocumentIcon,
+ PencilSquareIcon,
+ ShareIcon,
+ TrashIcon,
+} from '@heroicons/react/24/outline';
+import { Button, Dialog, Tabs } from '@tih/ui';
+
+import EducationCard from '~/components/offers/profile/EducationCard';
+import OfferCard from '~/components/offers/profile/OfferCard';
+import ProfilePhotoHolder from '~/components/offers/profile/ProfilePhotoHolder';
+import { EducationBackgroundType } from '~/components/offers/types';
+
+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
+
+
+
+
+ >
+ );
+ }
+ return
Detail page for {selectedTab}
;
+ }
+
+ function ProfileComments() {
+ return (
+
+
+
+
+
+
+ Discussions feature coming soon
+
+ {/*
*/}
+
+ );
+ }
+
+ return (
+
+ );
+}
diff --git a/apps/portal/src/pages/offers/submit.tsx b/apps/portal/src/pages/offers/submit.tsx
new file mode 100644
index 00000000..b85e098c
--- /dev/null
+++ b/apps/portal/src/pages/offers/submit.tsx
@@ -0,0 +1,111 @@
+import { useState } from 'react';
+import type { SubmitHandler } from 'react-hook-form';
+import { FormProvider, useForm } from 'react-hook-form';
+import { ArrowLeftIcon, ArrowRightIcon } from '@heroicons/react/20/solid';
+import { Button } from '@tih/ui';
+
+import BackgroundForm from '~/components/offers/forms/BackgroundForm';
+import OfferAnalysis from '~/components/offers/forms/OfferAnalysis';
+import OfferDetailsForm from '~/components/offers/forms/OfferDetailsForm';
+import OfferProfileSave from '~/components/offers/forms/OfferProfileSave';
+import type { SubmitOfferFormData } from '~/components/offers/types';
+
+function Breadcrumbs() {
+ return (
+
+ {'Offer details > Background > Analysis > Save'}
+
+ );
+}
+
+const defaultOfferValues = {
+ offers: [
+ {
+ comments: '',
+ companyId: '',
+ job: {
+ base: {
+ currency: 'USD',
+ value: 0,
+ },
+ bonus: {
+ currency: 'USD',
+ value: 0,
+ },
+ level: '',
+ specialization: '',
+ stocks: {
+ currency: 'USD',
+ value: 0,
+ },
+ title: '',
+ totalCompensation: {
+ currency: 'USD',
+ value: 0,
+ },
+ },
+ jobType: 'FULLTIME',
+ location: '',
+ monthYearReceived: '',
+ negotiationStrategy: '',
+ },
+ ],
+};
+
+export default function OffersSubmissionPage() {
+ const [formStep, setFormStep] = useState(0);
+ const formMethods = useForm
({
+ defaultValues: defaultOfferValues,
+ });
+
+ const nextStep = () => setFormStep(formStep + 1);
+ const previousStep = () => setFormStep(formStep - 1);
+
+ const formComponents = [
+ ,
+ ,
+ ,
+ ,
+ ];
+
+ const onSubmit: SubmitHandler = async () => {
+ nextStep();
+ };
+
+ return (
+
+ );
+}
diff --git a/apps/portal/src/pages/questions/index.tsx b/apps/portal/src/pages/questions/index.tsx
index d7558bb0..41e2cee7 100644
--- a/apps/portal/src/pages/questions/index.tsx
+++ b/apps/portal/src/pages/questions/index.tsx
@@ -143,19 +143,38 @@ export default function QuestionsHomePage() {
]);
useEffect(() => {
- if (areFiltersInitialized) {
+ if (areFiltersInitialized && !loaded) {
+ // Update query params
+ router.replace({
+ pathname: router.pathname,
+ query: {
+ companies: selectedCompanies,
+ locations: selectedLocations,
+ questionAge: selectedQuestionAge,
+ questionTypes: selectedQuestionTypes,
+ },
+ });
const hasFilter =
- router.query.companies ||
- router.query.questionTypes ||
- router.query.questionAge ||
- router.query.locations;
+ selectedCompanies.length > 0 ||
+ selectedLocations.length > 0 ||
+ selectedQuestionAge !== 'all' ||
+ selectedQuestionTypes.length > 0;
if (hasFilter) {
setHasLanded(true);
}
- // Console.log('landed', hasLanded);
+
setLoaded(true);
}
- }, [areFiltersInitialized, hasLanded, router.query]);
+ }, [
+ areFiltersInitialized,
+ hasLanded,
+ loaded,
+ router,
+ selectedCompanies,
+ selectedLocations,
+ selectedQuestionAge,
+ selectedQuestionTypes,
+ ]);
if (!loaded) {
return null;
@@ -291,18 +310,17 @@ export default function QuestionsHomePage() {
Filter by
{filterSidebar}
-
- {
- setFilterDrawerOpen(false);
- }}>
- {filterSidebar}
-
-
+ {
+ setFilterDrawerOpen(false);
+ }}>
+ {filterSidebar}
+