Skip to content
Snippets Groups Projects
Commit 649baee4 authored by Anthony Gautreau's avatar Anthony Gautreau
Browse files

interpretation du html du sujet

parent 8723023a
No related branches found
No related tags found
No related merge requests found
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<v-col> <v-col>
<v-card variant="elevated"> <v-card variant="elevated">
<v-card-title> <v-card-title>
<h3>{{ mail.sujet }}</h3> <h3 v-html="mail.sujet"></h3>
</v-card-title> </v-card-title>
<v-card-text v-html="mail.corps"></v-card-text> <v-card-text v-html="mail.corps"></v-card-text>
</v-card> </v-card>
......
...@@ -33,6 +33,10 @@ ...@@ -33,6 +33,10 @@
</v-chip> </v-chip>
</template> </template>
<template v-slot:item.sujet="{ item }">
<p v-html="item.sujet"></p>
</template>
<template v-slot:item.motsClefs="{ item }"> <template v-slot:item.motsClefs="{ item }">
<v-chip v-if="item.motsClefs" v-for="mot in item.motsClefs.split(useMailsStore().motsClefsSeparateur)" :key="mot"> <v-chip v-if="item.motsClefs" v-for="mot in item.motsClefs.split(useMailsStore().motsClefsSeparateur)" :key="mot">
{{ mot }} {{ mot }}
......
...@@ -74,7 +74,7 @@ export const useMailsStore = defineStore('mails', { ...@@ -74,7 +74,7 @@ export const useMailsStore = defineStore('mails', {
async reenvoiMail(id: number) { async reenvoiMail(id: number) {
this.loading = true this.loading = true
try { try {
await axios.post('/mail-api/reenvoi', const response = await axios.post('/mail-api/reenvoi',
{ {
id: id id: id
}, { }, {
...@@ -82,6 +82,7 @@ export const useMailsStore = defineStore('mails', { ...@@ -82,6 +82,7 @@ export const useMailsStore = defineStore('mails', {
'Content-Type': 'multipart/form-data' 'Content-Type': 'multipart/form-data'
} }
}) })
this.mails.unshift(response.data)
this.message = `Mail ${id} réenvoyé` this.message = `Mail ${id} réenvoyé`
} catch (error: any) { } catch (error: any) {
this.error = error.message this.error = error.message
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment