From 87c3cc71f4276eeb7ffe6306679f0c5cba9ff80c Mon Sep 17 00:00:00 2001 From: princekumarofficial Date: Mon, 17 Jun 2024 22:32:05 +0530 Subject: [PATCH] Faculty view api fix --- src/app/(routes)/faculty/page.tsx | 16 ++++------------ src/components/Faculty/FeedbackFrom.tsx | 16 +++++++++------- src/components/ui/dialog.tsx | 12 ++++++------ src/helpers/faculty/api.ts | 12 +++++++++--- 4 files changed, 28 insertions(+), 28 deletions(-) diff --git a/src/app/(routes)/faculty/page.tsx b/src/app/(routes)/faculty/page.tsx index 444bbc43..38783f0b 100644 --- a/src/app/(routes)/faculty/page.tsx +++ b/src/app/(routes)/faculty/page.tsx @@ -5,32 +5,24 @@ import TableComponent from "@/components/TableComponent/TableComponent"; import generateColumns from "@/components/TableComponent/ColumnMapping"; import { useState, useEffect } from "react"; import loadingImg from "@/components/Faculty/loadingSpinner.svg"; +import { number } from "yup"; const dto = [ { status: "string", remarks: "string", - faculty: { - department: "string", - user: { - email: "string", - name: "string", - contact: "string", - }, - }, salary: { salaryPeriod: "string", totalCTC: "number", job: { role: "string", - joiningDate: "string", + company: { + name: "string", + }, season: { year: "string", type: "string", }, - company: { - name: "string", - }, }, }, }, diff --git a/src/components/Faculty/FeedbackFrom.tsx b/src/components/Faculty/FeedbackFrom.tsx index 7d9b01bb..ad8567f1 100644 --- a/src/components/Faculty/FeedbackFrom.tsx +++ b/src/components/Faculty/FeedbackFrom.tsx @@ -24,11 +24,13 @@ interface ButtonProps { } const UpdateApprovalPATCH = (rows: any[], remarks: string, status: string) => { - var allAppArray: any[] = []; for (var i = 0; i < rows.length; i++) { - allAppArray.push({ id: rows[i].id, remarks, status }); + updateApproval(Cookies.get("accessToken"), { + id: rows[i].id, + remarks: remarks, + status: status, + }); } - updateApproval(Cookies.get("accessToken"), allAppArray); window.location.reload(); }; @@ -41,7 +43,7 @@ const AcceptButton: React.FC = ({ return (