diff --git a/apps/portal/src/components/offers/dashboard/DashboardProfileCard.tsx b/apps/portal/src/components/offers/dashboard/DashboardProfileCard.tsx index 854686eb..a4e82b69 100644 --- a/apps/portal/src/components/offers/dashboard/DashboardProfileCard.tsx +++ b/apps/portal/src/components/offers/dashboard/DashboardProfileCard.tsx @@ -63,7 +63,7 @@ export default function DashboardProfileCard({ {profileName}
- Created at {formatDate(createdAt)} + Created in {formatDate(createdAt)}
diff --git a/apps/portal/src/components/offers/offerAnalysis/OfferAnalysis.tsx b/apps/portal/src/components/offers/offerAnalysis/OfferAnalysis.tsx index ab80bb48..1d8aa2ae 100644 --- a/apps/portal/src/components/offers/offerAnalysis/OfferAnalysis.tsx +++ b/apps/portal/src/components/offers/offerAnalysis/OfferAnalysis.tsx @@ -1,10 +1,13 @@ import { useEffect } from 'react'; import { useState } from 'react'; -import { Alert, HorizontalDivider, Spinner, Tabs } from '@tih/ui'; +import { ArrowUpRightIcon } from '@heroicons/react/24/outline'; +import { JobType } from '@prisma/client'; +import { Alert, Button, HorizontalDivider, Spinner, Tabs } from '@tih/ui'; import OfferPercentileAnalysisText from './OfferPercentileAnalysisText'; import OfferProfileCard from './OfferProfileCard'; import { OVERALL_TAB } from '../constants'; +import { YOE_CATEGORY } from '../table/types'; import type { AnalysisUnit, ProfileAnalysis } from '~/types/offers'; @@ -19,6 +22,16 @@ function OfferAnalysisContent({ tab, isSubmission, }: OfferAnalysisContentProps) { + const { companyId, companyName, title, totalYoe, jobType } = analysis; + const yoeCategory = + jobType === JobType.INTERN + ? '' + : totalYoe <= 2 + ? YOE_CATEGORY.ENTRY + : totalYoe <= 5 + ? YOE_CATEGORY.MID + : YOE_CATEGORY.SENIOR; + if (!analysis || analysis.noOfOffers === 0) { if (tab === OVERALL_TAB) { return ( @@ -55,15 +68,22 @@ function OfferAnalysisContent({ offerProfile={topPercentileOffer} /> ))} - {/* {offerAnalysis.topPercentileOffers.length > 0 && ( + {analysis.topPercentileOffers.length > 0 && ({profileName}
- {previousCompanies.length > 0 && ( -
+
- {getLabelForJobTitleType(title as JobTitleType)}{' '} - {`(${JobTypeLabel[jobType]})`} -
-{`Company: ${getCompanyDisplayText(company.name, location)}`}
- {level &&Level: {level}
} -{formatDate(monthYearReceived)}
-- {jobType === JobType.FULLTIME - ? `${convertMoneyToString(income)} / year` - : `${convertMoneyToString(income)} / month`} -
+ function BottomSection() { + return ( ++ {jobType === JobType.FULLTIME + ? `${convertMoneyToString(income)} / year` + : `${convertMoneyToString(income)} / month`} +
++ {formatDate(monthYearReceived)} +
+