Merge branch 'finadev' of https://gitlab.com/erahn/voting into finadev

This commit is contained in:
Afiq Hamzah
2024-04-07 11:33:53 +08:00
34 changed files with 451 additions and 228 deletions
@@ -1,7 +1,7 @@
<template>
<div class="row col-md-10 col-md-offset-1">
<div class="col-md-12">
<h2 class="text-center">Pengesahan Kehadiran</h2>
<h3 class="text-center">Pendaftaran Kehadiran</h3>
<hr />
<ul class="list-group">
<li class="list-group-item"><b>No. Kad Pengenalan : </b>{{ data.user.no_kp }}</li>
@@ -18,7 +18,7 @@
</ul>
<div v-if="hasVoted()">
<hr />
<h4>Your votes information</h4>
<h4>Maklumat Undian</h4>
<hr />
<ul class="list-group">
<li class="list-group-item" v-for="result in data.result">
@@ -18,7 +18,7 @@
Vote Now
</router-link>
<router-link v-else :to="{name: 'Result'}" class="btn btn-info">
View Result
Papar Keputusan
</router-link>
</center>
</li>
@@ -45,8 +45,9 @@
<tr>
<th></th>
<th>Name</th>
<th>Partylist</th>
<th>Unit</th>
<th>Taraf Pendidikan</th>
<th>Pengalaman Kerja </th>
</tr>
</thead>
<tbody>
@@ -58,8 +59,9 @@
style="height: 60px;width: 60px;" />
</td>
<td>{{ nominee.name }}</td>
<td>{{ getPartylist(nominee.partylist_id) }}</td>
<td>{{ nominee.unit }}</td>
<td>{{ nominee.unit }}</td>
<td>{{ nominee.education}}</td>
<td>{{ nominee.experience}}</td>
</tr>
</tbody>
</table>
@@ -77,8 +79,8 @@
<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 }}
<b> education : </b>{{ getPartylist(x.education) }}<br/><hr/>
{{ x.experience }}
</div>
</div>
</modal-body>
@@ -1,7 +1,7 @@
<template>
<div class="row col-md-10 col-md-offset-1">
<div class="col-md-4">
<h4>Positions</h4><hr/>
<h4>Jawatan</h4><hr/>
<ul class="list-group">
<router-link :key="position.id" v-for="position in data.positions" class="list-group-item" :class="{'active':position.id==position_id}" tag="li" :to="{query:{position_id:position.id}}" exact replace>
{{ position.name }}
@@ -9,7 +9,7 @@
<li class="list-group-item">
<center>
<button class="btn btn-info" @click="refreshResults()">
Refresh results <i class="fa fa-refresh"></i>
Kemaskini Keputusan <i class="fa fa-refresh"></i>
</button>
</center>
</li>
@@ -1,16 +1,43 @@
<template>
<div class="row col-md-10 col-md-offset-1">
<div class="col-md-12">
<h2 class="text-center">Pautan Zoom</h2>
</div>
<h3 class="text-center">Pautan Zoom</h3>
<div>
<img :src="imageUrl" alt="Centered Image " class="centered-image" />
</div><hr>
<CENTER><h4>SELAMAT DATANG KE MESYUARAT AGUNG TAHUNAN KoPKB
<br> KALI KE-27/2023 </h4></CENTER>
<div class ="centered-button">
<button class="btn btn-primary" @click=" navigateToURL">Klik pada pautan berikut >></button>
</div>
<!--
<div>
<button class="centered-button" @click="handleClick">Klik pada pautan berikut >> </button>
</div> -->
</div>
</div>
</template>
<script>
export default {
methods: {
navigateToURL() {
// Navigate to the desired URL
window.location.href = 'https://us06web.zoom.us/j/87138156396?pwd=JEakXmAZjRnPeXbPN7K8ajnbL0X77a.1';
}
},
created: function () {
//console.log(this)
},
@@ -21,12 +48,63 @@ export default {
}
},
computed: {
header: function () {
return this.x.name + ' for ' + this.getPosition(this.x.position_id);
}
},
data() {
return {
imageUrl:'https://th.bing.com/th/id/OIP.vCNlpyR-8eSN6qHGGIQemAHaCr?w=338&h=126&c=7&r=0&o=5&dpr=2&pid=1.7'
}
}
// CustomButton {
// }
// methods: {
// goToDestination() {
// // Replace 'destinationURL' with the URL you want to navigate to
// window.location.href = 'https://us06web.zoom.us/j/87138156396?pwd=JEakXmAZjRnPeXbPN7K8ajnbL0X77a.1';
// }
// }
};
</script>
<style>
.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 */
position: relative;
/* top: 50%; */
left: 50%;
transform: translate(-50%, -50%);
}
.centered-button {
/* Button styles */
align-items: center;
/* background-color: #4CAF50; Green */
border-color:rgb(219, 222, 226);
padding: 20px 40px;
text-align: center;
color: #fff;
border-radius: 5px;
cursor: pointer;
}
</script>
.centered-button:hover {
/* Button styles on hover */
outline-color: #045415;
}
</style>
@@ -9,7 +9,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" :href="data.baseURL" >AGM</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">
@@ -1,34 +1,46 @@
<template>
<div class="col-md-5 col-md-offset-3">
<div class="panel panel-default">
<div class="panel-heading">
<h4>Selamat Datang!</h4>
</div>
<div class="col-md-5 col-md-offset-3">
<div class="panel panel-default">
<div class="panel-body">
<form @submit.prevent="login" id="login_form">
<div class="text-center">
<div class="form-group">
<label for="no_kp">Masukkan No. Kad Pengenalan!</label>
<input type="text" name="no_kp" class="form-control" required/>
<div class="panel-heading">
<img id="logo" alt="Logo">
<h4>Selamat Datang ke MyKoPKB eVoting System !</h4>
</div>
</div>
<div class="panel-body">
<form @submit.prevent="login" id="login_form">
<div class="form-group">
<input
type="submit"
class="btn btn-primary form-control"
value="Login"/>
</div>
<div class="form-group">
<label for="no_kp">Sila Masukkan No. Kad Pengenalan</label>
<input type="text" name="no_kp" placeholder="masukkan no .k/p" class="form-control" required />
</div>
<div class="form-group">
<input type="submit" class="btn btn-primary form-control" value="Masuk" />
</div>
</form>
</div>
</form>
</div>
</div>
</div>
</template>
<script>
export default{
// JavaScript to set the image source
document.addEventListener('DOMContentLoaded', function () {
// Select the image element by its ID
var logoImage = document.getElementById('logo');
// Set the source of the image dynamically
logoImage.src = 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcS62as3fVF6AdC6CZhfSIG4GCDBSzS3YyhlJg&s'; // Replace this URL with your desired image URL
});
export default {
data: function () {
return {
@@ -39,22 +51,22 @@ export default{
created: function () {
if (this.util.isLogin())
//return this.$router.push({name:'Admin Home'})
this.util.setTitle('Voter Login');
this.util.setTitle('Log Masuk Pengundi=====');
},
methods: {
login: function(){
axios.post(config.API+'voter/login', $('#login_form').serialize())
.then(response => {
this.stopLoading();
if (this.util.showResult(response, 'success')) {
this.$router.push({ name: 'Voter Verify',params: {'nokp' : response.data.nokp,'notel' : response.data.notel} })
}
})
.catch(error => {
vm.stopLoading();
this.util.showResult(error, 'error');
})
login: function () {
axios.post(config.API + 'voter/login', $('#login_form').serialize())
.then(response => {
this.stopLoading();
if (this.util.showResult(response, 'success')) {
this.$router.push({ name: 'Voter Verify', params: { 'nokp': response.data.nokp, 'notel': response.data.notel } })
}
})
.catch(error => {
vm.stopLoading();
this.util.showResult(error, 'error');
})
},
startLoading: function () {
this.util.notify('Logging in', 'loading');
@@ -67,11 +79,41 @@ export default{
}
},
}
};
</script>
<style>
body {
padding: 50px 5px;
/* background-color:; */
}
</style>
.logo {
width: 200px;
/* Adjust width as needed */
height: auto;
object-fit: cover;
}
.form-control {
border-radius: 0.80rem;
cursor: pointer;
}
.btn-primary:hover {
background-color:#A7D397;
color: #f3f6f8; /* Change text color on hover */
text-shadow : 2px 2px 8px rgba(0, 0, 0, 0.5);
}
</style>