Skip to content

Commit

Permalink
Merge pull request #18 from BaptisteBuvron/fix_offers
Browse files Browse the repository at this point in the history
Fix: affichage du salaire lors de l'affichage des offres.
  • Loading branch information
BaptisteBuvron committed Jun 20, 2023
2 parents 1c37229 + db470ed commit 7be880f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/public/js/filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function generateOfferPrototype(offer) {

const h4 = document.createElement('h4');
h4.className = '';
h4.innerHTML = `${offer.ficheDePoste.typeMetier} <span class="badge text-bg-secondary float-end">45000 €</span>`;
h4.innerHTML = `${offer.ficheDePoste.typeMetier} <span class="badge text-bg-secondary float-end">${offer.ficheDePoste.salaire} €</span>`;

const p1 = document.createElement('p');
p1.innerHTML = offer.ficheDePoste.description;
Expand Down
2 changes: 1 addition & 1 deletion app/repository/OfferRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class OfferRepository {
query += ` WHERE FicheDePoste.salaire >= ?`;
params.push(filterOffer.minSalary);
if (filterOffer.region) {
query += ` AND FicheDePoste.lieu = ?'`;
query += ` AND FicheDePoste.lieu = ?`;
params.push(filterOffer.region);
}
}
Expand Down
1 change: 0 additions & 1 deletion app/routes/MainRouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export const defaultRouter = Router();
defaultRouter.use(
session({
genid: (req:any) => {
console.log("1. in genid req.sessionID: ", req.sessionID);
return uuidv4();
},
store: new FileStore(),
Expand Down
4 changes: 2 additions & 2 deletions app/views/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<h4>Filtres</h4>
<hr>
<h5>Salaire</h5>
<input type="range" class="form-range" id="salary" min="0" max="10000" step="100"
<input type="range" class="form-range" id="salary" min="0" max="100000" step="1000"
onmouseup="updateSalaryValue()">
<p class="text-muted">Salaire minimum : <span id="salary-value"></span></p>
<h5>Région</h5>
Expand All @@ -39,7 +39,7 @@
<% offers.forEach((offer) => { %>
<div class="border-1 border p-2 my-2">
<h4 class=""><%= offer.ficheDePoste.typeMetier %> <span
class="badge text-bg-secondary float-end">45000</span>
class="badge text-bg-secondary float-end"><%= offer.ficheDePoste.salaire %></span>
</h4>
<p><%= offer.ficheDePoste.description %></p>
<p>Organisation : <%= offer.ficheDePoste.siren %></p>
Expand Down

0 comments on commit 7be880f

Please sign in to comment.