-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from BaptisteBuvron/admin_functionalities
Admin functionalities
- Loading branch information
Showing
24 changed files
with
819 additions
and
240 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ export class CandidatureController { | |
static candidater(req: express.Request, res: express.Response) { | ||
|
||
//TODO Vérifier que l'utilisateur est bien un candidat | ||
let user: User = new User('[email protected]', 'Tillai', 'Soudarsane', '0652645299', new Date('2020-10-10'), false, 'mdp', 'Candidat', "", "123456"); | ||
let user: User = new User('[email protected]', 'Tillai', 'Soudarsane', '0652645299', new Date('2020-10-10'), false, 'mdp', 'Candidat', "", null); | ||
|
||
let alerts: Alert[] = []; | ||
let numero: number = Number.parseInt(req.params.numero); | ||
|
@@ -26,7 +26,7 @@ export class CandidatureController { | |
let alert = new Alert("danger", "La motivation doit faire plus de 20 caractères."); | ||
alerts.push(alert); | ||
} else { | ||
let user: User = new User('[email protected]', 'Doe', 'John', '123456789', new Date(), true, 'password123', 'Candidat', 'En attente', '1566'); | ||
let user: User = new User('[email protected]', 'Doe', 'John', '123456789', new Date(), true, 'password123', 'Candidat', 'En attente', null); | ||
let candidature: Candidature = new Candidature(new Date(), user, offer, StatutCandidatureEnum.EN_ATTENTE, req.body.motivation); | ||
await CandidatureRepository.create(candidature).then(async (candidature) => { | ||
//upload file: | ||
|
@@ -64,7 +64,7 @@ export class CandidatureController { | |
|
||
} | ||
} | ||
res.render("candidater", {title: "Candidater", offer: offer, alerts: alerts, user: loggedInNoRedirection(req, res)}); | ||
res.render("candidater", {title: "Candidater", offer: offer, alerts: alerts, userLogged: loggedInNoRedirection(req, res)}); | ||
|
||
} | ||
) | ||
|
@@ -76,9 +76,9 @@ export class CandidatureController { | |
|
||
static candidatures(req: express.Request, res: express.Response) { | ||
//TODO Vérifier que l'utilisateur est bien un candidat | ||
let user: User = new User('[email protected]', 'Doe', 'John', '123456789', new Date(), true, 'password123', 'Candidat', 'En attente', '1566'); | ||
let user: User = new User('[email protected]', 'Doe', 'John', '123456789', new Date(), true, 'password123', 'Candidat', 'En attente', null); | ||
CandidatureRepository.getByUser(user).then((candidatures) => { | ||
res.render("candidatures", {title: "Mes candidatures", candidatures: candidatures, user: loggedInNoRedirection(req, res)}); | ||
res.render("candidatures", {title: "Mes candidatures", candidatures: candidatures, userLogged: loggedInNoRedirection(req, res)}); | ||
|
||
}).catch((err) => { | ||
console.log(err); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,8 +31,6 @@ function filterOffer() { | |
offersDiv.append(...generateOffers(offers)); | ||
} | ||
); | ||
|
||
|
||
} | ||
|
||
|
||
|
Oops, something went wrong.