Merge branch 'Hayatie' of https://gitlab.com/erahn/voting into backup
This commit is contained in:
@@ -1,8 +1,38 @@
|
||||
<template>
|
||||
<<<<<<< HEAD
|
||||
<div class="row col-md-10 col-md-offset-1">
|
||||
<div class="col-md-4">
|
||||
<h4>Maklumat Anggota</h4><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"><b>Saham : </b>{{ data.user.saham }}</li>
|
||||
<li class="list-group-item"><b>Yuran : </b>{{ data.user.yuran }}</li>
|
||||
<li class="list-group-item" v-if="data.election.status==1">
|
||||
<center>Undian belum bermula</center>
|
||||
</li>
|
||||
<li class="list-group-item" v-if="data.election.status==2">
|
||||
<center>
|
||||
<router-link v-if="!hasVoted()" :to="{name: 'Vote'}" class="btn btn-info">
|
||||
Undi Sekarang
|
||||
</router-link>
|
||||
<router-link v-else :to="{name: 'Result'}" class="btn btn-info">
|
||||
Papar Keputusan
|
||||
</router-link>
|
||||
</center>
|
||||
</li>
|
||||
</ul>
|
||||
<div v-if="hasVoted()">
|
||||
<hr/>
|
||||
<h4>Your votes information</h4><hr/>
|
||||
=======
|
||||
<div class="row col-md-10 col-md-offset-1">
|
||||
<div class="col-md-4">
|
||||
<h4>Maklumat Anggota</h4>
|
||||
<hr />
|
||||
>>>>>>> 5d1d05717ec58a685bba0b6393ad934904cba077
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item"><b>Nama : </b>{{ data.user.name }}</li>
|
||||
<li class="list-group-item"><b>No. Kad Pengenalan : </b>{{ data.user.no_kp }}</li>
|
||||
@@ -25,6 +55,42 @@
|
||||
</center>
|
||||
</li>
|
||||
</ul>
|
||||
<<<<<<< HEAD
|
||||
</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>Nama</th>
|
||||
<th>Unit</th>
|
||||
<th>Taraf Pendidikan</th>
|
||||
<th>Pengalaman Kerja </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="createBase64ImageUrl(nominee.photo)"
|
||||
class="thumbnail"
|
||||
style="height: 60px;width: 60px;" />
|
||||
</td>
|
||||
<td>{{ nominee.name }}</td>
|
||||
<td>{{ nominee.unit }}</td>
|
||||
<td>{{ nominee.education}}</td>
|
||||
<td>{{ nominee.experience}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
=======
|
||||
<div v-if="hasVoted()">
|
||||
<hr />
|
||||
<h4>Maklumat Undian Anda</h4>
|
||||
@@ -34,6 +100,7 @@
|
||||
<b>{{ getPosition(result.position_id) }} : </b>{{ getNominee(result.nominee_id) }}
|
||||
</li>
|
||||
</ul>
|
||||
>>>>>>> 5d1d05717ec58a685bba0b6393ad934904cba077
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
<template>
|
||||
<div class="row col-md-10 col-md-offset-1">
|
||||
<div class="col-md-12">
|
||||
|
||||
<!-- <h6 class="text-center">Pautan Zoom</h6> -->
|
||||
<div>
|
||||
<img :src="imageUrl" alt="background-img" class="background-img" @click="navigateToURL" />
|
||||
|
||||
</div><hr>
|
||||
|
||||
<!-- <div class="right-button">
|
||||
<button class="btn btn-info right-button">Lampiran Dokumen MAT ke-27/2023 >></button>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
export default {
|
||||
|
||||
methods: {
|
||||
navigateToURL() {
|
||||
// Navigate to the desired URL
|
||||
window.open('https://linktr.ee/kopkb', '_blank');
|
||||
}
|
||||
},
|
||||
|
||||
created: function () {
|
||||
//console.log(this)
|
||||
},
|
||||
|
||||
data: function () {
|
||||
return {
|
||||
x: {}
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
header: function () {
|
||||
return this.x.name + ' for ' + this.getPosition(this.x.position_id);
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
imageUrl: 'https://imagetolink.com/ib/0zxQzuS6tl.png'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.background-img {
|
||||
/* Styles for the image */
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
|
||||
/* Ensure the image does not exceed container dimensions */
|
||||
max-width: 100%;
|
||||
max-height: 80vh;
|
||||
border-radius: 20px;
|
||||
}
|
||||
/* transform: translate(-50%, -50%); */
|
||||
|
||||
|
||||
|
||||
.right-button {
|
||||
|
||||
border-color: rgb(14, 14, 15);
|
||||
text-align: left; /* Align button content to the left */
|
||||
color: #fff;
|
||||
border-radius: 10px;
|
||||
cursor: pointer;
|
||||
/* padding: 15px ; */
|
||||
}
|
||||
|
||||
|
||||
|
||||
.right-button :hover {
|
||||
/* Button styles on hover */
|
||||
outline-color: #045415;
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -12,11 +12,18 @@
|
||||
<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>
|
||||
@@ -37,6 +44,9 @@
|
||||
<th>Bil.</th>
|
||||
<th></th>
|
||||
<th>Nama</th>
|
||||
<th>Bil.</th>
|
||||
<th></th>
|
||||
<th>Nama</th>
|
||||
<th>Unit</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -49,6 +59,10 @@
|
||||
<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>
|
||||
@@ -63,6 +77,7 @@
|
||||
<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>
|
||||
@@ -70,10 +85,13 @@
|
||||
</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>
|
||||
@@ -134,6 +152,7 @@ export default {
|
||||
vm.data.result = response.data.result;
|
||||
vm.$router.push({ name: 'Voter Home' });
|
||||
$('.modal').modal('hide');
|
||||
$('.modal').modal('hide');
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
@@ -181,9 +200,11 @@ 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;
|
||||
@@ -200,6 +221,7 @@ 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 '';
|
||||
},
|
||||
|
||||
@@ -225,6 +247,15 @@ 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);
|
||||
// }
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<template>
|
||||
<div class="row col-md-10 col-md-offset-1">
|
||||
<div class="col-md-12">
|
||||
<h3 class="text-center">Pautan Zoom</h3>
|
||||
|
||||
<h6 class="text-center">Pautan Zoom</h6>
|
||||
<div>
|
||||
<img :src="imageUrl" alt="Centered Image " class="centered-image" />
|
||||
|
||||
@@ -11,7 +12,7 @@
|
||||
<br> KALI KE-27/2023 </h4></CENTER>
|
||||
|
||||
<div class ="centered-button">
|
||||
<button class="btn btn-primary" @click=" navigateToURL">Klik pada pautan berikut >></button>
|
||||
<button class="btn btn-primary" @click=" navigateToURL" target="_blank">Klik pada pautan berikut >></button>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -76,8 +77,8 @@ export default {
|
||||
|
||||
.centered-image {
|
||||
/* Styles for the image */
|
||||
max-width: 30%; /* Ensure the image does not exceed container width */
|
||||
max-height: 30%; /* Ensure the image does not exceed container height */
|
||||
max-width: 20%; /* Ensure the image does not exceed container width */
|
||||
max-height: 20%; /* Ensure the image does not exceed container height */
|
||||
position: relative;
|
||||
/* top: 50%; */
|
||||
left: 50%;
|
||||
@@ -92,7 +93,7 @@ export default {
|
||||
padding: 20px 40px;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
border-radius: 5px;
|
||||
border-radius: 15px;
|
||||
cursor: pointer;
|
||||
|
||||
}
|
||||
|
||||
@@ -9,30 +9,34 @@
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" :href="data.baseURL" > <img src='https://i.postimg.cc/ZBDD0ZfQ/Whats-App-Image-2024-03-21-at-1-24-46-PM-2.jpg' border='0' alt="MyKoPKB Logo"></a>
|
||||
<a class="navbar-brand" :href="data.baseURL" ><img src='https://i.postimg.cc/ZBDD0ZfQ/Whats-App-Image-2024-03-21-at-1-24-46-PM-2.jpg' border='0' alt="MyKoPKB Logo"></a>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse" id="myNavbar">
|
||||
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<router-link :to="{name: 'Voter Home'}" tag="li" exact>
|
||||
<a href="#">Laman Utama</a>
|
||||
<a href="#"><b>LAMAN UTAMA</b></a>
|
||||
</router-link>
|
||||
|
||||
<router-link :to="{name: 'Mat'}" tag="li" exact>
|
||||
<a href="#">MAT27</a>
|
||||
<a href="#"><b>MAT27</b></a>
|
||||
</router-link>
|
||||
|
||||
<router-link :to="{name: 'Attendance'}" tag="li" exact>
|
||||
<a href="#">Kehadiran</a>
|
||||
<a href="#"><b>KEHADIRAN</b></a>
|
||||
</router-link>
|
||||
|
||||
<router-link :to="{name: 'Zoom'}" tag="li" exact>
|
||||
<a href="#">Pautan Zoom</a>
|
||||
<a href="#"><b>PAUTAN ZOOM</b></a>
|
||||
</router-link>
|
||||
|
||||
<router-link :to="{name: 'Result'}" v-if="data.election.status==2 && hasVoted()" tag="li">
|
||||
<a href="#"><b>KEPUTUSAN</b></a>
|
||||
</router-link>
|
||||
|
||||
<router-link :to="{name: 'Vote'}" v-if="data.election.status==2 && data.user.saham >= 500 && !hasVoted()" tag="li" exact>
|
||||
<a href="#">Undian</a>
|
||||
<a href="#"><b>UNDIAN</b></a>
|
||||
</router-link>
|
||||
|
||||
<!-- <router-link :to="{name: 'Result'}" v-if="data.election.status==2 && hasVoted()" tag="li">
|
||||
@@ -51,7 +55,7 @@
|
||||
<span class="fa fa-user"></span> {{ data.user.name }} <span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li @click="logout()"><a>Logout</a></li>
|
||||
<li @click="logout()"><a>Log Keluar</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user