-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
94 changed files
with
723 additions
and
299 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
frontend/src/app/(app)/(peopleFlow)/people/add-new/personal-details/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { PersonalDetails } from '@app/components/views/PersonalDetails/PersonalDetails'; | ||
import { PersonalDetails } from '@app/components/pages/PersonalDetails/PersonalDetails'; | ||
|
||
export default PersonalDetails; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
import { Typography } from '@app/components/common/Typography'; | ||
import { PageTitle } from '@app/components/common/PageTitle'; | ||
|
||
export default function Documentation() { | ||
return ( | ||
<div> | ||
<Typography className="mb-10" variant="body-l/semibold" as="h1"> | ||
Documentation | ||
</Typography> | ||
<PageTitle title="Documentation" /> | ||
</div> | ||
); | ||
} |
17 changes: 2 additions & 15 deletions
17
frontend/src/app/(app)/(root)/library/[ladder]/[bucket]/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,13 @@ | ||
import { Breadcrumbs } from '@app/components/modules/Breadcrumbs'; | ||
import { BucketDetails } from '@app/components/modules/BucketDetails'; | ||
import { BucketDetails } from '@app/components/pages/BucketDetails'; | ||
import { getLadderName } from '@app/api/ladder'; | ||
import { getBucketDetails } from '@app/api/bucket'; | ||
import { routes } from '@app/constants'; | ||
|
||
export default async function BucketDetailed({ params }: { params: { bucket: string; ladder: string } }) { | ||
const { bucket, ladder } = params; | ||
const data = await getBucketDetails(bucket); | ||
const ladderName = await getLadderName(ladder); | ||
|
||
return ( | ||
<div> | ||
<Breadcrumbs | ||
breadcrumbs={[ | ||
{ label: 'CPF Library', href: routes.library.index, current: false }, | ||
{ label: ladderName, href: `${routes.library.index}/${ladder}`, current: false }, | ||
{ label: data.bucketName, href: `${routes.library.index}/${ladder}/${bucket}`, current: true }, | ||
]} | ||
/> | ||
{data && <BucketDetails data={data} />} | ||
</div> | ||
); | ||
return <BucketDetails data={data} ladderName={ladderName} ladderSlug={ladder} bucketSlug={bucket} />; | ||
} | ||
|
||
export const dynamic = 'force-dynamic'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,10 @@ | ||
import { Breadcrumbs } from '@app/components/modules/Breadcrumbs'; | ||
import { LibraryDetailed } from '@app/components/modules/LibraryDetailed'; | ||
import { getLadderDetails } from '@app/api/ladder'; | ||
import { routes } from '@app/constants'; | ||
import { LadderDetails } from '@app/components/pages/LadderDetails'; | ||
|
||
export default async function LadderDetailed({ params }: { params: { ladder: string } }) { | ||
const data = await getLadderDetails(params.ladder); | ||
|
||
return ( | ||
<div> | ||
<Breadcrumbs | ||
breadcrumbs={[ | ||
{ label: 'CPF Library', href: routes.library.index, current: false }, | ||
{ label: data.ladderName, href: `${routes.library.index}/${params.ladder}`, current: true }, | ||
]} | ||
/> | ||
{data && <LibraryDetailed ladderSlug={params.ladder} data={data} />} | ||
</div> | ||
); | ||
return <LadderDetails ladderSlug={params.ladder} data={data} />; | ||
} | ||
|
||
export const dynamic = 'force-dynamic'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,10 @@ | ||
import { LadderCard } from '@app/components/common/LadderCard'; | ||
import { getLadders } from '@app/api/ladder'; | ||
import { Typography } from '@app/components/common/Typography'; | ||
import { Library } from '@app/components/pages/Library'; | ||
|
||
export default async function LibraryPage() { | ||
const data = await getLadders(); | ||
|
||
return ( | ||
<div> | ||
<Typography className="mb-10" variant="body-l/semibold" as="h1"> | ||
CPF Library | ||
</Typography> | ||
<Typography className="mb-6 text-navy-600" variant="body-m/regular"> | ||
Select a career path to view the details. | ||
</Typography> | ||
<div className="grid grid-cols-3 gap-6"> | ||
{data.map((ladder) => ( | ||
<LadderCard key={ladder.ladderSlug} {...ladder} /> | ||
))} | ||
</div> | ||
</div> | ||
); | ||
return <Library data={data} />; | ||
} | ||
|
||
export const dynamic = 'force-dynamic'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,24 @@ | ||
import { Typography } from '@app/components/common/Typography'; | ||
import { MySpace } from '@app/components/pages/MySpace'; | ||
|
||
export default function MySpace() { | ||
return ( | ||
<div> | ||
<Typography className="mb-10" variant="body-l/semibold" as="h1"> | ||
My Space | ||
</Typography> | ||
</div> | ||
); | ||
// TODO: get data from api | ||
const data = { | ||
user: { | ||
firstName: 'Jane', | ||
lastName: 'Edge', | ||
position: 'Front End Developer, Junior', | ||
}, | ||
currentLevel: { | ||
band: 2, | ||
score: 10, | ||
}, | ||
nextLevel: { | ||
band: 3, | ||
threshold: 11, | ||
}, | ||
}; | ||
|
||
export default function MySpacePage() { | ||
return <MySpace data={data} />; | ||
} | ||
|
||
export const dynamic = 'force-dynamic'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
frontend/src/components/common/PageTitle/PageTitle.interface.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export interface PageTitleProps { | ||
title: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { Typography } from '@app/components/common/Typography'; | ||
import { PageTitleProps } from './PageTitle.interface'; | ||
|
||
export const PageTitle: React.FC<PageTitleProps> = ({ title }) => { | ||
return ( | ||
<Typography className="mb-10" variant="body-l/semibold" as="h1"> | ||
{title} | ||
</Typography> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { PageTitle } from './PageTitle'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export interface TabsProps { | ||
tabs: { | ||
key: string; | ||
label: string; | ||
href: string; | ||
}[]; | ||
currentTab: string; | ||
onTabChange: (tab: string) => void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { FC } from 'react'; | ||
import { TabsProps } from './Tabs.interface'; | ||
import { generateClassNames } from '@app/utils'; | ||
|
||
export const Tabs: FC<TabsProps> = ({ tabs, currentTab, onTabChange }) => { | ||
return ( | ||
<div> | ||
<div className="sm:hidden"> | ||
<label htmlFor="tabs" className="sr-only"> | ||
Select a tab | ||
</label> | ||
<select | ||
id="tabs" | ||
name="tabs" | ||
onChange={(e) => onTabChange(e.target.value)} | ||
defaultValue={tabs.find((tab) => tab.key === currentTab)?.label} | ||
className="block w-full rounded-md border-navy-300 py-2 pl-3 pr-10 text-base focus:border-blue-500 focus:outline-none focus:ring-blue-500 sm:text-sm" | ||
> | ||
{tabs.map((tab) => ( | ||
<option key={tab.key}>{tab.label}</option> | ||
))} | ||
</select> | ||
</div> | ||
<div className="hidden sm:block"> | ||
<div className="border-b border-navy-200"> | ||
<nav aria-label="Tabs" className="flex justify-center space-x-8"> | ||
{tabs.map((tab) => ( | ||
<a | ||
key={tab.key} | ||
href={tab.href} | ||
aria-current={tab.key === currentTab ? 'page' : undefined} | ||
className={generateClassNames( | ||
tab.key === currentTab | ||
? 'border-blue-800 text-blue-800' | ||
: 'border-transparent text-navy-500 hover:border-navy-300 hover:text-navy-700', | ||
'whitespace-nowrap border-b-2 px-1 py-4 text-sm font-medium', | ||
)} | ||
> | ||
{tab.label} | ||
</a> | ||
))} | ||
</nav> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { Tabs } from './Tabs'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.