diff --git a/controller/user.js b/controller/user.js index 421cad9..40360c0 100644 --- a/controller/user.js +++ b/controller/user.js @@ -23,7 +23,7 @@ const contact = { const candidate = { - viewCanidate: (data) => { + viewCandidate: (data) => { return new Promise(async (resolve, reject) => { // let data.lpk_id = data.data.lpk_id; @@ -132,8 +132,44 @@ const allotment = { } } +const recruiter ={ + view: (id) => { + return new Promise(async (resolve, reject) => { + + db.get() + .collection(collections.RECRUITERS) + .findOne({ + "id": id + }) + .then((response) => { + resolve(response) + }).catch((error) => { + reject("Something Went wrong please try again later.") + }) + }) + }, + getPool: (pool) => { + return new Promise(async (resolve, reject) => { + + db.get() + .collection(collections.RECRUITERS) + .find({ + "pool": pool.toUpperCase() + }) + .toArray() + .then((response) => { + console.log(response) + resolve(response) + }).catch((error) => { + reject("Something Went wrong please try again later.") + }) + }) + } +} + module.exports = { contact, candidate, - allotment + allotment, + recruiter } \ No newline at end of file diff --git a/routes/index.js b/routes/index.js index 6aae755..03f5c11 100644 --- a/routes/index.js +++ b/routes/index.js @@ -100,7 +100,7 @@ router.get('/results/view', function (req, res, next) { }); router.post('/results/view', function (req, res, next) { - controller.candidate.viewCanidate(req.body) + controller.candidate.viewCandidate(req.body) .then((candidate) => { res.render('pages/view_result', { @@ -140,7 +140,7 @@ router.get('/allotment/apply', function (req, res, next) { }); router.post('/allotment/apply', function (req, res, next) { - controller.candidate.viewCanidate(req.body) + controller.candidate.viewCandidate(req.body) .then((candidate) => { if (candidate.allotment.applied) { req.session.candidate = null; @@ -155,7 +155,7 @@ router.post('/allotment/apply', function (req, res, next) { }); } else { req.session.candidate = candidate; - console.log(req.session.candidate); + // console.log(req.session.candidate); res.render('pages/allotment/application', { title: `Allotment Application | ${app_name}`, @@ -167,6 +167,7 @@ router.post('/allotment/apply', function (req, res, next) { } }) .catch((error) => { + req.flash('message', error); res.redirect('/allotment/apply'); }) }); @@ -225,4 +226,50 @@ router.get('/allotment/recruiters', function (req, res, next) { }); }); +//recruiters +router.get('/recruiters', function (req, res, next) { + res.render('pages/recruiters', + { + title: `Recruiters | ${app_name}`, + page_head: 'Recruiters', + page_nav_name: 'Recruiters', + recruiters_page: true, + breadcrumbs: true + }); +}); + +router.get('/recruiters/:id', function (req, res, next) { + controller.recruiter.view(req.params.id) + .then((recruiter) => { + res.render('pages/recruiters/recruiter', + { + title: `Recruiters | ${app_name}`, + page_head: 'Recruiters', + page_nav_name: 'Recruiters', + recruiters_page: true, + breadcrumbs: true, + recruiter + }); + }) + .catch((error) => { + res.redirect('/recruiters'); + }) +}); + +router.get('/recruiters/pool/:pool', function (req, res, next) { + controller.recruiter.getPool(req.params.pool) + .then((pool) => { + res.render('pages/recruiters/pool', + { + title: `Recruiters | ${app_name}`, + page_head: 'Recruiters', + page_nav_name: 'Recruiters', + recruiters_page: true, + breadcrumbs: true, + pool_name: req.params.pool, + pool + }); + }) +}); + module.exports = router; \ No newline at end of file diff --git a/views/pages/allotment.hbs b/views/pages/allotment.hbs index ab77f27..db96d86 100644 --- a/views/pages/allotment.hbs +++ b/views/pages/allotment.hbs @@ -9,11 +9,18 @@

Appy for Recruiter Allotment

- Launchpad Kerala 2023's recruiter allotment process is now open. If you've been + Launchpad Kerala 2023's recruiter allotment process is now open. All the recruiters + registered for Launchpad Kerala will be divided into four pools. + If you've been shortlisted, you can apply for the allotment process using the link provided on the - website. Keep in mind that only one allotment will be made based on your - options, rank, - application details, and the requirements of the recruiter pool you've applied for. + website. +

+

+ Applying for the allotment doesn't guarantee that you will be allocated a interview slot. + Based on the options selected, the rank of the candidate, application details, and the + requisites of the applied recruiter pool, a single allotment will be made. Therefore, it is crucial to read and review the pool and recruiter details + carefully before applying for an allotment. The eligibility of each candidate will also + be rechecked during the offline interviews.

The recruiters are divided into four pools two at Kochi and two at diff --git a/views/pages/allotment/application.hbs b/views/pages/allotment/application.hbs index 1b8ab2a..756e234 100644 --- a/views/pages/allotment/application.hbs +++ b/views/pages/allotment/application.hbs @@ -85,21 +85,21 @@

Recruiter Prefernce
-
+
-
+
-
+