block voting 1 and more than 3
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="row col-md-10 col-md-offset-1">
|
<div class="row col-md-10 col-md-offset-1">
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<h4>Maklumat Undian</h4>
|
<h4>UNDIAN CALON ANGGOTA LEMBAGA</h4>
|
||||||
<hr />
|
<hr />
|
||||||
<ul class="list-group">
|
<ul class="list-group">
|
||||||
<li class="list-group-item" v-for="position in data.positions">
|
<li class="list-group-item" v-for="position in data.positions">
|
||||||
@@ -15,16 +15,16 @@
|
|||||||
|
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<center>
|
<center>
|
||||||
<button class="btn btn-success" @click="util.showModal('#vote-modal')">Hantar</button>
|
<button class="btn btn-success" @click="util.showModal('#vote-modal')">UNDI</button>
|
||||||
<!-- <button class="btn btn-default" @click="reset()">Reset</button> -->
|
<!-- <button class="btn btn-default" @click="reset()">Reset</button> -->
|
||||||
</center>
|
</center>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<h4>Pilih Calon</h4>
|
<h4>Senarai Calon</h4>
|
||||||
<div class="alert alert-warning " role="alert">
|
<div class="alert alert-warning " role="alert">
|
||||||
Boleh mengundi <b> dua (2) calon</b> sahaja!
|
Anda Hanya Boleh Memilih <b> dua (2) Orang Calon</b> Sahaja.
|
||||||
</div>
|
</div>
|
||||||
<hr />
|
<hr />
|
||||||
<div class="panel panel-info" v-for="position in data.positions">
|
<div class="panel panel-info" v-for="position in data.positions">
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th></th>
|
<th></th>
|
||||||
<th>Bil.</th>
|
<th>No. Calon</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
<th>Nama</th>
|
<th>Nama</th>
|
||||||
<th>Unit</th>
|
<th>Unit</th>
|
||||||
@@ -109,9 +109,9 @@ export default {
|
|||||||
this.util.showModal('#vote-modal')
|
this.util.showModal('#vote-modal')
|
||||||
},
|
},
|
||||||
submit: function () {
|
submit: function () {
|
||||||
if (Object.keys(this.selected).length === 0) {
|
if (this.selected[0]['nominee_id'].length !== 2) {
|
||||||
// No selections made
|
// No selections made
|
||||||
this.util.notify('Please select at least one nominee.', 'error');
|
this.util.notify('Sila pastikan anda memilih (2) orang calon.', 'error');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user