block voting 1 and more than 3
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="row col-md-10 col-md-offset-1">
|
||||
<div class="col-md-4">
|
||||
<h4>Maklumat Undian</h4>
|
||||
<h4>UNDIAN CALON ANGGOTA LEMBAGA</h4>
|
||||
<hr />
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item" v-for="position in data.positions">
|
||||
@@ -15,16 +15,16 @@
|
||||
|
||||
<li class="list-group-item">
|
||||
<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> -->
|
||||
</center>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<h4>Pilih Calon</h4>
|
||||
<h4>Senarai Calon</h4>
|
||||
<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>
|
||||
<hr />
|
||||
<div class="panel panel-info" v-for="position in data.positions">
|
||||
@@ -34,7 +34,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Bil.</th>
|
||||
<th>No. Calon</th>
|
||||
<th></th>
|
||||
<th>Nama</th>
|
||||
<th>Unit</th>
|
||||
@@ -109,9 +109,9 @@ export default {
|
||||
this.util.showModal('#vote-modal')
|
||||
},
|
||||
submit: function () {
|
||||
if (Object.keys(this.selected).length === 0) {
|
||||
if (this.selected[0]['nominee_id'].length !== 2) {
|
||||
// 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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user