diff --git a/canapGEST/API/app/Helpers/AccessLevelHelper.php b/canapGEST/API/app/Helpers/AccessLevelHelper.php index 62545517f2f4660c6aa7bf1f9decce4526169124..f3cd92c1d7bbafc8da1514c430a5eda24d725c72 100644 --- a/canapGEST/API/app/Helpers/AccessLevelHelper.php +++ b/canapGEST/API/app/Helpers/AccessLevelHelper.php @@ -55,7 +55,7 @@ class AccessLevelHelper { $default_access_groups = self::getDefaultAccessGroups(); $user_alloweds = []; - $user_role = 'formateur'; // formateur + $user_role = 'responsable'; // formateur $user_groups = explode(',', $user_groups); foreach ($default_access_groups as $group => $accesses) { diff --git a/canapGEST/API/app/Http/Controllers/AuthController.php b/canapGEST/API/app/Http/Controllers/AuthController.php index 164dcf57e93ff756ea6342cad8a78f763cec3f3f..a4551dcc4d402129858e0d4a5be00d82f3f3f9db 100644 --- a/canapGEST/API/app/Http/Controllers/AuthController.php +++ b/canapGEST/API/app/Http/Controllers/AuthController.php @@ -16,7 +16,6 @@ class AuthController extends Controller public function __construct(Request $request) { $this->request = $request; - $this->oClient = new TequilaClient(); } protected function jwt($tequilaObject) @@ -43,18 +42,18 @@ class AuthController extends Controller public function authenticate() { - $this->oClient->SetApplicationName('Canap-Gest'); - $this->oClient->SetWantedAttributes(array('uniqueid', 'name', 'firstname', 'unit', 'unitid', 'where', 'group')); - $this->oClient->SetWishedAttributes(array('email', 'title')); + $oClient = new TequilaClient(); + $oClient->SetApplicationName('Canap-Gest'); + $oClient->SetWantedAttributes(array('uniqueid', 'name', 'firstname', 'where', 'group')); + $oClient->SetWishedAttributes(array('email', 'title')); + $oClient->SetCustomFilter('org=EPFL&group=canap-gest-users-dev'); // $this->oClient->SetApplicationURL('https://canap-gest.epfl.ch:8443'); // $this->oClient->SetApplicationURL('localhost:8000/api/auth/login'); - $this->oClient->SetApplicationURL('http://canap-gest-dev.local:8080'); - $this->oClient->SetCustomFilter('org=EPFL&group=canap-gest-users-dev'); - - $this->oClient->Authenticate(); + $oClient->SetApplicationURL('http://canap-gest-dev.local:8080'); + $oClient->Authenticate(); return response()->json([ - 'token' => $this->jwt($this->oClient) + 'token' => $this->jwt($oClient) ], 200); } diff --git a/canapGEST/API/app/Http/Middleware/CorsMiddleware.php b/canapGEST/API/app/Http/Middleware/CorsMiddleware.php index c0029e0dab407c8bff94ef9eb1eed2a56ee6cd36..0e8f717d330392a0c62fe1946ed9733eaf87079a 100644 --- a/canapGEST/API/app/Http/Middleware/CorsMiddleware.php +++ b/canapGEST/API/app/Http/Middleware/CorsMiddleware.php @@ -12,7 +12,7 @@ class CorsMiddleware 'Access-Control-Allow-Methods' => 'GET, POST, PUT, PATCH, DELETE, OPTIONS', 'Access-Control-Allow-Credentials' => 'true', 'Access-Control-Max-Age' => '86400', - 'Access-Control-Allow-Headers' => '*' + 'Access-Control-Allow-Headers' => 'Content-Type, Authorization, X-Requested-With' ]; if ($request->isMethod('OPTIONS')) diff --git a/canapGEST/API/app/Providers/tequila_config.inc.php b/canapGEST/API/app/Providers/tequila_config.inc.php index 46dae94d0a7172dba63aeee2732b1e732bf9194c..817a442aa1b9336fdea156431e2e8ba1d031b5fc 100644 --- a/canapGEST/API/app/Providers/tequila_config.inc.php +++ b/canapGEST/API/app/Providers/tequila_config.inc.php @@ -1,10 +1,9 @@ <?php -$aConfig = array( - 'sServer' => 'https://tequila.epfl.ch', - 'iTimeout' => 86400, - 'logoutUrl' => "https://localhost/tequila/logout.php", -); - +// $aConfig = array( +// 'sServer' => 'https://tequila.epfl.ch', +// 'iTimeout' => 86400, +// 'logoutUrl' => "https://localhost/tequila/logout.php", +// ); /******************************************************** DO NOT EDIT UNDER THIS LINE @@ -14,7 +13,7 @@ function GetConfigOption($sOption, $sDefault = '') $aConfig = array( 'sServer' => 'https://tequila.epfl.ch', 'iTimeout' => 86400, - 'logoutUrl' => "https://localhost/tequila/logout.php", + // 'logoutUrl' => "https://localhost/tequila/logout.php", ); if (!array_key_exists($sOption, $aConfig)) diff --git a/canapGEST/API/bootstrap/app.php b/canapGEST/API/bootstrap/app.php index fb971bc93dbe6a06f91a30250ff3ccbf00725c17..9fb6138434fe389fe8e55b0a2cdb3068bb5752d9 100644 --- a/canapGEST/API/bootstrap/app.php +++ b/canapGEST/API/bootstrap/app.php @@ -57,15 +57,14 @@ $app->singleton( | route or middleware that'll be assigned to some specific routes. | */ +$app->routeMiddleware([ + 'jwt.auth' => App\Http\Middleware\JwtMiddleware::class +]); $app->middleware([ App\Http\Middleware\CorsMiddleware::class ]); -$app->routeMiddleware([ - 'jwt.auth' => App\Http\Middleware\JwtMiddleware::class -]); - /* |-------------------------------------------------------------------------- | Register Service Providers diff --git a/canapGEST/Documentation/Rapport.docx b/canapGEST/Documentation/Rapport.docx index 8b9bbb7728a95eadd033f7a4cb398637b3ef7c11..d73494395f89c3d7d219d7c102bdf16e62860523 100644 Binary files a/canapGEST/Documentation/Rapport.docx and b/canapGEST/Documentation/Rapport.docx differ diff --git a/canapGEST/Documentation/journal_travail.xlsx b/canapGEST/Documentation/journal_travail.xlsx index cd42f8c46553c2553995e330d90a701a690557c1..2f111e7bacceb7be6016d19342f54d35b7566ac8 100644 Binary files a/canapGEST/Documentation/journal_travail.xlsx and b/canapGEST/Documentation/journal_travail.xlsx differ diff --git a/canapGEST/Documentation/planification_etatActuel_NicolasCrausaz - Copy.xlsx b/canapGEST/Documentation/planification_etatActuel_NicolasCrausaz - Copy.xlsx index 7ef7abb579ea8f66bc72c519fc8ec13230a708ea..41f2b389dc3c5f1ce439b612c26fd092d18ef125 100644 Binary files a/canapGEST/Documentation/planification_etatActuel_NicolasCrausaz - Copy.xlsx and b/canapGEST/Documentation/planification_etatActuel_NicolasCrausaz - Copy.xlsx differ diff --git a/canapGEST/Site/src/App.vue b/canapGEST/Site/src/App.vue index 0057d670003f4790ab0e99171f8ee3d7126d4739..ffb15bc0518eb5ceb133f15c948f97e0624e9411 100644 --- a/canapGEST/Site/src/App.vue +++ b/canapGEST/Site/src/App.vue @@ -19,6 +19,11 @@ import MainFooter from '@/layouts/MainFooter.vue' import alertSnackbar from '@/components/alertSnackbar.vue' export default { + created () { + if (!this.$store.getters['moduleUser/userIsLogedIn']) { + this.$store.dispatch('moduleUser/login') + } + }, components: { MainDrawer, MainNavbar, diff --git a/canapGEST/Site/src/components/application/sheets/activitiesDataSheet.vue b/canapGEST/Site/src/components/application/sheets/activitiesDataSheet.vue index 7ddf484f4a56f5a18edc655ab0558be803f66581..8f15aed981745874435aced549ad3ce7dc4f5360 100644 --- a/canapGEST/Site/src/components/application/sheets/activitiesDataSheet.vue +++ b/canapGEST/Site/src/components/application/sheets/activitiesDataSheet.vue @@ -1,6 +1,6 @@ <template> <v-sheet class="d-flex" id="activities-data-sheet"> - <v-card> + <v-card class="elevation-0"> <v-card-title> <h4>Activités professionnelles</h4> </v-card-title> diff --git a/canapGEST/Site/src/components/application/sheets/filesDataSheet.vue b/canapGEST/Site/src/components/application/sheets/filesDataSheet.vue index b9c2232bb9404ec5404a0ea198a52776cc0041a0..a9bb8733b5b8549b6ddd9096ed6ef9fa7e4291df 100644 --- a/canapGEST/Site/src/components/application/sheets/filesDataSheet.vue +++ b/canapGEST/Site/src/components/application/sheets/filesDataSheet.vue @@ -1,6 +1,6 @@ <template> <v-sheet class="d-flex" id="files-data-sheet"> - <v-card> + <v-card class="elevation-0"> <v-card-title> <h4>Annexes</h4> </v-card-title> diff --git a/canapGEST/Site/src/components/application/sheets/personalDataSheet.vue b/canapGEST/Site/src/components/application/sheets/personalDataSheet.vue index 0d26bd478b88ccef8326275c86c3889379e52767..cae9cb28fff0c33a3c79acd0cbab01daa740429e 100644 --- a/canapGEST/Site/src/components/application/sheets/personalDataSheet.vue +++ b/canapGEST/Site/src/components/application/sheets/personalDataSheet.vue @@ -1,6 +1,6 @@ <template> <v-sheet class="d-flex" id="personal-data-sheet"> - <v-card> + <v-card class="elevation-2"> <v-card-title> <h4>Données personnelles</h4> </v-card-title> diff --git a/canapGEST/Site/src/components/application/sheets/scolaritiesDataSheet.vue b/canapGEST/Site/src/components/application/sheets/scolaritiesDataSheet.vue index 9aea483ffe9f183633e4d4b2d0635f3345a76c16..9e2a0f0601bb85248d4b1b7fc2425e6ca08ab01b 100644 --- a/canapGEST/Site/src/components/application/sheets/scolaritiesDataSheet.vue +++ b/canapGEST/Site/src/components/application/sheets/scolaritiesDataSheet.vue @@ -1,6 +1,6 @@ <template> <v-sheet class="d-flex" id="scolarities-data-sheet"> - <v-card> + <v-card class="elevation-0"> <v-card-title> <h4>Scolarités</h4> </v-card-title> diff --git a/canapGEST/Site/src/components/application/sheets/trainingsDataSheet.vue b/canapGEST/Site/src/components/application/sheets/trainingsDataSheet.vue index 2ace1aa5735f8c8207a41f6e5bae853a40275caa..db517fc76d599056bff5f292fb028984e61c8fc3 100644 --- a/canapGEST/Site/src/components/application/sheets/trainingsDataSheet.vue +++ b/canapGEST/Site/src/components/application/sheets/trainingsDataSheet.vue @@ -1,6 +1,6 @@ <template> <v-sheet class="d-flex" id="trainings-data-sheet"> - <v-card> + <v-card class="elevation-0"> <v-card-title> <h4>Stages</h4> </v-card-title> diff --git a/canapGEST/Site/src/layouts/MainNavbar.vue b/canapGEST/Site/src/layouts/MainNavbar.vue index 011e2db94e0ea0759615ce9ce5bbfd76efa89063..d46566fb7a9d17d4833443a8acdd35d0a99ac6f0 100644 --- a/canapGEST/Site/src/layouts/MainNavbar.vue +++ b/canapGEST/Site/src/layouts/MainNavbar.vue @@ -3,12 +3,7 @@ <img src="../../public/statics/epfl_logo.png" width="100"> <v-toolbar-title>Canap-Gest</v-toolbar-title> <v-spacer></v-spacer> - <v-toolbar-items class="hidden-sm-and-down" v-if="!isLoged"> - <v-btn icon class="white--text"> - <v-icon @click="login">account_circle</v-icon> - </v-btn> - </v-toolbar-items> - <v-toolbar-items class="hidden-sm-and-down" v-else> + <v-toolbar-items class="hidden-sm-and-down" v-if="isLoged"> <v-btn flat class="white--text" @@ -32,13 +27,8 @@ export default { isLoged() { return this.$store.getters['moduleUser/userIsLogedIn'] } }, methods: { - login() { - this.$store.dispatch('moduleUser/login') - }, - logout() { - this.$store.dispatch('moduleUser/logout', true) - } - }, + logout() { this.$store.dispatch('moduleUser/logout', true) } + } } </script> diff --git a/canapGEST/Site/src/router/index.js b/canapGEST/Site/src/router/index.js index 52dab2ca455a94188f895726335f322cd938a8a3..80a69e4c80bd3266c55f94ce6c9cfb441b37a993 100644 --- a/canapGEST/Site/src/router/index.js +++ b/canapGEST/Site/src/router/index.js @@ -8,35 +8,30 @@ Vue.use(Router) const router = new Router({ routes }) router.beforeEach((to, from, next) => { - // TODO: check if token, and if expired if (store.getters['moduleUser/userIsLogedIn']) { - // - } - - // get & set user data - store.dispatch('moduleUser/getUserData').then(() => { - // Valide l'accès à la route selon le rôle - - let routeLimitation = to.meta.requiresRole - let userRole = store.state.moduleUser.userData.role - - if (routeLimitation == 'responsable' && userRole == 'formateur') { - // Routes limitées aux responsables - let deniedRoutes = ['/openjobs'] - if (deniedRoutes.includes(to.fullPath)) { - return next({ name: 'error', params: { status: 403, route: to.path } }) + // get & set user data + store.dispatch('moduleUser/getUserData').then(() => { + // Valide l'accès à la route selon le rôle + let routeLimitation = to.meta.requiresRole + let userRole = store.state.moduleUser.userData.role + + if (routeLimitation == 'responsable' && userRole == 'formateur') { + // Routes limitées aux responsables + let deniedRoutes = ['/openjobs'] + if (deniedRoutes.includes(to.fullPath)) { + return next({ name: 'error', params: { status: 403, route: to.path } }) + } } - } - - if (routeLimitation == 'formateur' && userRole == 'responsable') { - // Routes limitées aux formateurs - let deniedRoutes = ['/favourites'] - if (deniedRoutes.includes(to.fullPath)) { - return next({ name: 'error', params: { status: 403, route: to.path } }) + if (routeLimitation == 'formateur' && userRole == 'responsable') { + // Routes limitées aux formateurs + let deniedRoutes = ['/favourites'] + if (deniedRoutes.includes(to.fullPath)) { + return next({ name: 'error', params: { status: 403, route: to.path } }) + } } - } - return next() - }) + return next() + }) + } }) export default router diff --git a/canapGEST/Site/src/store/modules/applications/getters.js b/canapGEST/Site/src/store/modules/applications/getters.js index cc2663cec2b3e1a6b689675f92ec9605f9492972..519f8e1cedd01ea3908a748bcaf3011489f6029b 100644 --- a/canapGEST/Site/src/store/modules/applications/getters.js +++ b/canapGEST/Site/src/store/modules/applications/getters.js @@ -18,8 +18,12 @@ export function getFormatedApplicationDate(state) { } export function getFormatedApplicationUpdateDate(state) { - let dateTimeParts = state.currentApplication.application_data.personal_data.applicant_application_updated_date.split(/[- :]/) - dateTimeParts[1]-- - let date = new Date(...dateTimeParts) - return date.getDate() + '/' + (date.getMonth() + 1) + '/' + date.getFullYear() + ' à ' + date.getHours() + ':' + date.getMinutes() + if (state.currentApplication.application_data.personal_data.applicant_application_updated_date) { + let dateTimeParts = state.currentApplication.application_data.personal_data.applicant_application_updated_date.split(/[- :]/) + dateTimeParts[1]-- + let date = new Date(...dateTimeParts) + return date.getDate() + '/' + (date.getMonth() + 1) + '/' + date.getFullYear() + ' à ' + date.getHours() + ':' + date.getMinutes() + } else { + return null + } } \ No newline at end of file diff --git a/canapGEST/Site/src/store/modules/user/getters.js b/canapGEST/Site/src/store/modules/user/getters.js index f6ce5d115744106a7455e2ff1b0d129215fab7ad..0eb84ebc129ffc5df0745b1ee50841583147ce9b 100644 --- a/canapGEST/Site/src/store/modules/user/getters.js +++ b/canapGEST/Site/src/store/modules/user/getters.js @@ -1,7 +1,7 @@ -export function userIsLogedIn () { +export function userIsLogedIn() { return localStorage.getItem('stored_token') != null } -export function userIsResponsible (state) { +export function userIsResponsible(state) { return state.userData.role === 'responsable' } \ No newline at end of file diff --git a/canapGEST/Site/src/store/modules/user/mutations.js b/canapGEST/Site/src/store/modules/user/mutations.js index a162607b2b6b9d125b640e540639bbc714b5cd86..97740bf7781a4face8985c60ea16227a38641de4 100644 --- a/canapGEST/Site/src/store/modules/user/mutations.js +++ b/canapGEST/Site/src/store/modules/user/mutations.js @@ -1,7 +1,7 @@ -export function setUserData (state, data) { +export function setUserData(state, data) { state.userData = data } -export function setPermittedJobs (state, data) { +export function setPermittedJobs(state, data) { state.permittedJobs = data } \ No newline at end of file diff --git a/canapGEST/Site/src/views/ApplicationView.vue b/canapGEST/Site/src/views/ApplicationView.vue index 97aaf127c69d8b1c045ba56b379805b6048c6ebc..be217840d938bd5b9fd96fe3d506a0eb66ca24d1 100644 --- a/canapGEST/Site/src/views/ApplicationView.vue +++ b/canapGEST/Site/src/views/ApplicationView.vue @@ -1,45 +1,72 @@ <template> <div id="application-view"> - <v-container fluid grid-list-sm v-if="loaded"> - <v-flex d-flex> + <v-container fluid grid-list-sm v-if="loaded" justify-space-around> + <v-flex justify-space-around> <ApplicationTitle></ApplicationTitle> </v-flex> <v-alert outline - :value="$store.state.moduleApplications.currentApplication.application_data.personal_data.applicant_application_updated_date" + :value="$store.state.moduleApplications.currentApplication.application_data.personal_data.applicant_application_updated_date != null" type="info" style="margin-bottom: 30px;" >Cette candidature à été modifiée par son propriétaire le {{$store.getters['moduleApplications/getFormatedApplicationUpdateDate']}}</v-alert> - <v-layout row wrap> - <v-flex d-flex xs12 sm8> + <v-layout> + <!-- <v-flex xs12> + <PersonalDataSheet/> + </v-flex> + <v-flex xs12> + <PersonalDataSheet/> + </v-flex> + + <v-flex xs12> + <PersonalDataSheet/> + </v-flex> + <v-flex xs12> + <PersonalDataSheet/> + </v-flex> --> + <v-layout row> + <v-flex grow pa-1> + <v-card dark color="green darken-3"> + <v-card-text><PersonalDataSheet/></v-card-text> + </v-card> + </v-flex> + <v-flex shrink pa-1> + <v-card dark color="green darken-1"> + <v-card-text><FilesDataSheet/></v-card-text> + </v-card> + </v-flex> + </v-layout> + <!--<v-flex d-flex xs12 sm8> <v-layout row wrap> - <v-flex d-flex> + <v-flex d-flex>--> + <!-- <v-card> + <v-layout row wrap> + <v-flex d-flex xs6> <v-layout row wrap> - <v-flex d-flex xs6> - <v-layout row wrap> - <v-flex d-flex> - <PersonalDataSheet/> - </v-flex> - </v-layout> - </v-flex> - <v-flex d-flex xs12 sm5> - <FilesDataSheet/> - </v-flex> - <v-flex d-flex xs12 sm5> - <ScolaritiesDataSheet/> - </v-flex> - <v-flex d-flex xs12 sm5> - <TrainingsDataSheet/> - </v-flex> - <v-flex d-flex xs12 sm5> - <ActivitiesDataSheet/> + <v-flex d-flex> + <PersonalDataSheet/> </v-flex> </v-layout> </v-flex> + <v-flex d-flex xs12 sm5> + <FilesDataSheet/> + </v-flex> + <v-flex d-flex xs12 sm5> + <ScolaritiesDataSheet/> + </v-flex> + <v-flex d-flex xs12 sm5> + <TrainingsDataSheet/> + </v-flex> + <v-flex d-flex xs12 sm5> + <ActivitiesDataSheet/> + </v-flex> </v-layout> - </v-flex> + </v-card>--> + <!-- </v-flex> + </v-layout> + </v-flex>--> <v-flex d-flex xs12 sm4> <ApplicationComments/> </v-flex> @@ -64,14 +91,15 @@ export default { loaded: false } }, - created() { - this.$store.dispatch('moduleApplications/getCurrentApplicationData', { id: this.$route.params.id }).then(() => this.loaded = true) - this.$store.dispatch('moduleApplications/getCurrentApplicationComments', { id: this.$route.params.id }) - this.$store.dispatch('moduleApplications/getCurrentApplicationMarker', { id: this.$route.params.id }) + created() { this.init() }, + watch: { + '$route.params.id'() { this.init() } }, methods: { - formatDate() { - + init() { + this.$store.dispatch('moduleApplications/getCurrentApplicationData', { id: this.$route.params.id }).then(() => this.loaded = true) + this.$store.dispatch('moduleApplications/getCurrentApplicationComments', { id: this.$route.params.id }) + this.$store.dispatch('moduleApplications/getCurrentApplicationMarker', { id: this.$route.params.id }) } }, components: { diff --git a/canapGEST/Site/src/views/ApplicationsView.vue b/canapGEST/Site/src/views/ApplicationsView.vue index a276c83c00da52e42824c1ba92b9c515af17ca75..094f0d3a5050127065b31d3d1467b9d9e5c1713d 100644 --- a/canapGEST/Site/src/views/ApplicationsView.vue +++ b/canapGEST/Site/src/views/ApplicationsView.vue @@ -2,7 +2,7 @@ <div id="applications-view"> <h1>Postulations</h1> <div> - <applicationsFilters /> + <applicationsFilters/> <v-card-title v-if="hasSelected && $store.getters['moduleUser/userIsResponsible']"> <div> Modifications groupées @@ -22,6 +22,7 @@ :headers="headers" :items="$store.getters['moduleApplications/getFilteredApplications']" item-key="applicant_id" + :pagination.sync="pagination" :select-all="$store.getters['moduleUser/userIsResponsible']" :search="$store.state.moduleApplications.filters.search" > @@ -35,10 +36,41 @@ <td>{{ props.item.location_site }}</td> <td>{{ props.item.applicant_address_street }} {{ props.item.applicant_address_npa }}</td> <td>{{ props.item.applicant_mail }}</td> - <td>{{ props.item.applicant_birthdate }}, {{ props.item.applicant_has_majority }}</td> + <td> + {{ props.item.applicant_birthdate }}, + <span + v-if="props.item.applicant_has_majority" + >✔</span> + <span v-else>✘</span> + </td> <td>{{ props.item.applicant_nationality }}</td> <td>{{ props.item.applicant_origin }}</td> - <td>{{ props.item.applicant_speaks_french }} {{ props.item.applicant_speaks_english }} {{ props.item.applicant_speaks_german }} {{ props.item.applicant_speaks_other }}</td> + <td> + <img + src="@/assets/french_logo.png" + alt="logo_french" + width="18" + v-if="props.item.applicant_speaks_french" + > + <img + src="@/assets/german_logo.png" + alt="logo_german" + width="18" + v-if="props.item.applicant_speaks_german" + > + <img + src="@/assets/english_logo.png" + alt="logo_english" + width="18" + v-if="props.item.applicant_speaks_english" + > + <img + src="@/assets/others_logo.png" + alt="logo_others" + width="18" + v-if="props.item.applicant_speaks_other" + > + </td> <td>{{ props.item.applicant_scolarity_end }}</td> <td>{{ props.item.applicant_application_date }}</td> <td> @@ -95,14 +127,15 @@ export default { { text: 'Statut', value: 'fk_status' }, { text: 'Indications', value: 'indications' }, { text: 'Actions', value: 'actions', sortable: false }, - ] + ], + pagination: { 'sortBy': 'applicant_application_date', 'descending': true, 'rowsPerPage': -1 } } }, created() { this.loadApplications() }, computed: { - hasSelected () { return this.selected.length > 0 } + hasSelected() { return this.selected.length > 0 } }, methods: { loadApplications() { @@ -113,19 +146,19 @@ export default { navigateTo(id) { this.$router.push('/application/' + id) }, - updateStatus (id, status) { - this.$store.dispatch('moduleApplications/changeApplicationStatus', {id: id, status: status}) + updateStatus(id, status) { + this.$store.dispatch('moduleApplications/changeApplicationStatus', { id: id, status: status }) }, - updateMultiple () { + updateMultiple() { this.selected.forEach(item => { this.updateStatus(item.applicant_id, this.multipleEditor.status) }) this.$store.dispatch('moduleApplications/getApplications') }, - deleteMultiple () { - if (confirm('Voulez-vous vraiment supprimer les candidatures sélectionnées, cette action est irréversible ?')) { + deleteMultiple() { + if (confirm('Voulez-vous vraiment supprimer les candidatures sélectionnées ? \n Cette action est irréversible.')) { this.selected.forEach(item => { - this.$store.dispatch('moduleApplications/deleteApplication', {id: item.applicant_id}) + this.$store.dispatch('moduleApplications/deleteApplication', { id: item.applicant_id }) }) this.$store.dispatch('moduleApplications/getApplications') }