@@ -92,7 +97,7 @@ const AdminCompanyTable = () => {
return (
-
Company table
+
Company records
@@ -105,50 +110,17 @@ const AdminCompanyTable = () => {
-
+ {/*
Company name |
Job |
Round |
Update |
- {/* Schedule | */}
Action |
- {/*
- Deutch Back |
- Software Development |
- Round - 5 |
-
-
- |
- 25/11/2022 |
- View |
-
*/}
- {/* {companyTable.map((company, key) => (
-
- {company.name} |
- {company.profile} |
- { (company.currentRound === company.totalRounds) ? "Complete" : (!company.currentRound) ? "Upcoming" : `Round - ${company.currentRound}` } |
-
-
- |
- {/* {company.currentRound >= company.totalRounds ? "Completed" : !company.currentRound ? company.driveDetails[0].date : company.driveDetails[company.currentRound + 1].date } |
- View |
-
- ))} */}
{companyTable.filter(company => company.name.toLowerCase().includes(searchQuery.toLowerCase())).map((company => (
@@ -163,13 +135,35 @@ const AdminCompanyTable = () => {
- {/* {company.currentRound >= company.totalRounds ? "Completed" : !company.currentRound ? company.driveDetails[0].date : company.driveDetails[company.currentRound + 1].date } | */}
+
View |
)))}
-
+
*/}
+
+
+ {companyTable.filter(company => company.name.toLowerCase().includes(searchQuery.toLowerCase())).map((company=>(
+
+
+
+
{company.name}
+
+
+
+ {company.jobDescriptions.length ? company.jobDescriptions.map((desc=>(
+ - {desc.name} : round - {desc.currentRound} Link
+ ))) : "No job opening record available"}
+
+
+
+
+
+
+
+ )))}
+
)
diff --git a/src/pages/admin/addCompany/AddJobOpen.js b/src/pages/admin/addCompany/AddJobOpen.js
index 32c9aea..a24391a 100644
--- a/src/pages/admin/addCompany/AddJobOpen.js
+++ b/src/pages/admin/addCompany/AddJobOpen.js
@@ -1,14 +1,19 @@
import { useState } from "react";
import "../../../assets/css/admincompanytable.css";
import "../../../assets/css/studentprofile.css"
+import { Link, useLocation } from 'react-router-dom';
const AddJobOpen = () => {
+
+ const location = useLocation();
+ const state = location.state;
+ console.log(state.companyId);
const [company, setCompany] = useState({
ctc: "",
- profile: "",
+ name: "",
totalRounds: "",
currentRound: 0,
- startDate: "",
+ // startDate: "",
endDate: "",
criteria: {
branch: {
diff --git a/src/pages/admin/addCompany/BasicForm.js b/src/pages/admin/addCompany/BasicForm.js
index 6521d2a..3d740e9 100644
--- a/src/pages/admin/addCompany/BasicForm.js
+++ b/src/pages/admin/addCompany/BasicForm.js
@@ -1,7 +1,7 @@
import { useState } from "react";
import "../../../assets/css/admincompanytable.css";
import "../../../assets/css/studentprofile.css"
-
+import axios from "axios";
const BasicForm = () => {
const [company, setCompany] = useState({
@@ -11,10 +11,24 @@ const BasicForm = () => {
companyLocation: "",
});
+ const handleSubmit = async (e) => {
+ e.preventDefault();
+
+ await axios.post('http://localhost:8080/company/add', company,{withCredentials:true})
+ .then((res)=>{
+ console.log("Res: ",res);
+ alert("Company added successfully!");
+ window.location.reload();
+ })
+ .catch((err)=>{
+ console.log("err: ",err);
+ })
+ }
+
return (
Fill the company details
-