vues pour rendu php terminées/dernier commit avant fusion

offres2
Baptiste D 1 year ago
parent fd7bdac0ae
commit fe8fcca368

BIN
.DS_Store vendored

Binary file not shown.

BIN
php/.DS_Store vendored

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 KiB

@ -116,4 +116,13 @@ class Validation
return in_array($level,$studies); return in_array($level,$studies);
} }
public static function ValidateEntry($entry, $nbChars): bool
{
if(!empty($entry))
{
return strlen($entry)>= $nbChars;
}
return false;
}
} }

@ -206,19 +206,38 @@ class UtilisateurControleur
global $twig; global $twig;
$taberror = []; $taberror = [];
$requiredFields = ['name', 'entreprise', 'description','typeContrat', 'descriptPoste', 'profilRecherche', 'choixExp', 'education', 'mail', 'num']; // champs de saisie / texte uniquement
$requiredFields = ['name', 'entreprise', 'description', 'descriptPoste', 'profilRecherche','ville'];
$arrayLong = array(
'name' => 128,
'entreprise' => 64,
'description'=> 200,
'descriptPoste' => 2028,
'profilRecherche' => 2028,
'ville' => 100
);
$error = false;
foreach ($requiredFields as $field) { foreach ($requiredFields as $field) {
if (empty($_POST[$field])) { if (!Validation::ValidateEntry($_POST[$field],$arrayLong[$field])) {
$error = true; $taberror[] = "Erreur : {$field} non valide !";
$taberror[] = "Le champ {$field} est requis !";
} }
} }
if($error)
if(!Validation::validateTypeStudies($_POST['education']))
{ {
echo $twig->render("CreerOffre.html", ['tabError' => $taberror ]); $taberror[] = "Niveau d'études non valide !";
return; }
if(!Validation::validateTypeContract($_POST['typeContrat']))
{
$taberror[] = "Type de contrat non valide !";
}
if(!Validation::validateExperience($_POST['choixExp']))
{
$taberror[] = "Experience Non valide !";
} }
if(!Validation::verifierEmail($_POST["mail"])) if(!Validation::verifierEmail($_POST["mail"]))

@ -62,7 +62,7 @@ class OffreGateway
':v' => array($offre->getVille(), \PDO::PARAM_STR), ':v' => array($offre->getVille(), \PDO::PARAM_STR),
':e' => array($offre->getEntreprise(), \PDO::PARAM_STR), ':e' => array($offre->getEntreprise(), \PDO::PARAM_STR),
':desc' => array($offre->getDescriptifPoste(), \PDO::PARAM_STR), ':desc' => array($offre->getDescriptifPoste(), \PDO::PARAM_STR),
':pro' => array($offre->getProfil(), \PDO::PARAM_STR), ':pro' => array($offre->getProfilSearched(), \PDO::PARAM_STR),
':exp' => array($offre->getExperience(), \PDO::PARAM_STR), ':exp' => array($offre->getExperience(), \PDO::PARAM_STR),
':niv' => array($offre->getNiveauEtudes(), \PDO::PARAM_STR), ':niv' => array($offre->getNiveauEtudes(), \PDO::PARAM_STR),
':mail' => array($offre->getMailContact(), \PDO::PARAM_STR), ':mail' => array($offre->getMailContact(), \PDO::PARAM_STR),

@ -76,7 +76,7 @@ class Offre
* @var \App\metier\ProfilRecherche Profil recherché * @var \App\metier\ProfilRecherche Profil recherché
*/ */
//private \App\metier\ProfilRecherche $profil; //private \App\metier\ProfilRecherche $profil;
private string $profil; private string $profilSearched;
/** /**
* @var string Experience * @var string Experience
*/ */
@ -156,7 +156,7 @@ class Offre
$this->ville = $ville; $this->ville = $ville;
$this->entreprise = $entreprise; $this->entreprise = $entreprise;
$this->descriptifPoste = $descriptifPoste; $this->descriptifPoste = $descriptifPoste;
$this->profil = $profil; $this->profilSearched = $profil;
$this->experience = $experience; $this->experience = $experience;
$this->niveauEtudes = $niveauEtudes; $this->niveauEtudes = $niveauEtudes;
$this->mailContact = $mailContact; $this->mailContact = $mailContact;
@ -196,10 +196,6 @@ class Offre
return $this->description; return $this->description;
} }
public function Id(): int
{
return $this->img->getId();
}
public function getImg() : string public function getImg() : string
{ {
@ -227,9 +223,9 @@ class Offre
return $this->descriptifPoste; return $this->descriptifPoste;
} }
public function getProfil(): string public function getProfilSearched(): string
{ {
return $this->profil; return $this->profilSearched;
} }
public function getExperience(): string public function getExperience(): string

