interface kehadiran & pautan zoom
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" :href="data.baseURL" >Voting System</a>
|
||||
<a class="navbar-brand" :href="data.baseURL" >AGM</a>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse" id="myNavbar">
|
||||
|
||||
|
||||
@@ -0,0 +1,137 @@
|
||||
<template>
|
||||
<div class="row col-md-10 col-md-offset-1">
|
||||
<div class="col-md-12">
|
||||
<h2 class="text-center">Pengesahan Kehadiran</h2>
|
||||
<hr />
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item"><b>No. Kad Pengenalan : </b>{{ data.user.no_kp }}</li>
|
||||
<li class="list-group-item"><b>No. Anggota : </b>{{ data.user.no_anggota }}</li>
|
||||
<li class="list-group-item"><b>Nama : </b>{{ data.user.name }}</li>
|
||||
<li class="list-group-item"><b>Unit : </b>{{ data.user.unit }}</li>
|
||||
<li class="list-group-item" v-if="data.election.status == 1">
|
||||
<center><router-link :to="{ name: 'Maklumat Calon', query: { position_id: position_id } }"
|
||||
class="btn btn-primary">
|
||||
SAYA TERIMA
|
||||
</router-link></center>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<div v-if="hasVoted()">
|
||||
<hr />
|
||||
<h4>Your votes information</h4>
|
||||
<hr />
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item" v-for="result in data.result">
|
||||
<b>{{ getPosition(result.position_id) }} : </b>{{ getNominee(result.nominee_id) }}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="col-md-8">
|
||||
<h4>Maklumat Calon</h4>
|
||||
<hr />
|
||||
<small>Click Picture to see details</small>
|
||||
<div class="panel panel-primary" v-for="position in data.positions">
|
||||
<div class="panel-heading">{{ position.name }}</div>
|
||||
<div class="panel-body table-responsive">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Name</th>
|
||||
<th>Partylist</th>
|
||||
<th>Unit</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(nominee, i) in data.nominees" v-if="nominee.position_id == position.id">
|
||||
<td><img @click="view(i)" :src="data.storageURL + nominee.image" class="thumbnail"
|
||||
style="height: 60px;width: 60px;" />
|
||||
</td>
|
||||
<td>{{ nominee.name }}</td>
|
||||
<td>{{ getPartylist(nominee.partylist_id) }}</td>
|
||||
<td>{{ nominee.unit }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<modal id="nominee-information-modal" aClass="primary">
|
||||
<modal-header>{{ header }}</modal-header>
|
||||
<modal-body>
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<img :src="data.storageURL + x.image" style="height: 150px; width: 150px" class="thumbnail" />
|
||||
</div>
|
||||
<div class="col-md-9" style="margin-left: 5px;">
|
||||
<h3><strong><em>"{{ x.motto }}"</em></strong></h3>
|
||||
<b> Name : </b>{{ x.name }}<br />
|
||||
<b> Unit : </b>{{ x.unit }}<br />
|
||||
<b> Partylist : </b>{{ getPartylist(x.partylist_id) }}<br />
|
||||
<hr />
|
||||
{{ x.description }}
|
||||
</div>
|
||||
</div>
|
||||
</modal-body>
|
||||
<modal-footer>
|
||||
<button data-dismiss="modal" class="btn btn-default">Close</button>
|
||||
</modal-footer>
|
||||
</modal>
|
||||
|
||||
</div> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
created: function () {
|
||||
//console.log(this)
|
||||
},
|
||||
|
||||
data: function () {
|
||||
return {
|
||||
x: {}
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
hasVoted: function () {
|
||||
return this.data.result.length > 0;
|
||||
},
|
||||
|
||||
getPartylist: function (id) {
|
||||
let partylists = this.data.partylists;
|
||||
for (var i in partylists)
|
||||
if (partylists[i]['id'] == id) return partylists[i]['name'];
|
||||
return 'No Partylist';
|
||||
},
|
||||
|
||||
getPosition: function (id) {
|
||||
let positions = this.data.positions;
|
||||
for (var i in positions)
|
||||
if (positions[i].id == id) return positions[i].name;
|
||||
return '';
|
||||
},
|
||||
|
||||
getNominee: function (id) {
|
||||
let nominees = this.data.nominees;
|
||||
for (var i in nominees)
|
||||
if (nominees[i]['id'] == id) return nominees[i].name;
|
||||
return '';
|
||||
},
|
||||
|
||||
view: function (index) {
|
||||
this.x = this.data.nominees[index];
|
||||
this.util.showModal('#nominee-information-modal');
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
header: function () {
|
||||
return this.x.name + ' for ' + this.getPosition(this.x.position_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,32 @@
|
||||
<template>
|
||||
<div class="row col-md-10 col-md-offset-1">
|
||||
<div class="col-md-12">
|
||||
<h2 class="text-center">Pautan Zoom</h2>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
created: function () {
|
||||
//console.log(this)
|
||||
},
|
||||
|
||||
data: function () {
|
||||
return {
|
||||
x: {}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
computed: {
|
||||
header: function () {
|
||||
return this.x.name + ' for ' + this.getPosition(this.x.position_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -9,7 +9,7 @@
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" :href="data.baseURL" >Voting System</a>
|
||||
<a class="navbar-brand" :href="data.baseURL" >AGM</a>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse" id="myNavbar">
|
||||
|
||||
@@ -19,6 +19,14 @@
|
||||
<a href="#">Home</a>
|
||||
</router-link>
|
||||
|
||||
<router-link :to="{name: 'Attendance'}" tag="li" exact>
|
||||
<a href="#">Kehadiran</a>
|
||||
</router-link>
|
||||
|
||||
<router-link :to="{name: 'Zoom'}" tag="li" exact>
|
||||
<a href="#">Pautan Zoom</a>
|
||||
</router-link>
|
||||
|
||||
<router-link :to="{name: 'Vote'}" v-if="data.election.status==2 && !hasVoted()" tag="li" exact>
|
||||
<a href="#">Vote</a>
|
||||
</router-link>
|
||||
|
||||
Vendored
+14
@@ -4,6 +4,8 @@ import VoterHome from './components/demo/voter/index.vue';
|
||||
import Home from './components/demo/voter/home/index.vue';
|
||||
import Vote from './components/demo/voter/home/vote.vue';
|
||||
import Result from './components/demo/voter/home/result.vue';
|
||||
import Attendance from './components/demo/voter/home/attendance.vue';
|
||||
import Zoom from './components/demo/voter/home/zoom.vue';
|
||||
|
||||
import AdminLogin from './components/demo/admin/login.vue';
|
||||
import AdminIndex from './components/demo/admin/index.vue';
|
||||
@@ -66,6 +68,18 @@ export default [
|
||||
path: 'result',
|
||||
component: Result,
|
||||
name: 'Result'
|
||||
},
|
||||
|
||||
{
|
||||
path: 'attendance',
|
||||
component: Attendance,
|
||||
name: 'Attendance'
|
||||
},
|
||||
|
||||
{
|
||||
path: 'zoom',
|
||||
component: Zoom,
|
||||
name: 'Zoom'
|
||||
}
|
||||
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user