fix not display warning if already vote
This commit is contained in:
@@ -13,9 +13,9 @@
|
||||
<li class="list-group-item" v-if="data.election.status == 1">
|
||||
<center>Undian belum bermula</center>
|
||||
</li>
|
||||
<li class="list-group-item" v-if="data.election.status == 2">
|
||||
<li class="list-group-item" v-if="data.election.status == 2 && !hasVoted()">
|
||||
<center>
|
||||
<router-link v-if="data.user.saham >= 500 && !hasVoted()" :to="{ name: 'Vote' }"
|
||||
<router-link v-if="data.user.saham >= 500" :to="{ name: 'Vote' }"
|
||||
class="btn btn-info">
|
||||
Undi Sekarang
|
||||
</router-link>
|
||||
@@ -57,8 +57,8 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(nominee, i) in data.nominees" v-if="nominee.position_id == position.id">
|
||||
<td><img @click="view(i)" :src="createBase64ImageUrl(nominee.photo)" class="thumbnail"
|
||||
style="height: 60px;width: 60px;" />
|
||||
<td><img @click="view(nominee, i)" :src="createBase64ImageUrl(nominee.photo)"
|
||||
class="thumbnail" style="height: 60px;width: 60px;" />
|
||||
</td>
|
||||
<td>{{ nominee.name }}</td>
|
||||
<td>{{ nominee.no_anggota }}</td>
|
||||
@@ -106,7 +106,8 @@ export default {
|
||||
|
||||
data: function () {
|
||||
return {
|
||||
x: {}
|
||||
x: {},
|
||||
selectedNomineeId: null
|
||||
}
|
||||
},
|
||||
|
||||
@@ -136,8 +137,9 @@ export default {
|
||||
return '';
|
||||
},
|
||||
|
||||
view: function (index) {
|
||||
this.x = this.data.nominees[index];
|
||||
view: function (nominee, index) {
|
||||
this.x = nominee;
|
||||
this.selectedNomineeId = index; // Assuming index is the ID
|
||||
this.util.showModal('#nominee-information-modal');
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user