@ -42,9 +42,6 @@ class OffreModele
} }
else $remote = false; else $remote = false;
echo "education :".$_POST['education'];
echo '<br>';
// à la place de NULL passer id utilisateur créateur offre // à la place de NULL passer id utilisateur créateur offre
$offre = new Offre($this->offreGw->getNewId(), $offre = new Offre($this->offreGw->getNewId(),
new Alumni(12,"test.mail@icloud.fr","password","admin"), new Alumni(12,"test.mail@icloud.fr","password","admin"),

@ -48,7 +48,7 @@
<div class="form-group"> <div class="form-group">
<label for="ville">Ville</label> <label for="ville">Ville</label>
<input type="text" class="form-control" id="ville" name="ville" placeholder="Ville" required> <input type="text" class="form-control" id="ville" name="ville" placeholder="Ville" required maxlength="100">
</div> </div>
<div class="form-group"> <div class="form-group">

@ -12,34 +12,39 @@
{% include "menu.html" %} {% include "menu.html" %}
</header> </header>
<div class="container mt-4" > <div class="container mt-4 d-flex align-content-center ">
<div>
<a href="index.php?action=createOfferForm" type="button" class="btn btn-outline-success mb-4">Publier une offre</a> <a href="index.php?action=createOfferForm" type="button" class="btn btn-outline-success mb-4">Publier une offre</a>
</div>
<div class="container mt-4"> <div class="container mt-4">
<div class="d-flex flex-column align-items-center"> <div class="d-flex flex-column align-items-center">
<form action="index.php" method="get" class="form-inline flex-wrap mb-4"> <form action="index.php" method="get" class="form-inline flex-wrap mb-4">
<h2 class="mr-3">Filtrer les offres</h2> <h2 class="mr-3">Filtrer les offres</h2>
<div class="form-group mr-3 flex-column"> <div class="form-group mr-3 flex-column justify-content-left">
<label for="typeContrat">Type de contrat :</label> <label for="typeContrat" class="text-left">Type de contrat :</label>
<div class="form-check"> <div class="form-check ml-0">
<input class="form-check-input" type="radio" name="typeContrat" id="cdd" value="CDD" {% if typeContrat == "CDD" %}checked{% endif %}> <input class="form-check-input" type="radio" name="typeContrat" id="cdd" value="CDD" {% if typeContrat == "CDD" %}checked{% endif %}>
<label class="form-check-label" for="cdd">CDD</label> <label class="form-check-label" for="cdd">CDD</label>
</div> </div>
<div class="form-check"> <div class="form-check ml-0">
<input class="form-check-input" type="radio" name="typeContrat" id="cdi" value="CDI" {% if typeContrat == "CDI" %}checked{% endif %}> <input class="form-check-input" type="radio" name="typeContrat" id="cdi" value="CDI" {% if typeContrat == "CDI" %}checked{% endif %}>
<label class="form-check-label" for="cdi">CDI</label> <label class="form-check-label" for="cdi">CDI</label>
</div> </div>
<div class="form-check"> <div class="form-check ml-0">
<input class="form-check-input" type="radio" name="typeContrat" id="alternance" value="Alternance" {% if "Alternance" == typeContrat %}checked{% endif %}> <input class="form-check-input" type="radio" name="typeContrat" id="alternance" value="Alternance" {% if "Alternance" == typeContrat %}checked{% endif %}>
<label class="form-check-label" for="alternance">Alternance</label> <label class="form-check-label" for="alternance">Alternance</label>
</div> </div>
<div class="form-check"> <div class="form-check ml-0">
<input class="form-check-input" type="radio" name="typeContrat" id="stage" value="Stage" {% if "Stage" == typeContrat %}checked{% endif %}> <input class="form-check-input" type="radio" name="typeContrat" id="stage" value="Stage" {% if "Stage" == typeContrat %}checked{% endif %}>
<label class="form-check-label" for="stage">Stage</label> <label class="form-check-label" for="stage">Stage</label>
</div> </div>
</div> </div>
<div class="form-group mr-3 flex-column"> <div class="form-group mr-3 flex-column">
<label for="experience">Expérience :</label> <label for="experience">Expérience :</label>
<div class="form-check"> <div class="form-check">
@ -73,14 +78,18 @@
</div> </div>
</div> </div>
<div>
<a href="index.php?action=consultOffers" class="btn btn-info">Réinitialiser les filtres</a> <a href="index.php?action=consultOffers" class="btn btn-info">Réinitialiser les filtres</a>
</div>
</div> </div>
<h1 id="titrePrincipal">Offres d'emploi</h1> <h1 id="titrePrincipal">Offres d'emploi</h1>
<div class="col-md-8 offset-md-2">
{% for offre in offres %} {% for offre in offres %}
<article class="mb-4"> <article class="mb-4">
<div class="row1"> <div class="row1">
@ -122,11 +131,13 @@
</nav> </nav>
</nav> </nav>
</div> </div>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script> <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.6/dist/umd/popper.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.6/dist/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>

@ -8,18 +8,43 @@
<body> <body>
<header> <header>
<!-- Add your logo here -->
{% include "menu.html" %} {% include "menu.html" %}
</header> </header>
<div class="container mt-5"> <div class="container mt-5">
<h1 class="display-4">Détails de l'Offre</h1> <h1 class="display-4">Détails de l'Offre</h1>
<ul class="list-group"> <ul class="list-group">
<li class="list-group-item">ID: {{ offre.getId() }}</li> <!-- Add an image related to the offer -->
<li class="list-group-item">Offreur: {{ offre.getOffreur().getNom() }}</li>
<li class="list-group-item">Nom de l'offre: {{ offre.getNom() }}</li> <li class="list-group-item"></li><img src="uploads/{{offre.getLogo()}}" alt="Logo" class="img-thumbnail" style="max-height: 50px; max-width: 50px;"</li>
<li class="list-group-item">Description: {{ offre.getDescription() }}</li> <li class="list-group-item"><img src="offers/{{offre.getImg()}}" alt="Offer Image" class="img-fluid"></li>
<li class="list-group-item">Type de contrat: {{ offre.getTypeContrat() }}</li> <!--<li class="list-group-item"><strong>ID:</strong> {{ offre.getId() }}</li> -->
<li class="list-group-item">Ville: {{ offre.getVille() }}</li> <li class="list-group-item"><strong>Offreur:</strong> {{ offre.getOffreur().getNom() }}</li>
<li class="list-group-item">Date de publication: {{ offre.getDateString() }}</li> <li class="list-group-item"><strong>Nom de l'offre:</strong> {{ offre.getNom() }}</li>
<li class="list-group-item"><strong>Entreprise :</strong> {{ offre.getEntreprise() }}</li>
<li class="list-group-item"><strong>Description:</strong> {{ offre.getDescription() }}</li>
<li class="list-group-item"><strong>Type de contrat:</strong> {{ offre.getTypeContrat() }}</li>
<li class="list-group-item"><strong>Niveau d'études :</strong> {{ offre.getNiveauEtudes() }}</li>
<li class="list-group-item"><strong>Ville:</strong> {{ offre.getVille() }}</li>
<li class="list-group-item"><strong>Date de publication:</strong> {{ offre.getDateStringFr() }}</li>
<li class="list-group-item"><strong>Descriptif Poste :</strong> {{ offre.getDescriptifPoste() }}</li>
<li class="list-group-item"><strong>Profil recherché :</strong> {{ offre.getProfilSearched() }}</li>
<li class="list-group-item"><strong>Site de L'annonce :</strong> {{ offre.getSiteUrl() }}</li>
<li class="list-group-item"><strong>Mail de Contact : :</strong> {{ offre.getMailContact() }}</li>
<li class="list-group-item"><strong>Numéro de Contact :</strong> {{ offre.getNumero() }}</li>
<li class="list-group-item">
<strong>Full Remote :</strong>
{% if offre.isRemote() %}
Oui
{% else %}
Non
{% endif %}
</li>
</ul> </ul>
</div> </div>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script> <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>

@ -15,7 +15,7 @@
{% include "menu.html" %} {% include "menu.html" %}
<body> <body>
<h1>Page d'erreur</h1> <h1>Erreur</h1>
{% if dVueErreur is defined %} {% if dVueErreur is defined %}
{% for value in dVueErreur %} {% for value in dVueErreur %}
<p>{{value}}</p> <p>{{value}}</p>

@ -17,7 +17,7 @@
<ul class="nav-items"> <ul class="nav-items">
<li class="nav-link"><a href="#">A propos</a></li> <li class="nav-link"><a href="#">A propos</a></li>
<li class="nav-link"><a href="#">Evenements</a></li> <li class="nav-link"><a href="#">Evenements</a></li>
<li class="nav-link"><a href="#">Offres</a></li> <li class="nav-link"><a href="index.php?action=consultOffers">Offres</a></li>
<li class="nav-link"><a href="#">Nous contacter</a></li> <li class="nav-link"><a href="#">Nous contacter</a></li>
</ul> </ul>
<ul class="nav-items"> <ul class="nav-items">

Loading…
Cancel
Save