Skip to content

Commit

Permalink
Merge pull request #32 from WildCodeSchool/routes
Browse files Browse the repository at this point in the history
Routes
  • Loading branch information
Hepsox authored Dec 15, 2023
2 parents 008eb66 + d9ba3be commit 94a006e
Show file tree
Hide file tree
Showing 11 changed files with 75 additions and 69 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/Add Something/add-something.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
}

.add-details-button > p {
font-size: 18px;
font-size: 20px;
font-weight: 500;
color: var(--text-default);
}
Expand Down
11 changes: 8 additions & 3 deletions frontend/src/components/Headers/HeaderLongTitreSsTitre.jsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
import "./header.css";
import PropTypes from "prop-types";

function HeaderLongTitreSsTitre() {
function HeaderLongTitreSsTitre({ title, subTitle }) {
return (
<header className="header with-round-bottom">
<nav>
<i className="fa-solid fa-arrow-left" />
<i className="fa-solid fa-bars" />
</nav>
<div className="header-content title-and-sub-title">
<h1>Candidatures</h1>
<h2>Historique</h2>
<h1>{title}</h1>
<h2>{subTitle}</h2>
</div>
</header>
);
}
HeaderLongTitreSsTitre.propTypes = {
title: PropTypes.string.isRequired,
subTitle: PropTypes.string.isRequired,
};

export default HeaderLongTitreSsTitre;
6 changes: 3 additions & 3 deletions frontend/src/components/Inputs/Input.jsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import PropTypes from "prop-types";
import "./input.css";

function Input({ titleInput, holderText, showInput }) {
function Input({ titleInput, holderText, hideInput }) {
return (
<div className="container-input">
<label className="label-champs" htmlFor="name">
{titleInput ?? "Nom de l'input"}
</label>
{showInput && (
{!hideInput && (
<input
className="background-input"
type="text"
Expand All @@ -22,7 +22,7 @@ function Input({ titleInput, holderText, showInput }) {
Input.propTypes = {
titleInput: PropTypes.string.isRequired,
holderText: PropTypes.string.isRequired,
showInput: PropTypes.bool.isRequired,
hideInput: PropTypes.bool.isRequired,
};

export default Input;
13 changes: 7 additions & 6 deletions frontend/src/main.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,32 +31,33 @@ const router = createBrowserRouter([
path: "/login",
element: <LogIn />,
},

{
path: "/profil/history",
path: "/profile/history",
element: <History />,
},
{
path: "/profil/favorite",
path: "/profile/favorite",
element: <Favoris />,
},
{
path: "/offer",
element: <Offer />,
},
{
path: "/edit-profil",
path: "/edit-profile",
element: <UserProfileModel />,
children: [
{
path: "/edit-profil/cv",
path: "/edit-profile/cv",
element: <CreateCV />,
},
{
path: "/edit-profil/experience",
path: "/edit-profile/experience",
element: <AddExperience />,
},
{
path: "/edit-profil/formation",
path: "/edit-profile/formation",
element: <AddFormation />,
},
],
Expand Down
10 changes: 8 additions & 2 deletions frontend/src/pages/Connexion/LogIn.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Link } from "react-router-dom";
import Input from "../../components/Inputs/Input";
import ButtonMaxi from "../../components/Boutons/ButtonMaxi";
import "./login-signin.css";
Expand All @@ -16,14 +17,19 @@ function Login() {
<div>
<Input titleInput="E-mail" holderText="[email protected]" />
<Input titleInput="Mot de passe" holderText="************" />
<ButtonMaxi textBtn="Se connecter" />
<Link to="/">
<ButtonMaxi textBtn="Se connecter" />
</Link>
</div>
</div>
</form>

<div className="small-paragraphe-info">
<p>
Vous n'avez pas de compte ? <span> Inscrivez-vous ! </span>
Vous n'avez pas de compte ?
<Link to="/signin">
<span>Inscrivez-vous !</span>
</Link>
</p>
</div>
</div>
Expand Down
12 changes: 9 additions & 3 deletions frontend/src/pages/Connexion/SignIn.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Link } from "react-router-dom";
import Input from "../../components/Inputs/Input";
import ButtonMaxi from "../../components/Boutons/ButtonMaxi";
import CheckboxCondition from "../../components/Inputs/CheckboxCondition";
Expand All @@ -23,16 +24,21 @@ function SignIn() {
titleInput="Confirmer le mot de passe"
holderText="************"
/>
<CheckboxCondition textCondition="J'accepte les conditions d'" />
<CheckboxCondition textCondition="J'accepte les conditions d'Externatic" />
<CheckboxCondition textCondition="Je veux créer ou télécharger mon cv maintenant !" />
<ButtonMaxi textBtn="S'inscrire" />
<Link to="/edit-profile">
<ButtonMaxi textBtn="S'inscrire" />
</Link>
</div>
</div>
</form>

<div className="small-paragraphe-info">
<p>
Vous avez déjà un compte ? <span>Connectez-vous</span>
Vous avez déjà un compte ?
<Link to="/login">
<span>Connectez-vous</span>
</Link>
</p>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/Favoris/Favoris.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import CardFavoris from "../../components/CardModel/CardFavoris";
function Favoris() {
return (
<>
<HeaderLongTitreSsTitre />
<HeaderLongTitreSsTitre title="Vos Favoris" subTitle="Votre liste" />
<div className="container-page">
<CardFavoris />
<CardFavoris />
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/Historique/History.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import CardModel from "../../components/CardModel/CardHistory";
function History() {
return (
<>
<HeaderLongTitreSsTitre />
<HeaderLongTitreSsTitre title="Candidatures" subTitle="Historique" />
<div className="container-page">
<CardModel />
<CardModel />
Expand Down
25 changes: 3 additions & 22 deletions frontend/src/pages/Offer/Offer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,53 +11,34 @@ function Offer() {
<div className="container-page with-rounded-border">
<h1>Ajouter une offre</h1>
<Input
showInput
titleInput="Titre de l'offre"
holderText="Développeur Web"
inputType="text"
/>
<Input
showInput
titleInput="Société"
holderText="BackMarket"
inputType="text"
/>
<Input titleInput="Société" holderText="BackMarket" inputType="text" />
<Select titleSelect="Type de contrat" valueSelect="CDI" />
<Input
showInput
titleInput="Ville"
holderText="Bordeaux"
inputType="text"
/>
<Input titleInput="Ville" holderText="Bordeaux" inputType="text" />
<TextArea
titleInput="Missions"
holderText="1 rue Victor Hugo, 33300 Bordeaux"
/>
<Input
showInput
titleInput="Profil recherché"
holderText="Sup de pub"
inputType="text"
/>
<Input
showInput
titleInput="Lieux de travail"
holderText="Présentiel"
inputType="text"
/>
<Input
showInput
titleInput="Salaire"
holderText="100k"
inputType="text"
/>
<Input titleInput="Salaire" holderText="100k" inputType="text" />
<TextArea
titleInput="Infos complémentaires"
holderText=" Le travail est cool"
/>

<Input
showInput
titleInput="Email du client lié à l'offre"
holderText="Votre email"
inputType="email"
Expand Down
50 changes: 23 additions & 27 deletions frontend/src/pages/ProfileUser/UserProfileModel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,33 @@ import AddSomething from "../../components/Add Something/AddSomething";
import HeaderLongUser from "../../components/Headers/HeaderLongUser";

function UserProfileUser() {
return window.location.pathname === "/edit-profil" ? (
return window.location.pathname === "/edit-profile" ||
window.location.pathname === "/edit-profile/" ? (
<>
<HeaderLongUser />
<div className="container-page">
<Title titleText="Vos coordonnées" />
<Input titleInput="Nom *" holderText="Votre nom" showInput />
<Input titleInput="Prénom *" holderText="Votre prénom" showInput />
<Input titleInput="Email *" holderText="Email" showInput />
<Input
titleInput="Mot de passe *"
holderText="Mot de passe"
showInput
/>
<Input
titleInput="Téléphone *"
holderText="Numéro de téléphone"
showInput
/>
<Input titleInput="Addresse *" holderText="Adresse" showInput />
<Input titleInput="COMPÉTENCES *" showInput={false} />
<CompetenceSwitch textCompetence="HTML" />
<CompetenceSwitch textCompetence="CSS" />
<CompetenceSwitch textCompetence="JAVASCRIPT" />
<CompetenceSwitch textCompetence="ANGULAR" />
<CompetenceSwitch textCompetence="REACT.JS" />
<CompetenceSwitch textCompetence="PHP" />
<CompetenceSwitch textCompetence="SYMPHONY" />
<CompetenceSwitch textCompetence="GIT" />
<CompetenceSwitch textCompetence="GITHUB" />
<CompetenceSwitch textCompetence="TRELLO" />
<AddSomething addDetail="Votre CV" />
<Input titleInput="Nom *" holderText="Votre nom" />
<Input titleInput="Prénom *" holderText="Votre prénom" />
<Input titleInput="Email *" holderText="Email" />
<Input titleInput="Mot de passe *" holderText="Mot de passe" />
<Input titleInput="Téléphone *" holderText="Numéro de téléphone" />
<Input titleInput="Addresse *" holderText="Adresse" />
<div className="container-switch">
<h2 className="label-champs"> Cochez vos compétences *</h2>
<CompetenceSwitch textCompetence="HTML" />
<CompetenceSwitch textCompetence="CSS" />
<CompetenceSwitch textCompetence="JAVASCRIPT" />
<CompetenceSwitch textCompetence="ANGULAR" />
<CompetenceSwitch textCompetence="REACT.JS" />
<CompetenceSwitch textCompetence="PHP" />
<CompetenceSwitch textCompetence="SYMPHONY" />
<CompetenceSwitch textCompetence="GIT" />
<CompetenceSwitch textCompetence="GITHUB" />
<CompetenceSwitch textCompetence="TRELLO" />
<AddSomething addDetail="Votre CV" />
</div>

<ButtonMaxi />
</div>
</>
Expand Down
11 changes: 11 additions & 0 deletions frontend/src/pages/ProfileUser/user-profile-model.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,14 @@
.user-profile-page {
position: relative;
}

.label-champs {
font-weight: 500;
color: var(--third-title-color);
text-transform: uppercase;
font-size: 16px;
margin-bottom: 20px;
}
.container-switch {
margin-top: 50px;
}

0 comments on commit 94a006e

Please sign in to comment.