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