diff --git a/apps/portal/src/components/offers/OffersNavigation.ts b/apps/portal/src/components/offers/OffersNavigation.ts index c6d47806..8e020e4c 100644 --- a/apps/portal/src/components/offers/OffersNavigation.ts +++ b/apps/portal/src/components/offers/OffersNavigation.ts @@ -1,23 +1,14 @@ import type { ProductNavigationItems } from '~/components/global/ProductNavigation'; const navigation: ProductNavigationItems = [ - { - children: [ - { href: '#', name: 'Technical Support' }, - { href: '#', name: 'Sales' }, - { href: '#', name: 'General' }, - ], - href: '#', - name: 'Inboxes', - }, - { children: [], href: '#', name: 'Reporting' }, - { children: [], href: '#', name: 'Settings' }, + { href: '/offers', name: 'Home' }, + { href: '/submit', name: 'Benchmark your offer' }, ]; const config = { navigation, - showGlobalNav: true, - title: 'Offers', + showGlobalNav: false, + title: 'Tech Offers Repo', }; export default config; diff --git a/apps/portal/src/components/offers/OffersTable.tsx b/apps/portal/src/components/offers/OffersTable.tsx new file mode 100644 index 00000000..ded79547 --- /dev/null +++ b/apps/portal/src/components/offers/OffersTable.tsx @@ -0,0 +1,190 @@ +import { useState } from 'react'; +import { HorizontalDivider, Pagination, Select, Tabs } from '@tih/ui'; + +import CurrencySelector from '~/components/offers/util/currency/CurrencySelector'; + +type TableRow = { + company: string; + date: string; + salary: string; + title: string; + yoe: string; +}; + +// eslint-disable-next-line no-shadow +enum YOE_CATEGORY { + INTERN = 0, + ENTRY = 1, + MID = 2, + SENIOR = 3, +} + +export default function OffersTable() { + const [currency, setCurrency] = useState('SGD'); + const [selectedTab, setSelectedTab] = useState(YOE_CATEGORY.ENTRY); + const [selectedPage, setSelectedPage] = useState(1); + + function renderTabs() { + return ( +
+
+ setSelectedTab(value)} + /> +
+
+ ); + } + + function renderFilters() { + return ( +
+
+ All offers in + setCurrency(value)} + selectedCurrency={currency} + /> +
+ handleCurrencyChange(currency)} + /> + ); +} diff --git a/apps/portal/src/components/offers/util/time/index.tsx b/apps/portal/src/components/offers/util/time/index.tsx new file mode 100644 index 00000000..86f21ab9 --- /dev/null +++ b/apps/portal/src/components/offers/util/time/index.tsx @@ -0,0 +1,7 @@ +export function formatDate(value: Date | number | string) { + const date = new Date(value); + // Const day = date.toLocaleString('default', { day: '2-digit' }); + const month = date.toLocaleString('default', { month: 'short' }); + const year = date.toLocaleString('default', { year: 'numeric' }); + return `${month} ${year}`; +} diff --git a/apps/portal/src/pages/offers/index.tsx b/apps/portal/src/pages/offers/index.tsx index 4fa89c65..9fdb6fbe 100644 --- a/apps/portal/src/pages/offers/index.tsx +++ b/apps/portal/src/pages/offers/index.tsx @@ -1,10 +1,10 @@ -import OffersTitle from '~/components/offers/OffersTitle'; +import OffersTable from '~/components/offers/OffersTable'; export default function OffersHomePage() { return (
- +
); diff --git a/apps/portal/src/pages/offers/profile/[offerProfileId].tsx b/apps/portal/src/pages/offers/profile/[offerProfileId].tsx index 5ca79635..487e3d3d 100644 --- a/apps/portal/src/pages/offers/profile/[offerProfileId].tsx +++ b/apps/portal/src/pages/offers/profile/[offerProfileId].tsx @@ -5,10 +5,12 @@ import { BriefcaseIcon, BuildingOffice2Icon, CalendarDaysIcon, + ClipboardDocumentIcon, PencilSquareIcon, + ShareIcon, TrashIcon, } from '@heroicons/react/24/outline'; -import { Button, Tabs, TextArea } from '@tih/ui'; +import { Button, Dialog, Tabs } from '@tih/ui'; import { EducationBackgroundType } from '~/components/offers/profile/EducationCard'; import EducationCard from '~/components/offers/profile/EducationCard'; @@ -17,44 +19,9 @@ import ProfilePhotoHolder from '~/components/offers/profile/ProfilePhotoHolder'; export default function OfferProfile() { const [selectedTab, setSelectedTab] = useState('offers'); - // Const [isDialogOpen, setIsDialogOpen] = useState(false); + const [isDialogOpen, setIsDialogOpen] = useState(false); function renderActionList() { return ( - //
- //
-
); } @@ -219,8 +214,28 @@ export default function OfferProfile() { function ProfileComments() { return (
-

Discussions

-