From e1f1dfa435d678d3c31b7168c20b708c937cf187 Mon Sep 17 00:00:00 2001 From: nicrausaz <n.crausaz99@gmail.com> Date: Wed, 5 Jun 2019 16:19:30 +0200 Subject: [PATCH] Note dans tableau --- .../API/app/Http/Controllers/ApplicantsController.php | 5 +++-- canapGEST/API/app/Http/Controllers/AuthController.php | 2 +- canapGEST/Site/src/store/modules/user/actions.js | 3 ++- canapGEST/Site/src/views/ApplicationsView.vue | 10 +++++++++- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/canapGEST/API/app/Http/Controllers/ApplicantsController.php b/canapGEST/API/app/Http/Controllers/ApplicantsController.php index 93ad260..83a0b97 100644 --- a/canapGEST/API/app/Http/Controllers/ApplicantsController.php +++ b/canapGEST/API/app/Http/Controllers/ApplicantsController.php @@ -40,17 +40,18 @@ class ApplicantsController extends Controller ->join('position', 'applicant.fk_position', '=', 'position.position_id') ->join('job', 'position.fk_job', '=', 'job.job_id') ->join('location', 'position.fk_location', '=', 'location.location_id') + ->join('marker', 'applicant.applicant_id', '=', 'marker.fk_applicant_id') + ->where('marker_owner_sciper', $this->user_sciper) ->where('fk_status', 'Valide') ->get(); } - foreach ($job_applicants as $key => $applicant) { if (in_array($applicant->job_short_value, $this->user_permissions)) { array_push($applicants, $applicant); } } - return $applicants; + return $applicants; } public function getJobApplicants($job) diff --git a/canapGEST/API/app/Http/Controllers/AuthController.php b/canapGEST/API/app/Http/Controllers/AuthController.php index 730c987..35d9b35 100644 --- a/canapGEST/API/app/Http/Controllers/AuthController.php +++ b/canapGEST/API/app/Http/Controllers/AuthController.php @@ -74,7 +74,7 @@ class AuthController extends Controller public function tequilareturn() { return redirect()->to("https://canap-gest-dev.local:8080/#/?key=" . $_GET["key"]); - // return redirect()->to("https://canap-gest:8443/?key=" . $_GET["key"]); + // return redirect()->to("https://canap-gest:8443/#/?key=" . $_GET["key"]); } public function logout() diff --git a/canapGEST/Site/src/store/modules/user/actions.js b/canapGEST/Site/src/store/modules/user/actions.js index b314b19..c4212ce 100644 --- a/canapGEST/Site/src/store/modules/user/actions.js +++ b/canapGEST/Site/src/store/modules/user/actions.js @@ -17,8 +17,9 @@ export function logout(context, fullLogout) { localStorage.removeItem('stored_token') if (fullLogout) { window.location = 'https://tequila.epfl.ch/logout' + } else { + location.reload() } - // location.reload() }) } diff --git a/canapGEST/Site/src/views/ApplicationsView.vue b/canapGEST/Site/src/views/ApplicationsView.vue index 5cf33a8..1cb5d7d 100644 --- a/canapGEST/Site/src/views/ApplicationsView.vue +++ b/canapGEST/Site/src/views/ApplicationsView.vue @@ -88,10 +88,15 @@ </td> <td>{{ props.item.applicant_scolarity_end }}</td> <td>{{ getFormatedDate(props.item.applicant_application_date) }}</td> + <td v-if="!$store.getters['moduleUser/userIsResponsible']"> + <span> + {{props.item.marker_value}} + <v-icon inline small>star_rating</v-icon> + </span> + </td> <td> <v-select :items="$store.state.moduleApplications.available_status" - label="Statut" item-text="status_value" item-value="status_value" v-model="props.item.fk_status" @@ -139,6 +144,9 @@ export default { }, created() { this.loadApplications() + if (!this.$store.getters['moduleUser/userIsResponsible']) { + this.headers.splice(this.headers.length-1, 0, { text: 'Note', value: 'applicant_marker' }) + } }, computed: { hasSelected() { return this.selected.length > 0 } -- GitLab