|
13 | 13 | <span class="card-title">Detalhes</span> |
14 | 14 | <table> |
15 | 15 | <tr> |
16 | | - <th>Titulo</th> |
| 16 | + <th>Título</th> |
17 | 17 | <td>{{ email.title }}</td> |
18 | 18 | </tr> |
19 | 19 | <tr> |
|
26 | 26 | </tr> |
27 | 27 | <tr> |
28 | 28 | <th>Cliques</th> |
29 | | - <td>{{ email.click }}</td> |
| 29 | + <td>{{ email.clicks }}</td> |
30 | 30 | </tr> |
31 | 31 | <tr> |
32 | 32 | <th>Descadastros</th> |
33 | 33 | <td>{{ email.unsubscribe }}</td> |
34 | 34 | </tr> |
35 | 35 | <tr> |
36 | | - <th>Bounces</th> |
37 | | - <td>{{ email.bounce }}</td> |
| 36 | + <th>bounces</th> |
| 37 | + <td>{{ email.bounces }}</td> |
38 | 38 | </tr> |
39 | 39 | </table> |
40 | 40 | </div> |
41 | 41 | </div> |
42 | 42 | </div> |
| 43 | + |
| 44 | + <div class="col s6"> |
| 45 | + <div class="card grey lighten-4"> |
| 46 | + <div class="card-content"> |
| 47 | + <span class="card-title">Campanha enviada</span> |
| 48 | + <iframe :src="rendered_mail" style="width: 100%; height: 300px; border: none"></iframe> |
| 49 | + </div> |
| 50 | + </div> |
| 51 | + </div> |
| 52 | + |
| 53 | + <div class="col s12"> |
| 54 | + <div class="card grey lighten-4"> |
| 55 | + <div class="card-content"> |
| 56 | + <span class="card-title">Leads enviados</span> |
| 57 | + |
| 58 | + <table> |
| 59 | + <thead> |
| 60 | + <tr> |
| 61 | + <th>#</th> |
| 62 | + <th>email</th> |
| 63 | + <th>listas</th> |
| 64 | + <th></th> |
| 65 | + </tr> |
| 66 | + </thead> |
| 67 | + <tbody> |
| 68 | + <tr v-for="(lead, index) in leads"> |
| 69 | + <td>{{ index + 1 }}</td> |
| 70 | + <td>{{ lead.email }}</td> |
| 71 | + <td> |
| 72 | + <div class="chip" v-for="chip in lead.lists">{{ chip.title }}</div> |
| 73 | + </td> |
| 74 | + <td> |
| 75 | + <a :href="'#/leads/' + lead._id" class="btn">ver</a> |
| 76 | + </td> |
| 77 | + </tr> |
| 78 | + </tbody> |
| 79 | + </table> |
| 80 | + </div> |
| 81 | + </div> |
| 82 | + </div> |
43 | 83 | </div> |
44 | 84 | </template> |
45 | | - |
46 | 85 | <script> |
47 | 86 | export default { |
48 | 87 | computed: { |
49 | 88 | email: function () { |
50 | 89 | return this.$store.state.email.email |
| 90 | + }, |
| 91 | + leads: function () { |
| 92 | + return this.$store.state.lead.leads |
| 93 | + }, |
| 94 | + rendered_email: function () { |
| 95 | + return process.env.SERVER + '/campaigns/email-render/' + this.email._id |
| 96 | + } |
| 97 | + }, |
| 98 | + methods: { |
| 99 | + getLeads: function () { |
| 100 | + if (this.email.lists) { |
| 101 | + let lists = this.email.lists.join(',') |
| 102 | + this.$store.dispatch('getAllLeads', lists) |
| 103 | + } else { |
| 104 | + setTimeout(this.getLeads, 2000) |
| 105 | + } |
51 | 106 | } |
52 | 107 | }, |
53 | 108 | mounted () { |
54 | 109 | this.$store.dispatch('getOne', this.$route.params.id) |
| 110 | + this.getLeads() |
55 | 111 | } |
56 | 112 | } |
57 | 113 | </script> |
0 commit comments