diff --git a/canapGEST/API/app/Http/Controllers/MailsController.php b/canapGEST/API/app/Http/Controllers/MailsController.php index 9363f47778862059bc05318a1e2de3677720de91..2953d0bfe8c2e3dbe3a3f0fe96d2c6da5e89ff7f 100644 --- a/canapGEST/API/app/Http/Controllers/MailsController.php +++ b/canapGEST/API/app/Http/Controllers/MailsController.php @@ -22,7 +22,7 @@ class MailsController extends Controller // 'Content-Type' => 'text/html', // 'charset'=>'UTF8', 'From' => 'noreply+candidatureApprentis@epfl.ch', - 'Reply-To' => 'noreply+candidatureApprentis@epfl.ch', + 'Reply-To' => 'formation.apprentis@epfl.ch', 'X-Mailer' => 'PHP/' . phpversion() ); diff --git a/canapGEST/Site/package-lock.json b/canapGEST/Site/package-lock.json index 64d59f57847b7a6500b82f968038505f61da20ef..90251a6f342f85b6a3207c61b4eae8d8afcf1480 100644 --- a/canapGEST/Site/package-lock.json +++ b/canapGEST/Site/package-lock.json @@ -6928,9 +6928,9 @@ } }, "lodash": { - "version": "4.17.11", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", - "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "version": "4.17.14", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.14.tgz", + "integrity": "sha512-mmKYbW3GLuJeX+iGP+Y7Gp1AiGHGbXHCOh/jZmrawMmsE7MS4znI3RL2FsjbqOyMayHInjOeykW7PEajUk1/xw==", "dev": true }, "lodash.clonedeep": { @@ -6940,9 +6940,9 @@ "dev": true }, "lodash.defaultsdeep": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.defaultsdeep/-/lodash.defaultsdeep-4.6.0.tgz", - "integrity": "sha1-vsECT4WxvZbL6kBbI8FK1kQ6b4E=", + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/lodash.defaultsdeep/-/lodash.defaultsdeep-4.6.1.tgz", + "integrity": "sha512-3j8wdDzYuWO3lM3Reg03MuQR957t287Rpcxp1njpEa8oDrikb+FwGdW3n+FELh/A6qib6yPit0j/pv9G/yeAqA==", "dev": true }, "lodash.kebabcase": { @@ -7265,9 +7265,9 @@ } }, "mixin-deep": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", - "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", "dev": true, "requires": { "for-in": "^1.0.2", @@ -9499,9 +9499,9 @@ "dev": true }, "set-value": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", - "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", "dev": true, "requires": { "extend-shallow": "^2.0.1", @@ -10651,38 +10651,15 @@ "dev": true }, "union-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", - "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", "dev": true, "requires": { "arr-union": "^3.1.0", "get-value": "^2.0.6", "is-extendable": "^0.1.1", - "set-value": "^0.4.3" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "set-value": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", - "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.1", - "to-object-path": "^0.3.0" - } - } + "set-value": "^2.0.1" } }, "uniq": { diff --git a/canapGEST/Site/src/assets/presets_texts/index.js b/canapGEST/Site/src/assets/presets_texts/index.js new file mode 100644 index 0000000000000000000000000000000000000000..f2a25be220fafbd2df4193ecb03433860a0e86aa --- /dev/null +++ b/canapGEST/Site/src/assets/presets_texts/index.js @@ -0,0 +1,12 @@ +let preset_texts = [ + { + title: "Dossier refusé", + content: "Votre dossier est refusé" + }, + { + title: "Dossier incomplet", + content: "Votre dossier est incomplet" + } + +] +export default preset_texts \ No newline at end of file diff --git a/canapGEST/Site/src/components/application/mailDialog.vue b/canapGEST/Site/src/components/application/mailDialog.vue index 10d0e770b67c6f70c5f03e8125bf088474be9677..57ccecf94fa10a1a2648f29abee6cf73383aea0e 100644 --- a/canapGEST/Site/src/components/application/mailDialog.vue +++ b/canapGEST/Site/src/components/application/mailDialog.vue @@ -15,8 +15,10 @@ <v-layout wrap> <v-flex xs12 sm6> <v-select - :items="['Refus', 'Dossier incomplet', 'Autre']" + :items="texts" label="Type de réponse" + item-text="title" + item-value="title" v-model="mail.type" @change="getMailText" ></v-select> @@ -37,6 +39,8 @@ </template> <script> +import preset_texts from '@/assets/presets_texts/index.js' + export default { name: 'mail-dialog', props: { @@ -62,13 +66,12 @@ export default { type: '', content: '' }, - texts: { - incomplete: 'Dossier incomplet', - denied: 'Dossier refusé', - other: '' - } + texts: {} } }, + created () { + this.texts = preset_texts + }, computed: { recipientsFormat () { return this.mail.to.length > 1 ? this.mail.to[0] + ' et ' + (this.mail.to.length - 1) + ' autre(s)' : this.mail.to[0] @@ -79,17 +82,10 @@ export default { 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 - } + var result = this.texts.find(obj => { + return obj.title === this.mail.type + }) + this.mail.content = result.content } } } diff --git a/canapGEST/Site/src/views/ApplicationsView.vue b/canapGEST/Site/src/views/ApplicationsView.vue index 7234b04c8727e0315977d6afa969c9de51eca485..5ff2e23ddf8859a013d33cb5af90d7f46d422d2c 100644 --- a/canapGEST/Site/src/views/ApplicationsView.vue +++ b/canapGEST/Site/src/views/ApplicationsView.vue @@ -36,7 +36,9 @@ > <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) && !$store.getters['moduleUser/userIsResponsible'] }"> + <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> @@ -91,9 +93,13 @@ <td>{{ props.item.applicant_scolarity_end }}</td> <td>{{ getFormatedDate(props.item.applicant_application_date) }}</td> <td v-if="!$store.getters['moduleUser/userIsResponsible']"> - <span v-if="props.item.marker_value !== null">{{props.item.marker_value}}</span> - <span v-else>∅</span> - <v-icon inline small>star_rating</v-icon> + <div v-if="props.item.marker_value !== null"> + <span>{{props.item.marker_value}}</span> + <v-icon inline small>star_rating</v-icon> + </div> + <div v-else> + <span>-</span> + </div> </td> <td> <v-select