fix vote page
This commit is contained in:
@@ -12,18 +12,11 @@
|
||||
<b> - {{ getSelectedNomineeName(nominee_id) }}</b>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item" v-for="nominee_id in selected[0].nominee_id">
|
||||
<b> - {{ getSelectedNomineeName(nominee_id) }}</b>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<li class="list-group-item">
|
||||
<center>
|
||||
<button class="btn btn-success" @click="util.showModal('#vote-modal')">Hantar</button>
|
||||
<!-- <button class="btn btn-default" @click="reset()">Reset</button> -->
|
||||
<button class="btn btn-success" @click="util.showModal('#vote-modal')">Hantar</button>
|
||||
<!-- <button class="btn btn-default" @click="reset()">Reset</button> -->
|
||||
</center>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -44,9 +37,6 @@
|
||||
<th>Bil.</th>
|
||||
<th></th>
|
||||
<th>Nama</th>
|
||||
<th>Bil.</th>
|
||||
<th></th>
|
||||
<th>Nama</th>
|
||||
<th>Unit</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -59,10 +49,6 @@
|
||||
<td><img @click="view(i)" :src="createBase64ImageUrl(nominee.photo)" class="thumbnail"
|
||||
style="height: 60px;width: 60px;" />
|
||||
</td>
|
||||
<td>{{ nominee.no_calon }}</td>
|
||||
<td><img @click="view(i)" :src="createBase64ImageUrl(nominee.photo)" class="thumbnail"
|
||||
style="height: 60px;width: 60px;" />
|
||||
</td>
|
||||
<td>{{ nominee.name }}</td>
|
||||
<td>{{ nominee.unit }}</td>
|
||||
</tr>
|
||||
@@ -77,7 +63,6 @@
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel"></h5>
|
||||
<h5 class="modal-title" id="exampleModalLabel"></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
@@ -85,13 +70,10 @@
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<h5>Nota: Sila pastikan anda telah membuat undian dengan betul.</h5>
|
||||
<h5>Nota: Sila pastikan anda telah membuat undian dengan betul.</h5>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Tutup</button>
|
||||
<button type="button" class="btn btn-primary" @click="submit()">Hantar</button>
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Tutup</button>
|
||||
<button type="button" class="btn btn-primary" @click="submit()">Hantar</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -152,7 +134,6 @@ export default {
|
||||
vm.data.result = response.data.result;
|
||||
vm.$router.push({ name: 'Voter Home' });
|
||||
$('.modal').modal('hide');
|
||||
$('.modal').modal('hide');
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
@@ -200,11 +181,9 @@ export default {
|
||||
console.log(this.selected[0])
|
||||
},
|
||||
|
||||
getSelectedNomineeName: function (id) {
|
||||
getSelectedNomineeName: function (id) {
|
||||
return this.getNominee(id);
|
||||
},
|
||||
},
|
||||
|
||||
getName: function (id) {
|
||||
let positions = this.data.positions;
|
||||
@@ -221,7 +200,6 @@ export default {
|
||||
let nominees = this.data.nominees;
|
||||
for (var i in nominees)
|
||||
if (nominees[i]['id'] == id) return nominees[i].name;
|
||||
if (nominees[i]['id'] == id) return nominees[i].name;
|
||||
return '';
|
||||
},
|
||||
|
||||
@@ -247,15 +225,6 @@ export default {
|
||||
return "data:image/png;base64," + base64ImageData;
|
||||
}
|
||||
|
||||
view: function (index) {
|
||||
this.x = this.data.nominees[index];
|
||||
this.util.showModal('#nominee-information-modal');
|
||||
},
|
||||
|
||||
createBase64ImageUrl: function (base64ImageData) {
|
||||
return "data:image/png;base64," + base64ImageData;
|
||||
}
|
||||
|
||||
// uncheck: function (checkedName) {
|
||||
// this.checkedName = this.checkedNames.filter(name => name !== checkedName);
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user