Skip to content

Commit

Permalink
Merge pull request #27 from rupalisingh/Alpha
Browse files Browse the repository at this point in the history
#13 [ Responsiveness ]: UI enhancement and responsiveness for Screens (Admin Apply)
  • Loading branch information
yasharth291 authored Feb 1, 2022
2 parents 0d0309c + 03248cc commit c744491
Show file tree
Hide file tree
Showing 5 changed files with 13,082 additions and 5 deletions.
57 changes: 57 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
},
"devDependencies": {
"@types/react": "^17.0.37",
"@types/react-alert": "^5.2.1",
"@types/react-dom": "^17.0.11",
"@types/react-router-dom": "^5.3.2"
}
Expand Down
12 changes: 9 additions & 3 deletions src/Screens/Admin Apply/Admin_Apply.jsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
/* eslint-disable react/no-unescaped-entities */
import React, { Component } from 'react';
import '../../index.css';
import '../../css/home.css';
import '../../css/login.css';
import 'bootstrap/dist/css/bootstrap.min.css';
import axios from 'axios';
import ReactLoading from 'react-loading';

const l = window.location.href;
const a = l.split('=');
console.log(a[1]); // above console log
console.log(a[1]); // above console log ---- Company id
const arr = JSON.parse(localStorage.getItem('college') || '{}');

class adminapply extends Component {
constructor(props) {
super(props);
Expand All @@ -22,6 +25,7 @@ class adminapply extends Component {
job_id: a[1],
college_id: arr._id,
};
console.log(body);
const header = {
'Content-Type': 'application/json',
'Accept-Encoding': 'gzip, deflate, br',
Expand All @@ -47,7 +51,7 @@ class adminapply extends Component {
console.error('There was an error!');
});
axios
.post('https://camprec.herokuapp.com/api/college/jaccept', body, {
.post('http://localhost:4000/api/college/jaccept', body, {
headers: { header },
})
.then((response) => {
Expand All @@ -62,6 +66,7 @@ class adminapply extends Component {
this.setState({
k: true,
});
//alert('Thank you for applying!');
}, adminapply.bind)
.catch((error) => {
console.error('There was an error!');
Expand All @@ -76,7 +81,8 @@ class adminapply extends Component {
return (
<>
{this.state.k ? (
window.location.replace('/admincompanies')
(alert('Thank you for applying'),
window.location.replace('/admincompanies'))
) : (
<section className="pop image width">
<div className="load">
Expand Down
11 changes: 9 additions & 2 deletions src/Screens/Admin Jobs Page/Admin_Jobs_Page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,18 @@ function Cards(props: cardsProps) {
<p className="card-text">{props.content}</p>
<div className="pop">
{prem.job.includes(props.job_id) ? (
<a href="#" className="btn btn-primary text_size left_m2 dis">
<a
href="javascript: alert('You have already Applied to this Job.')"
className="btn btn-primary text_size left_m2 dis"
>
Applied
</a>
) : (
<a href={k} className="btn btn-primary text_size left_m2">
<a
//href="javascript: alert('Thank You for Applying')"
href={k}
className="btn btn-primary text_size left_m2"
>
Apply
</a>
)}
Expand Down
Loading

0 comments on commit c744491

Please sign in to comment.