-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from Pradeep-Kumar-Rebbavarapu/main
Company Cards , Each Company Section Completed
- Loading branch information
Showing
88 changed files
with
6,526 additions
and
774 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,3 +33,4 @@ yarn-error.log* | |
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts | ||
.env |
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,17 @@ | ||
{ | ||
"$schema": "https://ui.shadcn.com/schema.json", | ||
"style": "default", | ||
"rsc": true, | ||
"tsx": true, | ||
"tailwind": { | ||
"config": "tailwind.config.js", | ||
"css": "src/app/globals.css", | ||
"baseColor": "gray", | ||
"cssVariables": false, | ||
"prefix": "" | ||
}, | ||
"aliases": { | ||
"components": "@/components", | ||
"utils": "@/lib/utils" | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
'use client'; | ||
|
||
import React, { Component } from 'react'; | ||
|
||
class Error extends Component { | ||
render() { | ||
return ( | ||
<div className="h-screen flex justify-center items-center text-center font-bold text-2xl"> | ||
Something went wrong! | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
export default Error; |
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,12 @@ | ||
interface Props { | ||
children: React.ReactNode; | ||
} | ||
|
||
const EachAdminLayout = ({ children }: Props) => { | ||
return (<div> | ||
|
||
{children} | ||
</div>); | ||
}; | ||
|
||
export default EachAdminLayout; |
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,15 @@ | ||
'use client'; | ||
|
||
import React, { Component } from 'react'; | ||
|
||
class Loading extends Component { | ||
render() { | ||
return ( | ||
<div className="h-screen w-full text-center flex justify-center items-center font-bold"> | ||
Loading... | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
export default Loading; |
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,81 @@ | ||
// //this is the page.tsx file that contains the page component for the admin/[adminId] route | ||
"use client"; | ||
import { useRouter } from "next/router"; | ||
import {AllAdmins} from '../../../../dummyData/admin' | ||
interface Props { } | ||
|
||
interface Props {} | ||
|
||
const AdminPage = ({ | ||
const AdminPage = async ({ | ||
params, | ||
}: { | ||
params: { | ||
adminId: String; | ||
}; | ||
}) => { | ||
const EachAdminData = await fetchEachAdmin(params.adminId) | ||
|
||
|
||
return ( | ||
<div> | ||
<h1>Admin Page</h1> | ||
<p>Static Admin ID: {params.adminId}</p> | ||
<section className="text-gray-600 body-font"> | ||
<div className="container px-5 py-24 mx-auto"> | ||
<div className="text-center mb-20"> | ||
<h1 className="sm:text-3xl text-2xl font-medium text-center title-font text-gray-900 mb-4">{EachAdminData?.name}</h1> | ||
</div> | ||
<div className="flex flex-wrap lg:w-4/5 sm:mx-auto sm:mb-2 -mx-2"> | ||
|
||
<div className="p-2 sm:w-1/2 w-full"> | ||
<div className="bg-gray-800 rounded flex p-4 h-full items-center"> | ||
<svg fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="3" className="text-white w-6 h-6 flex-shrink-0 mr-4" viewBox="0 0 24 24"> | ||
<path d="M22 11.08V12a10 10 0 11-5.93-9.14"></path> | ||
<path d="M22 4L12 14.01l-3-3"></path> | ||
</svg> | ||
<span className="title-font text-white font-medium">{EachAdminData?.id}</span> | ||
</div> | ||
</div> | ||
|
||
<div className="p-2 sm:w-1/2 w-full"> | ||
<div className="bg-gray-800 rounded flex p-4 h-full items-center"> | ||
<svg fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="3" className="text-white w-6 h-6 flex-shrink-0 mr-4" viewBox="0 0 24 24"> | ||
<path d="M22 11.08V12a10 10 0 11-5.93-9.14"></path> | ||
<path d="M22 4L12 14.01l-3-3"></path> | ||
</svg> | ||
<span className="title-font text-white font-medium">{EachAdminData?.email}</span> | ||
</div> | ||
</div> | ||
|
||
<div className="p-2 sm:w-1/2 w-full"> | ||
<div className="bg-gray-800 rounded flex p-4 h-full items-center"> | ||
<svg fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="3" className="text-white w-6 h-6 flex-shrink-0 mr-4" viewBox="0 0 24 24"> | ||
<path d="M22 11.08V12a10 10 0 11-5.93-9.14"></path> | ||
<path d="M22 4L12 14.01l-3-3"></path> | ||
</svg> | ||
<span className="title-font text-white font-medium">{EachAdminData?.role}</span> | ||
</div> | ||
</div> | ||
|
||
<div className="p-2 sm:w-1/2 w-full"> | ||
<div className="bg-gray-800 rounded flex p-4 h-full items-center"> | ||
<svg fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="3" className="text-white w-6 h-6 flex-shrink-0 mr-4" viewBox="0 0 24 24"> | ||
<path d="M22 11.08V12a10 10 0 11-5.93-9.14"></path> | ||
<path d="M22 4L12 14.01l-3-3"></path> | ||
</svg> | ||
<span className="title-font text-white font-medium">{EachAdminData?.contact}</span> | ||
</div> | ||
</div> | ||
|
||
</div> | ||
|
||
</div> | ||
</section> | ||
</div> | ||
); | ||
}; | ||
|
||
export default AdminPage; | ||
|
||
|
||
const fetchEachAdmin = async (id: String) => { | ||
// const res = await fetch(''); | ||
// const json = await res.json(); | ||
// return json | ||
return AllAdmins.find((x)=>x.id == id) | ||
} |
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,15 @@ | ||
'use client'; | ||
|
||
import React, { Component } from 'react'; | ||
|
||
class Error extends Component { | ||
render() { | ||
return ( | ||
<div className="h-screen flex justify-center items-center text-center font-bold text-2xl"> | ||
Something went wrong! | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
export default Error; |
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,13 @@ | ||
interface Props { | ||
children: React.ReactNode; | ||
} | ||
|
||
const EachCompanyLayout = ({ children }: Props) => { | ||
return (<div className=""> | ||
|
||
{children} | ||
</div>); | ||
}; | ||
|
||
export default EachCompanyLayout; | ||
|
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,15 @@ | ||
'use client'; | ||
|
||
import React, { Component } from 'react'; | ||
|
||
class Loading extends Component { | ||
render() { | ||
return ( | ||
<div className="h-screen w-full text-center flex justify-center items-center font-bold"> | ||
Loading... | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
export default Loading; |
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,72 @@ | ||
import JAFCard from "@/components/company/JAFCard"; | ||
import EachCompanyCard from "@/components/company/EachCompanyCard" | ||
import { AllCompanies } from "@/dummyData/company" | ||
import { fetchEachCompanyDetails } from "@/helpers/api"; | ||
import { cookies } from "next/headers"; | ||
interface Props { | ||
params: { | ||
companyId: String | ||
} | ||
} | ||
|
||
interface CompanyData { | ||
name: String; | ||
id: String; | ||
jafs: any; | ||
ppoOffers: any; | ||
recruiters: any; | ||
} | ||
|
||
|
||
export default async function EachCompanyPage({ params }: Props) { | ||
const EachCompany = await fetchEachCompanyDetails(cookies().get('accessToken')?.value,params.companyId) | ||
return ( | ||
<div> | ||
<section className="text-gray-600 body-font"> | ||
<div className="container px-5 py-24 mx-auto"> | ||
<div className="flex flex-col text-center w-full mb-20"> | ||
<h2 className="text-xs text-indigo-500 tracking-widest font-medium title-font mb-1">12 Dec 2023</h2> | ||
<h1 className="sm:text-4xl text-3xl font-bold title-font mb-4 text-gray-900">{EachCompany?.name}</h1> | ||
</div> | ||
|
||
{EachCompany?.jafs?.length === 0 ? ( | ||
<h1 className="sm:text-xl font-medium title-font mb-4 text-gray-900 text-center">No Jobs Listed Currently</h1> | ||
) : ( | ||
<div className="flex flex-wrap"> | ||
<JAFCard /> | ||
</div> | ||
)} | ||
|
||
{EachCompany?.ppoOffers?.length === 0 ? ( | ||
<h1 className="sm:text-xl font-medium title-font mb-4 text-gray-900 text-center">No PPO Offers Currently</h1> | ||
) : ( | ||
<div className="flex flex-wrap"> | ||
<JAFCard /> | ||
</div> | ||
)} | ||
|
||
{EachCompany?.recruiters?.length === 0 ? ( | ||
<h1 className="sm:text-xl font-medium title-font mb-4 text-gray-900 text-center">No Recruiters Currently</h1> | ||
) : ( | ||
<div className="flex flex-wrap"> | ||
<JAFCard /> | ||
</div> | ||
)} | ||
<section className="text-gray-600 body-font"> | ||
<h1 className="text-center mt-10 mb-2">Sample Cards for Jobs , PPOs and Recruiters in company section</h1> | ||
<div className="container px-5 mx-auto"> | ||
<div className="flex flex-wrap"> | ||
<JAFCard /> | ||
<JAFCard /> | ||
<JAFCard /> | ||
<JAFCard /> | ||
</div> | ||
</div> | ||
</section> | ||
</div> | ||
</section> | ||
</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,15 @@ | ||
'use client'; | ||
|
||
import React, { Component } from 'react'; | ||
|
||
class Error extends Component { | ||
render() { | ||
return ( | ||
<div className="h-screen flex justify-center items-center text-center font-bold text-2xl"> | ||
Something went wrong! | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
export default Error; |
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,12 @@ | ||
interface Props { | ||
children: React.ReactNode; | ||
} | ||
|
||
const CompanyLayout = ({ children }: Props) => { | ||
return (<div> | ||
|
||
{children} | ||
</div>); | ||
}; | ||
|
||
export default CompanyLayout; |
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,15 @@ | ||
'use client'; | ||
|
||
import React, { Component } from 'react'; | ||
|
||
class Loading extends Component { | ||
render() { | ||
return ( | ||
<div className="h-screen w-full text-center flex justify-center items-center font-bold"> | ||
Loading... | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
export default Loading; |
Oops, something went wrong.
9432908
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
tpc-frontend – ./
tpc-frontend-git-main-tpc-frontend.vercel.app
tpc-frontend-tpc-frontend.vercel.app
tpc-frontend-delta.vercel.app