Skip to content
Snippets Groups Projects
Commit b0dc13aa authored by nicrausaz's avatar nicrausaz
Browse files

Marqueur nouveau, image format

parent 10e64bc4
No related branches found
No related tags found
No related merge requests found
......@@ -14,7 +14,12 @@
</v-flex>
<v-layout wrap>
<v-flex xs12 sm6>
<v-select :items="['Refus', 'Dossier incomplet']" label="Type de réponse" required></v-select>
<v-select
:items="['Refus', 'Dossier incomplet', 'Autre']"
label="Type de réponse"
v-model="mail.type"
@change="getMailText"
></v-select>
</v-flex>
</v-layout>
<v-flex xs12>
......@@ -54,7 +59,13 @@ export default {
mail: {
to: '',
subject: 'EPFL: Votre candidature',
type: '',
content: ''
},
texts: {
incomplete: 'Dossier incomplet',
denied: 'Dossier refusé',
other: ''
}
}
},
......@@ -66,6 +77,19 @@ export default {
methods: {
sendMails () {
this.$store.dispatch('moduleApplications/sendMails', this.mail).then(this.is_open = false)
},
getMailText () {
switch (this.mail.type) {
case 'Refus':
this.mail.content = this.texts.incomplete
break
case 'Dossier incomplet':
this.mail.content = this.texts.denied
break
case 'Autre':
this.mail.content = this.texts.other
break
}
}
}
}
......
......@@ -11,11 +11,11 @@
>
<v-list-tile-avatar>
<img
src="@/assets/logo_pdf.png"
:src="getPicture(file.file_name)"
height="75px"
@click="getFile(file.file_id, file.file_name)"
style="cursor: pointer;"
>
/>
</v-list-tile-avatar>
<v-list-tile-content>
<v-list-tile-title>
......@@ -37,14 +37,33 @@
</template>
<script>
import logoJpg from '../../../assets/logo_jpg.png'
import logoPdf from '../../../assets/logo_pdf.png'
import logoPng from '../../../assets/logo_png.png'
export default {
name: 'files-data-sheet',
methods: {
getFile(id, name) {
getFile (id, name) {
this.$store.dispatch('moduleApplications/getFile', { id: id, name: name })
},
getAllFiles() {
getAllFiles () {
this.$store.dispatch('moduleApplications/getAllFiles', { id: this.$store.state.moduleApplications.currentApplication.application_data.personal_data.applicant_id })
},
getPicture (filename) {
let ext = filename.split('.')[1]
switch (ext) {
case 'jpg':
return logoJpg
case 'pdf':
return logoPdf
case 'jpeg':
return logoJpg
case 'png':
return logoPng
default:
break
}
}
}
}
......
......@@ -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
......@@ -28,6 +28,7 @@
:search="$store.state.moduleApplications.filters.search"
>
<template v-slot:items="props">
<span></span>
<tr>
<td
v-if="$store.getters['moduleUser/userIsResponsible']"
......@@ -35,9 +36,7 @@
>
<v-checkbox v-model="props.selected" hide-details color="primary"></v-checkbox>
</td>
<td
:class="{ isNew: isNew(props.item.fk_status, props.item.applicant_application_date) }"
>
<td :class="{ isNew: isNew(props.item.fk_status, props.item.applicant_application_date) && !$store.getters['moduleUser/userIsResponsible'] }">
<v-tooltip bottom class="mr-2">
<template v-slot:activator="{ on }">
<v-icon big @click="navigateTo(props.item.applicant_id)" v-on="on">pageview</v-icon>
......@@ -69,25 +68,25 @@
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>{{ getFormatedDate(props.item.applicant_application_date) }}</td>
......@@ -177,13 +176,16 @@ export default {
this.$store.dispatch('moduleApplications/getApplications')
}, 300)
},
deleteOne (id) {
this.$store.dispatch('moduleApplications/deleteApplication', { id: id })
},
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.deleteOne(item.applicant_id)
})
this.$store.dispatch('moduleApplications/getApplications')
}
setTimeout(() => { this.$store.dispatch('moduleApplications/getApplications') }, 300)
},
toggleMailDialog () {
this.mail_dialog_opened = !this.mail_dialog_opened
......
......@@ -64,7 +64,7 @@
multiple
small-chips
></v-combobox>
<small>Pour ajouter un groupe non-existant, entrer sa valeur puis touche "Enter"</small>
<small>Pour ajouter un groupe non-existant, entrer sa valeur puis "Enter"</small>
</v-flex>
<v-flex xs12 sm6>
<v-text-field
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment