From 71057cd7f8480c38b3dd12eb032c885455385a2f Mon Sep 17 00:00:00 2001 From: AryanGKulkarni <95529889+AryanGKulkarni@users.noreply.github.com> Date: Sun, 11 Aug 2024 14:04:48 +0530 Subject: [PATCH] tpc member fix --- src/app/(routes)/admin/jobs/[jobId]/page.tsx | 13 +++--- .../(routes)/recruiter/jobs/[jobID]/page.tsx | 8 ++-- src/app/(routes)/student/job/[jobId]/page.tsx | 8 ++-- src/components/Admin/AddForms.tsx | 10 ++--- src/components/Admin/types.tsx | 45 ++++++++++--------- .../NewTableComponent/NewJobModal.tsx | 8 ++-- src/helpers/recruiter/types.ts | 14 ++---- src/helpers/student/types.ts | 14 ++---- 8 files changed, 55 insertions(+), 65 deletions(-) diff --git a/src/app/(routes)/admin/jobs/[jobId]/page.tsx b/src/app/(routes)/admin/jobs/[jobId]/page.tsx index a6037264..6a80331c 100644 --- a/src/app/(routes)/admin/jobs/[jobId]/page.tsx +++ b/src/app/(routes)/admin/jobs/[jobId]/page.tsx @@ -1163,7 +1163,7 @@ const JobDetailPage = ({ params }: { params: { jobId: string } }) => {

- {coordinator.tpcMember.user.name} + {coordinator.tpcMember.student.user.name}
@@ -1172,15 +1172,15 @@ const JobDetailPage = ({ params }: { params: { jobId: string } }) => {
Department : - {coordinator.tpcMember.department} + {coordinator.tpcMember.student.program.department}
Email : - {coordinator.tpcMember.user.email} + {coordinator.tpcMember.student.user.email}
Contact : - {coordinator.tpcMember.user.contact} + {coordinator.tpcMember.student.user.contact}
@@ -1415,14 +1415,14 @@ const JobDetailPage = ({ params }: { params: { jobId: string } }) => { )} - + {/* */}
{facultyDropDown[salaryIndex] && ()}
+ {approvalModal && (
diff --git a/src/app/(routes)/recruiter/jobs/[jobID]/page.tsx b/src/app/(routes)/recruiter/jobs/[jobID]/page.tsx index 341e1023..235dca8c 100644 --- a/src/app/(routes)/recruiter/jobs/[jobID]/page.tsx +++ b/src/app/(routes)/recruiter/jobs/[jobID]/page.tsx @@ -522,7 +522,7 @@ const JobDetailPage = ({ params }: { params: { jobID: string } }) => {

- {coordinator.tpcMember.user.name} + {coordinator.tpcMember.student.user.name}
@@ -531,15 +531,15 @@ const JobDetailPage = ({ params }: { params: { jobID: string } }) => {
Department : - {coordinator.tpcMember.department} + {coordinator.tpcMember.student.program.department}
Email : - {coordinator.tpcMember.user.email} + {coordinator.tpcMember.student.user.email}
Contact : - {coordinator.tpcMember.user.contact} + {coordinator.tpcMember.student.user.contact}
diff --git a/src/app/(routes)/student/job/[jobId]/page.tsx b/src/app/(routes)/student/job/[jobId]/page.tsx index d00770a0..e63344a3 100644 --- a/src/app/(routes)/student/job/[jobId]/page.tsx +++ b/src/app/(routes)/student/job/[jobId]/page.tsx @@ -286,11 +286,11 @@ const JobPage = ({ params }: { params: { jobId: string } }) => { {jobData?.jobCoordinators.map((coordinator, index) => ( - {coordinator.tpcMember.user.name} + {coordinator.tpcMember.student.user.name} {coordinator.role} - {coordinator.tpcMember.department} - {coordinator.tpcMember.user.email} - {coordinator.tpcMember.user.contact} + {coordinator.tpcMember.student.program.department} + {coordinator.tpcMember.student.user.email} + {coordinator.tpcMember.student.user.contact} ))} diff --git a/src/components/Admin/AddForms.tsx b/src/components/Admin/AddForms.tsx index 52fa1114..65390c48 100644 --- a/src/components/Admin/AddForms.tsx +++ b/src/components/Admin/AddForms.tsx @@ -12,7 +12,7 @@ const JobCoordinatorForm = ({ jobId }: { jobId: string }) => { const [role, setRole] = useState("PRIMARY"); const [loading, setLoading] = useState(true); const options = tpcMembers?.map((member) => ({ - label: `${member.user.name} ${member.user.email}`, + label: `${member.student.user.name} ${member.student.user.email}`, value: member.id, })); const jobRoleOptions = [ @@ -71,7 +71,7 @@ const JobCoordinatorForm = ({ jobId }: { jobId: string }) => { isSearchable className="mb-4 text-sm font-normal" /> - {coordinator && coordinator.user.name} + {coordinator && coordinator.student.user.name}
{coordinator && (
@@ -81,15 +81,15 @@ const JobCoordinatorForm = ({ jobId }: { jobId: string }) => {
Department : - {coordinator.department} + {coordinator.student.program.department}
Email : - {coordinator.user.email} + {coordinator.student.user.email}
Contact : - {coordinator.user.contact} + {coordinator.student.user.contact}