-
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.
- Loading branch information
Showing
44 changed files
with
7,273 additions
and
2,378 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
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,12 +1,12 @@ | ||
import Loading from "@/components/common/loading"; | ||
import { Suspense } from "react"; | ||
|
||
interface Props { | ||
children: React.ReactNode; | ||
} | ||
|
||
const JAFLayout = ({ children }: Props) => { | ||
return <Suspense fallback={<Loading />}>{children}</Suspense>; | ||
}; | ||
|
||
export default JAFLayout; | ||
import Loading from "@/components/common/loading"; | ||
import { Suspense } from "react"; | ||
|
||
interface Props { | ||
children: React.ReactNode; | ||
} | ||
|
||
const JAFLayout = ({ children }: Props) => { | ||
return <Suspense fallback={<Loading />}>{children}</Suspense>; | ||
}; | ||
|
||
export default JAFLayout; |
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,15 +1,15 @@ | ||
"use client"; | ||
|
||
import React, { Component } from "react"; | ||
|
||
class Loading extends Component { | ||
render() { | ||
return ( | ||
<div className="h-full w-full text-center flex justify-center items-center font-bold"> | ||
Loading... | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
export default Loading; | ||
"use client"; | ||
|
||
import React, { Component } from "react"; | ||
|
||
class Loading extends Component { | ||
render() { | ||
return ( | ||
<div className="h-full 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,10 +1,8 @@ | ||
import React from 'react' | ||
import JAF from '@/components/JAF/JAF' | ||
|
||
function page() { | ||
return ( | ||
<JAF /> | ||
) | ||
} | ||
|
||
export default page | ||
import React from "react"; | ||
import JAF from "@/components/JAF/JAF"; | ||
|
||
function page() { | ||
return <JAF />; | ||
} | ||
|
||
export default page; |
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 |
---|---|---|
@@ -1,84 +1,3 @@ | ||
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> | ||
); | ||
export default function page() { | ||
return <div>page</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
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,99 +1,50 @@ | ||
import { Button } from "@/components/ui/button" | ||
import { cookies } from "next/headers"; | ||
import { Card, CardContent } from "@/components/ui/card" | ||
|
||
|
||
interface Props { } | ||
import { | ||
fetchAllJobs, | ||
fetchCompany, | ||
fetchCompanyRecruiters, | ||
} from "@/helpers/api"; | ||
import AllCompaniesComponent from "@/components/company/AllCompaniesComponent"; | ||
import { Suspense } from "react"; | ||
import { Separator } from "@/components/ui/separator"; | ||
import RecruitersTable from "@/components/RecruitersTable"; | ||
|
||
|
||
interface company { | ||
id: string; | ||
name: string; | ||
metadata: object; | ||
createdAt: string; | ||
updatedAt: string; | ||
} | ||
|
||
const CompanyPage = async () => { | ||
const Companies = await fetchCompany(cookies()?.get("accessToken")?.value); | ||
console.log(Companies) | ||
if (Companies.companies.length === 0) { | ||
return ( | ||
<h1 className="text-center text-black text-3xl font-bold flex justify-center items-center w-full h-full"> | ||
No Comapanies Currently Registered | ||
</h1> | ||
); | ||
} | ||
|
||
const Recruiters = await fetchCompanyRecruiters( | ||
cookies()?.get("accessToken")?.value, | ||
cookies()?.get("companyId")?.value, | ||
); | ||
|
||
const CompanyRelatedJobs = await fetchAllJobs( | ||
cookies()?.get("accessToken")?.value, | ||
null, | ||
null, | ||
cookies()?.get("companyId")?.value, | ||
null, | ||
null, | ||
); | ||
|
||
console.log("CRJ", CompanyRelatedJobs); | ||
"use client"; | ||
import { fetchStudentData } from "@/helpers/api"; | ||
import Cookies from "js-cookie"; | ||
import TableComponent from "@/components/TableComponent/TableComponent"; | ||
import generateColumns from "@/components/TableComponent/ColumnMapping"; | ||
|
||
const jsonData = [ | ||
{ | ||
id: "string", | ||
userId: "string", | ||
programId: "string", | ||
rollNo: "string", | ||
category: "string", | ||
gender: "MALE", | ||
cpi: 0, | ||
user: { | ||
name: "string", | ||
email: "string", | ||
contact: "string", | ||
}, | ||
program: { | ||
course: "string", | ||
branch: "string", | ||
year: "string", | ||
}, | ||
}, | ||
]; | ||
|
||
const dynamicColumns = generateColumns(jsonData[0]); | ||
|
||
const StudentPage = async () => { | ||
const AllStudents = await fetchStudentData(Cookies.get("accessToken")); | ||
return ( | ||
<div className=""> | ||
<div className="grid grid-cols-[300px_auto]"> | ||
<div> | ||
<AllCompaniesComponent /> | ||
</div> | ||
<div> | ||
{cookies()?.get('companyId') != undefined && ( | ||
<><div className="flex justify-between items-center"> | ||
<div className="text-3xl font-bold mx-5 my-5">{cookies().get('companyName')?.value}</div> | ||
<div className="flex"> | ||
<Button variant={"outline"} className="mr-5">See Jobs</Button> | ||
<Button className="mr-5">Update</Button> | ||
<Button className="mr-5" variant="destructive">Delete</Button> | ||
</div> | ||
</div><Separator /><div className="h-[66vh] overflow-y-scroll"> | ||
<div className=""> | ||
<h1 className="text-xl font-semibold text-start mx-5 my-3">Company Details</h1> | ||
<div className="mx-16"> | ||
<ul className="list-disc"> | ||
<li>Company Website : <a className="text-blue-600 font-medium">click here</a></li> | ||
<li>Year Of Establishment : 2014</li> | ||
<li>Social Media : <a className="text-blue-600 font-medium">click here</a></li> | ||
<li>Company Size : 1.5 M</li> | ||
<li>Annual Turnover : $278.19 B</li> | ||
</ul> | ||
</div> | ||
</div> | ||
<h1 className="text-xl font-semibold text-start mx-5 my-3">Recruiter Details</h1> | ||
<div className="mx-10"> | ||
<RecruitersTable data={Recruiters?.recruiters} /> | ||
|
||
</div> | ||
|
||
</div></> | ||
|
||
)} | ||
|
||
|
||
</div> | ||
<div className="m-10"> | ||
<h1 className="text-center font-bold text-3xl my-5 py-5">Students</h1> | ||
<div> | ||
{AllStudents && ( | ||
<TableComponent | ||
isAddButton={true} | ||
AddButtonText={"Add Students"} | ||
data={AllStudents} | ||
columns={dynamicColumns} | ||
/> | ||
)} | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default CompanyPage; | ||
|
||
// http://tpc.iiti.ac.in/api/v1/companies/3f1d7e53-2069-4820-8d91-64b81f79cf7a/recruiters | ||
export default StudentPage; |
Oops, something went wrong.