Skip to content

Commit

Permalink
Merge pull request #4 from djunicode/master
Browse files Browse the repository at this point in the history
Merge changes from upstream repo
  • Loading branch information
kanishkshah authored Jun 8, 2020
2 parents 910b495 + 5b03619 commit 4ae351b
Show file tree
Hide file tree
Showing 46 changed files with 994 additions and 938 deletions.
3 changes: 3 additions & 0 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion placementfrontend/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
<title>Placement Portal</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
31 changes: 16 additions & 15 deletions placementfrontend/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import StudentSU from './pages/StudentSU.js'
import StaffSU from './pages/StaffSU';
import AddDetails from './pages/AddDetails';
import DisplayDetails from './pages/DisplayDetails';
import StaffSU from './pages/StaffSU.js'
import Studentprofile from './pages/Studentprofile';
import PlacementCoDashboard from './pages/PlacementCoDashboard'
import Tpo2 from './pages/Tpo2';
Expand All @@ -19,21 +18,23 @@ function App() {
return (
<BrowserRouter>
<div className="App">
<StudentDashboardMain></StudentDashboardMain>
{/* <CompanyMain></CompanyMain>
<Route exact path='/' component={Login}>

{/*<Route exact path='/' component={Login}>
<Login />
</Route>
<Route exact path='/studentSignup' component={StudentSU}>
</Route>
<Route path='/staffSignup' component={StaffSU}>
</Route> */}
<AddDetails />
<DisplayDetails />
{/*<Tpo2 />*/}
<Tpo2 />
<Route exact path='/StudentDashboardMain' component={StudentDashboardMain}/>
<Route exact path='/' component={Login}></Route>
<Route exact path='/studentSignup' component={StudentSU}/>
<Route path='/staffSignup' component={StaffSU}/>

<Route exact path='/add' component={AddDetails}/>
<Route exact path='/display' component={DisplayDetails}/>

<Route exact path='/CompanyMain' component={CompanyMain}/>
<Route exact path='/Tpo2' component={Tpo2}/>

{/* Routes yet to be setup*/}
<Route exact path='/PlacementCoDashboard' component={PlacementCoDashboard}/>
<Route exact path='/Studentprofile' component={Studentprofile}/>

{/* <Link to="/" style={{ textDecoration: 'none' }} /> */}
</div>

</BrowserRouter>
Expand Down
46 changes: 46 additions & 0 deletions placementfrontend/src/components/AddComp_Companies.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import React from 'react';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faChevronDown } from '@fortawesome/free-solid-svg-icons'
import '../css_styling/addComp.css';
import Empty from '../assets/empty.jpg';

const Companies = ({companies, showMore,showItems}) => {
const companyList = companies.length ? (
companies.slice(0,showItems).map(company => {
return (

<div className="addComp_collection-item" key={company.id}>
<div className="addComp_gridComp">
<img src={Empty} alt="default"/>
</div>
<div className="addComp_gridComp">
<p>Name : {company.name}</p>
<p>Category : {company.category}</p>
<p>Link : {company.link}</p>
</div>

{/* <span onClick={() => {deleteCompany(company.id)}}>{company.content}</span> */}
</div>
)
})
) : (
<p className="center">No companies to show</p>
);

return (
<div className="addComp_bgw1">
<div className="grid-item">
<h4 style={{fontWeight:600}}>COMPANIES</h4>
<div className="addComp_list">
{companyList}
<div className="addComp_more addComp_center">
<button className="addComp_downIcon" onClick={ showMore} > <FontAwesomeIcon icon={faChevronDown} /></button></div>
</div>

</div>

</div>
)
}

export default Companies;
42 changes: 22 additions & 20 deletions placementfrontend/src/components/AddCompanies.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { Component } from 'react';
import '../css_styling/addComp.css'
import '../css_styling/addComp.css';
import { withRouter} from 'react-router-dom';
class AddCompanies extends Component {
state = {
name: null,
Expand Down Expand Up @@ -41,23 +42,24 @@ class AddCompanies extends Component {

handleAddMore=(e)=>
{
{

this.setState((prevState) =>({addFields:[...prevState.addFields,{
position:"",
noOfPos:"",
Interviewdate:"",
deadline:"",
package:"",
addDets:""}]}));
}

// e.preventDefault();
// var text= document.getElementById('wrapper').innerHTML
// document.getElementById('wrapper').innerHTML += text;
}
handleSubmit = (e) => {
e.preventDefault();
this.props.addCompanies(this.state);
console.log(this.state)
console.log(this.state);
this.props.history.push('/display');
}
onFocus= (e)=>{
e.currentTarget.type = "date";
Expand All @@ -68,33 +70,33 @@ onBlur=(e)=>{
}
render() {
return (
<div className="bgwAdd">
<h4 className="leftalign" style={{fontWeight:700}}>ADD COMPANY</h4>
<div className="addComp_bgwAdd">
<h4 className="leftalign" style={{fontWeight:600}}>ADD COMPANY</h4>
<div className="grid-item"><form onSubmit={this.handleSubmit}>
<div className="addCompGrid">
<input type="text" placeholder="Name:" onChange={this.handleChange} name="name" required/>
<div className="addComp_addCompGrid">
<input type="text" className="addComp_addInput" placeholder="Name:" onChange={this.handleChange} name="name" required/>
<select className="form-control" id="exampleFormControlSelect1"placeholder="Category:" onChange={this.handleChange} name="category" required>
<option disabled selected hidden>Category:</option>
<option>Super-Dream</option>
<option>Dream</option>
<option>Regular</option>
</select></div>
<div className="addMore" >
<div className="addComp_addMore" >
{
this.state.addFields.map((field,index)=>{
let position = `position-${index}`, addDets = `addDets-${index}` ,packages = `packages-${index}`,deadline = `deadline-${index}`,Interviewdate = `Interviewdate-${index}` , noOfPos = `noOfPos-${index}`
return(

<div key={index}>

<div className="addMoreGrid">
<input type="text" className="addInput"placeholder="Position:" onChange={this.handleChange} data-id={index} id={position} name="position" required/>
<input type="number" className="addInput"placeholder="Number Of Position:" onChange={this.handleChange} data-id={index} id={noOfPos} name="noOfPos" required min="0" />
<input type="text"className="addInput"placeholder="Interview Date:" onFocus = {this.onFocus} onBlur={this.onBlur} onChange={this.handleChange} data-id={index} id={Interviewdate} name="Interviewdate" required />
<input type="text"className="addInput"placeholder="Deadline:" onFocus = {this.onFocus} onBlur={this.onBlur} onChange={this.handleChange} data-id={index} id={deadline} name="deadline" required />
<input type="text"className="addInput" placeholder="Package:" onChange={this.handleChange} name="package" data-id={index} id={packages} required/>
<div className="addComp_addMoreGrid">
<input type="text" className="addComp_addInput"placeholder="Position:" onChange={this.handleChange} data-id={index} id={position} name="position" required/>
<input type="number" className="addComp_addInput"placeholder="Number Of Position:" onChange={this.handleChange} data-id={index} id={noOfPos} name="noOfPos" required min="0" />
<input type="text"className="addComp_addInput"placeholder="Interview Date:" onFocus = {this.onFocus} onBlur={this.onBlur} onChange={this.handleChange} data-id={index} id={Interviewdate} name="Interviewdate" required />
<input type="text"className="addComp_addInput"placeholder="Deadline:" onFocus = {this.onFocus} onBlur={this.onBlur} onChange={this.handleChange} data-id={index} id={deadline} name="deadline" required />
<input type="text"className="addComp_addInput" placeholder="Package:" onChange={this.handleChange} name="package" data-id={index} id={packages} required/>
</div>
<input type="text" className="addInput"placeholder="Add Details" onChange={this.handleChange} name="addDets" data-id={index} id={addDets} required />
<input type="text" className="addComp_addInput"placeholder="Add Details" onChange={this.handleChange} name="addDets" data-id={index} id={addDets} required />


</div>
Expand All @@ -106,9 +108,9 @@ onBlur=(e)=>{
})
}

<button className="addMoreBtn" onClick={this.handleAddMore}><span className="center" style={{marginBottom:'5px'}}>+</span></button> </div>
<input type="text"className="addInput" placeholder="Link:" onChange={this.handleChange} name="link" required/>
<button className="submit ">ADD</button>
<button className="addComp_addMoreBtn" onClick={this.handleAddMore}><span className="addComp_center" style={{marginBottom:'5px'}}>+</span></button> </div>
<input type="text"className="addComp_addInput" placeholder="Link:" onChange={this.handleChange} name="link" required/>
<button className="addComp_submit "> ADD</button>

</form>
</div>
Expand All @@ -119,4 +121,4 @@ onBlur=(e)=>{
}
}

export default AddCompanies;
export default withRouter(AddCompanies);
20 changes: 20 additions & 0 deletions placementfrontend/src/components/AddDets_Sidenav.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import React from 'react';
import Profile from '../assets/default.png';
import '../css_styling/addComp.css';



function SidenavR(){
return(

<div className="container">
<div className="profimg">
<img src={Profile} alt="img" className="SidenavR_center SidenavR_imgno" />
<h4 className="SidenavR_center"> ADMIN</h4>
<p className="SidenavR_center">........</p>
</div>
</div>

)}

export default SidenavR;
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import React from 'react';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faSearch } from '@fortawesome/free-solid-svg-icons'
import '../css_styling/display.css'
import '../css_styling/addComp.css';
import {Link} from 'react-router-dom';


function Nav2(){
function NavR(){
return(
<div className="topnav">
<a className="active" href="#home">NAME</a>
<a href="#about">APPLICANTS</a>

<div className="NavR_topnav">
<Link to="/add" className ="NavR_anchor"style={{ textDecoration: 'none' }} >RECRUITERS</Link>
<Link to="/Tpo2" className ="NavR_anchor"style={{ textDecoration: 'none' }} >STUDENTS</Link>
<form>

<div className="search-container">
<div className="NavR_search-container">
<input type="text" placeholder="Search"/>
<FontAwesomeIcon icon={faSearch} />
<FontAwesomeIcon icon={faSearch} className="searchIcon" />
</div>
</form>

Expand All @@ -30,4 +30,5 @@ function Nav2(){
</div>

)}
export default Nav2;
export default NavR;

34 changes: 34 additions & 0 deletions placementfrontend/src/components/AddDets_navbar2.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import React from 'react';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faSearch } from '@fortawesome/free-solid-svg-icons'
import '../css_styling/display.css';
import {Link} from 'react-router-dom';


function NavR2(){
return(
<div className="NavR2_topnav">
<Link to="/display" className ="NavR2_anchor" style={{ textDecoration: 'none' }} >NAME</Link>
<Link to="/CompanyMain" className ="NavR2_anchor" style={{ textDecoration: 'none' }} >APPLICANTS</Link>

<form>

<div className="NavR2_search-container">
<input type="text" placeholder="Search"/>
<FontAwesomeIcon icon={faSearch} className="searchIcon" />
</div>
</form>

{/* <div className="search-container">
<form >
<div className="inner-addon right-addon">
<FontAwesomeIcon icon={faCoffee} />
<input type="text" placeholder="Name:" name="name" required/>
</div>
</form>
</div> */}
</div>

)}
export default NavR2;
26 changes: 13 additions & 13 deletions placementfrontend/src/components/Body.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,36 +32,36 @@ class Body extends Component{
<div className="row py-4">
</div>
<div className="row m-3 ">
<div className="col-12 pt-3 box">
<div className="col-10 p-0 inner_box ">
<img src={dummy} alt="profile" className="pic2" />
<h2 className="head">{student.fname} {student.lname}</h2>
<div className="col-12 pt-3 Studentprofile_box">
<div className="col-10 p-0 Studentprofile_inner_box ">
<img src={dummy} alt="profile" className="Studentprofile_pic2" />
<h2 className="Studentprofile_head">{student.fname} {student.lname}</h2>
<div className="row">
<div className="col-12">
<form onSubmit={this.handleSubmit}>
<div className="details">
<div className="Studentprofile_details">
<label>First Name : </label>
<input type="text" name="fname" className ="studentdisplay " defaultValue={student.fname} placeholder="First Name" onChange={this.handleChange} required/>
<input type="text" name="fname" className ="Studentprofile_studentdisplay " defaultValue={student.fname} placeholder="First Name" onChange={this.handleChange} required/>
<br />
<label>Last Name : </label>
<input type="text" name="lname" className ="studentdisplay " defaultValue={student.lname} placeholder="Last Name" onChange={this.handleChange} required/>
<input type="text" name="lname" className ="Studentprofile_studentdisplay " defaultValue={student.lname} placeholder="Last Name" onChange={this.handleChange} required/>
<br />
<label className="align1">SAP ID : </label>
<input type="text" name="sap" className =" align1 studentdisplay " defaultValue={student.sap} placeholder="Sap-Id" onChange={this.handleChange} required/>
<input type="text" name="sap" className =" Studentprofile_align1 Studentprofile_studentdisplay " defaultValue={student.sap} placeholder="Sap-Id" onChange={this.handleChange} required/>
<br />
<label className="align2">Pointer :</label>
<input type="text" name="ptr" className ="align2 studentdisplay " defaultValue={student.ptr} placeholder="Pointer" onChange={this.handleChange} required/>
<input type="text" name="ptr" className ="Studentprofile_align2 Studentprofile_studentdisplay " defaultValue={student.ptr} placeholder="Pointer" onChange={this.handleChange} required/>
<br />
<label className="align3">Department :</label>
<input type="text" name="dept" className ="align3 studentdisplay " defaultValue={student.dept} placeholder=" Department" onChange={this.handleChange} required/>
<input type="text" name="dept" className ="Studentprofile_align3 Studentprofile_studentdisplay " defaultValue={student.dept} placeholder=" Department" onChange={this.handleChange} required/>
<br />
<label className="align4">Year : </label>
<input type="text" name="year" className ="align4 studentdisplay " defaultValue={student.year} placeholder=" Year" onChange={this.handleChange} required/>
<input type="text" name="year" className ="Studentprofile_align4 Studentprofile_studentdisplay " defaultValue={student.year} placeholder=" Year" onChange={this.handleChange} required/>
<br />
<label className="align5">Email ID: </label>
<input type="text" name="mail" className ="align5 studentdisplay " defaultValue={student.mail} placeholder="Email-Id" onChange={this.handleChange} required/>
<input type="text" name="mail" className ="Studentprofile_align5 Studentprofile_studentdisplay " defaultValue={student.mail} placeholder="Email-Id" onChange={this.handleChange} required/>

<br /><br /><button className="edit">Update</button>
<br /><br /><button className="Studentprofile_edit">Update</button>
</div>
</form>
</div>
Expand Down
16 changes: 8 additions & 8 deletions placementfrontend/src/components/Companies.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,26 @@ import React from 'react';
const Companies = ({ companies, showCompanies, handleShowMoreCompanies }) => {
const list = companies.slice(0, showCompanies).map(company => {
return (
<div className="collection-item" key={company.id}>
<div className="gridComp">
<img src="https://www.generationsforpeace.org/wp-content/uploads/2018/03/empty.jpg" className="listpic" />
<div className="Tpo2_collection-item" key={company.id}>
<div className="Tpo2_gridComp">
<img src="https://www.generationsforpeace.org/wp-content/uploads/2018/03/empty.jpg" className="Tpo2_listpic" />
</div>
<div className="gridComp">
<div className="Tpo2_gridComp">
<p>Name : {company.name}</p>
<p>Position : {company.pos}</p>
</div>
</div>
)
})
return (
<div className="bgw1">
<div className="Tpo2_bgw1">
<div className="grid-item">
<h4>COMPANIES</h4>
<div className="list">
<div className="Tpo2_list">
{list}
</div>
<div className="show">
<button className="button_display" onClick={handleShowMoreCompanies}><i className="fa fa-chevron-down"></i></button>
<div className="Tpo2_show">
<button className="Tpo2_button_display" onClick={handleShowMoreCompanies}><i className="fa fa-chevron-down"></i></button>
</div>
</div>
</div>
Expand Down
Loading

0 comments on commit 4ae351b

Please sign in to comment.