Skip to content

Commit

Permalink
add profile hreader menu login
Browse files Browse the repository at this point in the history
  • Loading branch information
Anis KCHAOU committed Apr 7, 2021
1 parent df656b8 commit 28ffd7f
Show file tree
Hide file tree
Showing 34 changed files with 861 additions and 519 deletions.
2 changes: 1 addition & 1 deletion .eslintcache

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/App.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

.App {
text-align: center;
}
Expand Down
Binary file added src/back.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/main/config/user.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export default class User {
static USER_NAME = "Admin"
static CONNECTED_USER = false
}
2 changes: 1 addition & 1 deletion src/main/mocks/ApplyJobTestService.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const _applyJob = []
const _applyJob = [{ "full_name": "Martine Clavette", "email": "matine@gmail.com", "phone": "06 23 44 56 33" }]

const getAll = () => {
return _applyJob;
Expand Down
2 changes: 1 addition & 1 deletion src/main/mocks/CategoryTestService.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const _categories = []
const _categories = [{ "category": "informatique" }]

const getAll = () => {
return _categories;
Expand Down
2 changes: 1 addition & 1 deletion src/main/mocks/InterviewTestService.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const _interview = []
const _interview = [{ "candidates": "Jack Doe", "scheduleDate": "12/10/2021" }]

const getAll = () => {
return _interview;
Expand Down
5 changes: 4 additions & 1 deletion src/main/mocks/JobTestService.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
const _jobs = []
const _jobs = [{
"post": "Développeur Web", "location": "Paris",
"start": "11/10/2020", "end": "11/11/2020", "state": "Active"
}]

const getAll = () => {
return _jobs;
Expand Down
2 changes: 1 addition & 1 deletion src/main/mocks/SkillTestService.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const _skills = []
const _skills = [{ "skills": "PHP", "category_id": "Développement" }]

const getAll = () => {
return _skills;
Expand Down
2 changes: 1 addition & 1 deletion src/main/mocks/StaffTestService.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const _staff = []
const _staff = [{ "email": "GregoireMoquin@armyspy.com", "full_name": "recruteur" }]

const getAll = () => {
return _staff;
Expand Down
2 changes: 1 addition & 1 deletion src/main/mocks/TaskTestService.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const _tasks = []
const _tasks = [{ "id": 1, "title": "Task 1", "status": "en cours" }]

const getAll = () => {
return _tasks;
Expand Down
1 change: 0 additions & 1 deletion src/main/shared/Content/Content.css
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
.Content {}
62 changes: 39 additions & 23 deletions src/main/shared/Content/Content.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,47 @@ import Skill from '../../../modules/skill/Skill/Skill';
import Staff from '../../../modules/staff/Staff/Staff';
import Task from '../../../modules/task/Task/Task';
import DashBoard from '../../../modules/shared/DashBoard/DashBoard';
import { Route } from "react-router-dom"
import { Route } from "react-router-dom"
import ApplyJob from '../../../modules/applyjob/ApplyJob/ApplyJob';
import Login from '../Login/Login';
import User from '../../config/user';
import AddJob from '../../../modules/job/AddJob/AddJob';
import AddInterview from '../../../modules/interview/AddInterview/AddInterview';
import AddTask from '../../../modules/task/AddTask/AddTask';
import Profile from '../../../modules/shared/Profile/Profile';

const Content = () => (
<div className="col-md-12">


<Route exact path="/" component={DashBoard} />
<Route exact path="/dashboard" component={DashBoard} />
<Route exact path="/category" component={Category} />
<Route exact path="/apply" component={ApplyJob} />
<Route exact path="/candidate" component={Candidate} />
<Route exact path="/interview" component={Interview} />
<Route exact path="/job" component={Job} />
<Route exact path="/location" component={Location} />
<Route exact path="/skill" component={Skill} />
<Route exact path="/staff" component={Staff} />
<Route exact path="/task" component={Task} />
<Route exact path="/configuration" component={Configuration} />





</div>
const Content = (props) => (
<div style={{ display: (User.CONNECTED_USER ? 'block' : 'none') }} className="content" >
<div className="animated fadeIn">
<div className="row">
<div className="col-md-12">


<Route exact path="/" component={DashBoard} />
<Route exact path="/dashboard" component={DashBoard} />
<Route exact path="/category" component={Category} />
<Route exact path="/apply" component={ApplyJob} />
<Route exact path="/candidate" component={Candidate} />
<Route exact path="/interview" component={Interview} />
<Route exact path="/job" component={Job} />
<Route exact path="/location" component={Location} />
<Route exact path="/skill" component={Skill} />
<Route exact path="/staff" component={Staff} />
<Route exact path="/task" component={Task} />
<Route exact path="/configuration" component={Configuration} />
<Route exact path="/profile" component={Profile} />
<Route exact path="/login" component={Login} />
<Route exact path="/add-job" component={AddJob} />
<Route exact path="/add-task" component={AddTask} />
<Route exact path="/add-interview" component={AddInterview} />




</div>
</div>
</div>
</div>
);

Content.propTypes = {};
Expand Down
1 change: 0 additions & 1 deletion src/main/shared/Footer/Footer.css
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
.Footer {}
29 changes: 15 additions & 14 deletions src/main/shared/Footer/Footer.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
import React from 'react';
import PropTypes from 'prop-types';
import './Footer.css';
import User from '../../config/user';

const Footer = () => (

const Footer = (props) => (

<footer className="site-footer">
<div className="footer-inner bg-white">
<div className="row">
<div className="col-sm-6">
Developed by <a href="https://github.com/aniskchaou">Anis KCHAOU</a>
</div>
<div className="col-sm-6 text-right">
Designed by <a href="https://colorlib.com">Colorlib</a>
</div>
</div>
</div>
</footer>

<footer style={{ display: (User.CONNECTED_USER ? 'block' : 'none') }} className="site-footer">
<div className="footer-inner bg-white">
<div className="row">
<div className="col-sm-6">
Developed by <a href="https://github.com/aniskchaou">Anis KCHAOU</a>
</div>
<div className="col-sm-6 text-right">
Designed by <a href="https://colorlib.com">Colorlib</a>
</div>
</div>
</div>
</footer>
);

Footer.propTypes = {};
Expand Down
188 changes: 111 additions & 77 deletions src/main/shared/Header/Header.js
Original file line number Diff line number Diff line change
@@ -1,82 +1,116 @@
import React from 'react';
import React, { useEffect, useState } from 'react';
import PropTypes from 'prop-types';
import './Header.css';
import { NavLink } from 'react-router-dom';

const Header = () => (
<div id="right-panel" className="right-panel">
<header id="header" className="header">
<div className="top-left">
<div className="navbar-header">
<a className="navbar-brand" href="./"><img src="images/logo.png" alt="Logo" /></a>
<a className="navbar-brand hidden" href="./"><img src="images/logo2.png" alt="Logo" /></a>
<a id="menuToggle" className="menutoggle"><i className="fa fa-bars"></i></a>
</div>
</div>
<div className="top-right">
<div className="header-menu">
<div className="header-left">
<button className="search-trigger"><i className="fa fa-search"></i></button>
<div className="form-inline">
<form className="search-form">
<input className="form-control mr-sm-2" type="text" placeholder="Search ..." aria-label="Search"/>
<button className="search-close" type="submit"><i className="fa fa-close"></i></button>
</form>
</div>

<div className="dropdown for-notification">
<button className="btn btn-secondary dropdown-toggle" type="button" id="notification" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i className="fa fa-bell"></i>
<span className="count bg-danger">3</span>
</button>
<div className="dropdown-menu" aria-labelledby="notification">
<p className="red">Vous avez 3 notifications</p>
<a className="dropdown-item media" href="#">
<i className="fa fa-check"></i>
<p>Server #1 overloaded.</p>
</a>

</div>
</div>

<div className="dropdown for-message">
<button className="btn btn-secondary dropdown-toggle" type="button" id="message" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i className="fa fa-envelope"></i>
<span className="count bg-primary">4</span>
</button>
<div className="dropdown-menu" aria-labelledby="message">
<p className="red">Vous avez 3 messages</p>
<a className="dropdown-item media" href="#">
<span className="photo media-left"><img alt="avatar" src="images/avatar/1.jpg"/></span>
<div className="message media-body">
<span className="name float-left">Jonathan Smith</span>
<span className="time float-right">Maintenant</span>
<p>Bonjour, Comment allez vous ?</p>
</div>
</a>

</div>
</div>
</div>

<div className="user-area dropdown float-right">
<a href="#" className="dropdown-toggle active" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<img className="user-avatar rounded-circle" src="images/admin.png" alt="User Avatar"/>
</a>

<div className="user-menu dropdown-menu">
<NavLink className="nav-link" to="/profile"><i className="fa fa-user"></i>Mon Profile</NavLink>

<NavLink className="nav-link" to="/configuration"><i className="fa fa-cog"></i>Paramètres</NavLink>

<NavLink className="nav-link" to="/"><i className="fa fa-power-off"></i>Déconnexion</NavLink>
</div>
</div>
</div>
</div>
</header>
</div>
);
import { NavLink, useHistory } from 'react-router-dom';
import User from '../../config/user';
import TaskTestService from '../../mocks/TaskTestService';

const Header = (props) => {
let history = useHistory()
const [tasks, setTask] = useState([]);

const logout = () => {
props.rerender();
User.CONNECTED_USER = false
history.push("/login")
}

useEffect(() => {
retrievetasks()
}, []);

const retrievetasks = () => {
var tasks = TaskTestService.getAll();
setTask(tasks);
};


return (
<div style={{ display: (User.CONNECTED_USER ? 'block' : 'none') }} id="right-panel" className="right-panel">
<header id="header" className="header">
<div className="top-left">
<div className="navbar-header">
<a className="navbar-brand" href="./"><img src="images/logo.png" alt="Logo" /></a>
<a className="navbar-brand hidden" href="./"><img src="images/logo2.png" alt="Logo" /></a>
<a id="menuToggle" className="menutoggle"><i className="fa fa-bars"></i></a>
</div>
</div>
<div className="top-right">
<div className="header-menu">
<div className="header-left">
<button className="search-trigger"><i className="fa fa-search"></i></button>
<div className="form-inline">
<form className="search-form">
<input className="form-control mr-sm-2" type="text" placeholder="Search ..." aria-label="Search" />
<button className="search-close" type="submit"><i className="fa fa-close"></i></button>
</form>
</div>

<div className="dropdown for-notification">
<button className="btn btn-secondary dropdown-toggle" type="button" id="notification" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="fas fa-puzzle-piece"></i>
</button>
<div className="dropdown-menu" aria-labelledby="notification">
<p className="red">Accés rapide</p>
<NavLink to="/add-job" className="dropdown-item media" >
<i class="fas fa-plus-circle"></i>
<p>Ajouter une offre d'emploi</p>
</NavLink>
<NavLink to="/add-interview" className="dropdown-item media" >
<i class="fas fa-plus-circle"></i>
<p>Ajouter un entretien</p>
</NavLink>
<NavLink to="/add-task" className="dropdown-item media">
<i class="fas fa-plus-circle"></i>
<p>Ajouter une tache</p>
</NavLink>
</div>
</div>

<div className="dropdown for-message">
<button className="btn btn-secondary dropdown-toggle" type="button" id="message" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="fas fa-tasks"></i>
<span className="count bg-primary">4</span>
</button>
<div className="dropdown-menu" aria-labelledby="message">
<p className="red">Taches</p>

{tasks.map(item =>
<NavLink className="dropdown-item media" to="/task">

<div className="message media-body">
<span className="name float-left">{item.title}</span>
<span className="time float-right">En cours</span>

</div>
</NavLink>
)}



</div>
</div>
</div>

<div className="user-area dropdown float-right">
<a href="#" className="dropdown-toggle active" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<img className="user-avatar rounded-circle" src="images/admin.png" alt="User Avatar" />
</a>

<div className="user-menu dropdown-menu">
<NavLink className="nav-link" to="/profile"><i className="fa fa-user"></i>Mon Profile</NavLink>

<NavLink className="nav-link" to="/configuration"><i className="fa fa-cog"></i>Paramètres</NavLink>

<NavLink onClick={logout} className="nav-link" to="/"><i className="fa fa-power-off"></i>Déconnexion</NavLink>
</div>
</div>
</div>
</div>
</header>
</div>
)
};

Header.propTypes = {};

Expand Down
4 changes: 3 additions & 1 deletion src/main/shared/Login/Login.css
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
.Login {}
body{
background-color: #e9eaee;
}
Loading

0 comments on commit 28ffd7f

Please sign in to comment.