diff --git a/apps/portal/src/components/offers/OffersNavigation.ts b/apps/portal/src/components/offers/OffersNavigation.ts index c6d47806..e3746453 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: '/offers/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} + /> +
+ setValue(name || '', val)} + /> + ); +} + +const FormSelect = forwardRef(FormSelectWithRef); + +export default FormSelect; diff --git a/apps/portal/src/components/offers/forms/FormTextArea.tsx b/apps/portal/src/components/offers/forms/FormTextArea.tsx new file mode 100644 index 00000000..f833c3dd --- /dev/null +++ b/apps/portal/src/components/offers/forms/FormTextArea.tsx @@ -0,0 +1,27 @@ +import type { ComponentProps, ForwardedRef } from 'react'; +import { forwardRef } from 'react'; +import type { UseFormRegisterReturn } from 'react-hook-form'; + +import { TextArea } from '~/../../../packages/ui/dist'; + +type TextAreaProps = ComponentProps; + +type FormTextAreaProps = Omit & + Pick, 'onChange'>; + +function FormTextAreaWithRef( + { onChange, ...rest }: FormTextAreaProps, + ref?: ForwardedRef, +) { + return ( +