Skip to content

Commit

Permalink
Merge pull request #102 from nishantarora23/feature-39/select-candidate
Browse files Browse the repository at this point in the history
#39 Update Home Route and db changes
  • Loading branch information
nishantarora23 committed Jul 31, 2023
2 parents df5ad1a + d82441d commit f64a7ec
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
5 changes: 3 additions & 2 deletions src/main/java/Database/JobDAO.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ public static ArrayList<Job> getJob(String username){
job.setUsername(resultSet.getString("EMPLOYER"));
job.setSalaryRange(resultSet.getString("SALARY_RANGE"));
job.setTitle(resultSet.getString("TITLE"));
job.setStatus(resultSet.getString("STATUS"));

jobList.add(job);
}
Expand Down Expand Up @@ -171,8 +172,8 @@ public static void update(Job job) {
statement.setString(7, job.getDeadline());
statement.setString(8, job.getContractType());
statement.setString(9, job.getUsername());
statement.setString(10, Integer.toString(job.getID()));
statement.setString(11,job.getStatus());
statement.setString(10,job.getStatus());
statement.setString(11, Integer.toString(job.getID()));
statement.executeUpdate();
} catch (SQLException e) {
e.printStackTrace();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,11 @@ const Applicants = () => {
<div>
<Button
component={Link}
to={"/employer/Applicants"}
to={"/employer/home"}
color="primary"
sx={{ fontSize: "1.1rem" }}
>
<PersonIcon sx={{ marginRight: "10px" }} /> Applicants
<PersonIcon sx={{ marginRight: "10px" }} /> Home
</Button>
</div>
</Card>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ const EmployerHome = () => {
<div>
<Button
component={Link}
to={"/employer/Applicants"}
to={"/employer/home"}
color="primary"
sx={{ fontSize: "1.1rem" }}
>
<PersonIcon sx={{ marginRight: "10px" }} /> Applicants
<PersonIcon sx={{ marginRight: "10px" }} /> Home
</Button>
</div>
</Card>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,9 @@ const EmployerJobOffers = () => {

const handleDelete = (id: string | number): void => {
deleteJobOffer(id)
.then((res) => {alert("Job Offer has been Deleted"); navigate("/employer/jobOffers")})
.then((res) => {alert("Job Offer has been Deleted"); window.location.reload()})
.catch(err => console.log(err));

}

const handleNavigateToApplicants = (id: string | number): void => {
Expand Down Expand Up @@ -166,11 +167,11 @@ const EmployerJobOffers = () => {
<div>
<Button
component={Link}
to={"/employer/Applicants"}
to={"/employer/home"}
color="primary"
sx={{ fontSize: "1.1rem" }}
>
<PersonIcon sx={{ marginRight: "10px" }} /> Applicants
<PersonIcon sx={{ marginRight: "10px" }} /> Home
</Button>
</div>
</Card>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ const EmployerHome = () => {
<div>
<Button
component={Link}
to={"/employer/Applicants"}
to={"/employer/home"}
color="primary"
sx={{ fontSize: "1.1rem" }}
>
<PersonIcon sx={{ marginRight: "10px" }} /> Applicants
<PersonIcon sx={{ marginRight: "10px" }} /> Home
</Button>
</div>
</Card>
Expand Down

0 comments on commit f64a7ec

Please sign in to comment.