Merge branch 'backup' of https://gitlab.com/erahn/voting into hotfix/pdf
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div v-if="!loading">
|
<div v-if="!loading">
|
||||||
<nav class="navbar navbar-default navbar-fixed-top" id="nav">
|
<nav class="navbar navbar-default navbar-fixed-top" id="nav">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
@@ -8,63 +8,63 @@
|
|||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
</button>
|
</button>
|
||||||
<a class="navbar-brand" :href="data.baseURL" ><img src='/images/MyKoPKB-logo.png' 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' width="150" height="auto" alt="MyKoPKB Logo"></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="collapse navbar-collapse" id="myNavbar">
|
<div class="collapse navbar-collapse" id="myNavbar">
|
||||||
|
|
||||||
<ul class="nav navbar-nav">
|
<ul class="nav navbar-nav">
|
||||||
<!-- {{ users }} -->
|
<!-- {{ users }} -->
|
||||||
<router-link :to="{name: 'Admin Home'}" tag="li" exact><a href="#">Laman Utama</a></router-link>
|
<router-link :to="{name: 'Admin Home'}" tag="li" exact><a href="#">Laman Utama</a></router-link>
|
||||||
<router-link :to="{name: 'Kemaskini Jawatan'}" v-if="data.user.role==1" tag="li">
|
<router-link :to="{name: 'Kemaskini Jawatan'}" v-if="data.user.role==1" tag="li">
|
||||||
<a href="#">Jawatan</a>
|
<a href="#">Jawatan</a>
|
||||||
</router-link>
|
</router-link>
|
||||||
|
|
||||||
<!-- <router-link :to="{name: 'Manage Partylist'}" v-if="data.user.role==1" tag="li">
|
<!-- <router-link :to="{name: 'Manage Partylist'}" v-if="data.user.role==1" tag="li">
|
||||||
<a href="#">Manage Partylist</a>
|
<a href="#">Manage Partylist</a>
|
||||||
</router-link> -->
|
</router-link> -->
|
||||||
|
|
||||||
<router-link :to="{name: 'Manage Voter'}" v-if="data.user.role==1" tag="li">
|
<router-link :to="{name: 'Manage Voter'}" v-if="data.user.role==1" tag="li">
|
||||||
<a href="#">Anggota Koperasi</a>
|
<a href="#">Anggota Koperasi</a>
|
||||||
</router-link>
|
</router-link>
|
||||||
|
|
||||||
<router-link :to="{name: 'Maklumat Calon'}" v-if="data.user.role==1" tag="li">
|
<router-link :to="{name: 'Maklumat Calon'}" v-if="data.user.role==1" tag="li">
|
||||||
<a href="#">Calon</a>
|
<a href="#">Calon</a>
|
||||||
</router-link>
|
</router-link>
|
||||||
|
|
||||||
<router-link :to="{name: 'Kehadiran Calon'}" v-if="data.user.role==1" tag="li">
|
<router-link :to="{name: 'Kehadiran Calon'}" v-if="data.user.role==1" tag="li">
|
||||||
<a href="#">Kehadiran</a>
|
<a href="#">Kehadiran</a>
|
||||||
</router-link>
|
</router-link>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="nav navbar-right navbar-nav">
|
<ul class="nav navbar-right navbar-nav">
|
||||||
<li class="dropdown">
|
<li class="dropdown">
|
||||||
<a
|
<a
|
||||||
href="#"
|
href="#"
|
||||||
class="dropdown-toggle"
|
class="dropdown-toggle"
|
||||||
data-toggle="dropdown"
|
data-toggle="dropdown"
|
||||||
role="button" aria-haspopup="true"
|
role="button" aria-haspopup="true"
|
||||||
aria-expanded="false">
|
aria-expanded="false">
|
||||||
<span class="fa fa-user"></span> {{ data.user.name }} <span class="caret"></span>
|
<span class="fa fa-user"></span> {{ data.user.name }} <span class="caret"></span>
|
||||||
</a>
|
</a>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
|
|
||||||
<router-link :to="{name:'Update Account'}" tag="li" exact>
|
<router-link :to="{name:'Update Account'}" tag="li" exact>
|
||||||
<a href="#">Kemaskini Akaun</a>
|
<a href="#">Kemaskini Akaun</a>
|
||||||
</router-link>
|
</router-link>
|
||||||
|
|
||||||
<router-link :to="{name: 'Manage Account'}" tag="li" v-if="data.user.id==1">
|
<router-link :to="{name: 'Manage Account'}" tag="li" v-if="data.user.id==1">
|
||||||
<a href="#">Pengurusan Akaun</a>
|
<a href="#">Pengurusan Akaun</a>
|
||||||
</router-link>
|
</router-link>
|
||||||
|
|
||||||
<li @click="logout()"><a>Log Keluar</a></li>
|
<li @click="logout()"><a>Log Keluar</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<router-view></router-view>
|
<router-view></router-view>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="loading" class="container">
|
<div v-if="loading" class="container">
|
||||||
@@ -74,15 +74,15 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default{
|
export default{
|
||||||
|
|
||||||
// data: () =>({
|
// data: () =>({
|
||||||
// loading: true,
|
// loading: true,
|
||||||
// users:{'roles' : 1},
|
// users:{'roles' : 1},
|
||||||
// }),
|
// }),
|
||||||
|
|
||||||
created: function () {
|
created: function () {
|
||||||
this.util.setTitle('Voting System - Administrator');
|
this.util.setTitle('Voting System - Administrator');
|
||||||
var vm = this;
|
var vm = this;
|
||||||
@@ -99,7 +99,7 @@
|
|||||||
})
|
})
|
||||||
.catch(error=>{
|
.catch(error=>{
|
||||||
$.notifyClose();
|
$.notifyClose();
|
||||||
if (this.util.showResult(error) == 401) {
|
if (this.util.showResult(error) == 401) {
|
||||||
vm.logout();
|
vm.logout();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -107,7 +107,7 @@
|
|||||||
this.$router.push({name:'Admin Login'});
|
this.$router.push({name:'Admin Login'});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
logout: function () {
|
logout: function () {
|
||||||
localStorage.clear();
|
localStorage.clear();
|
||||||
@@ -116,9 +116,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
body{
|
body{
|
||||||
padding: 70px 5px;
|
padding: 70px 5px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -44,19 +44,28 @@
|
|||||||
<td>{{ nominee.no_anggota }}</td>
|
<td>{{ nominee.no_anggota }}</td>
|
||||||
<td>{{ nominee.unit }}</td>
|
<td>{{ nominee.unit }}</td>
|
||||||
<td>{{ nominee.position }}</td>
|
<td>{{ nominee.position }}</td>
|
||||||
<td>{{ nominee.education }}</td>
|
<td>
|
||||||
<td>{{ nominee.experience }}</td>
|
<ol>
|
||||||
|
<li v-for="(item, index) in nominee.education" :key="index">{{ item }}</li>
|
||||||
|
</ol>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<ol>
|
||||||
|
<li v-for="(item, index) in nominee.experience" :key="index">{{ item }}</li>
|
||||||
|
</ol>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<router-link :to="{ name: 'Edit Nominee', params: { id: nominee.id } }"
|
<router-link :to="{ name: 'Edit Nominee', params: { id: nominee.id } }"
|
||||||
class="btn btn-primary">
|
class="btn btn-primary">
|
||||||
<i class="fa fa-edit"></i> Set semula
|
<i class="fa fa-edit"></i>Kemaskini
|
||||||
</router-link>
|
</router-link>
|
||||||
<button class="btn btn-danger" @click="util.showModal(nominee.id)" id=nominee.id>
|
<button class="btn btn-danger" @click="util.showModal(nominee.id)" id=nominee.id>
|
||||||
<i class="fa fa-trash"></i> Padam
|
<i class="fa fa-trash"></i>Padam
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr v-if="nominees.length < 1">
|
<tr v-if="nominees.length < 1">
|
||||||
<td colspan="7">No Calon</td>
|
<td colspan="7">No Calon</td>
|
||||||
@@ -106,15 +115,15 @@ export default {
|
|||||||
.then(response => {
|
.then(response => {
|
||||||
$.notifyClose(); // Close notification
|
$.notifyClose(); // Close notification
|
||||||
// if (this.util.showResult(response, 'success')) {
|
// if (this.util.showResult(response, 'success')) {
|
||||||
if (response.data && response.data.status === 'success') {
|
if (response.data && response.data.status === 'success') {
|
||||||
this.util.notify('Nominee deleted successfully', 'success');
|
this.util.notify('Nominee deleted successfully', 'success');
|
||||||
|
|
||||||
|
|
||||||
// Show success notification
|
// Show success notification
|
||||||
this.refreshNominee(); // Refresh the list of nominees
|
this.refreshNominee(); // Refresh the list of nominees
|
||||||
} else {
|
} else {
|
||||||
this.util.notify('Failed to delete nominee', 'error'); // Show error notification
|
this.util.notify('Failed to delete nominee', 'error'); // Show error notification
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<h4>Edit Voter</h4>
|
<h4><b>Kemaskini Maklumat</b></h4>
|
||||||
<form @submit.prevent="edit()" id="edit-form">
|
<form @submit.prevent="edit()" id="edit-form">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="name">Nama</label>
|
<label for="name">Nama</label>
|
||||||
@@ -13,14 +13,29 @@
|
|||||||
<input type="text" name="no_kp" class="form-control" :value="data.voter.no_kp" required/>
|
<input type="text" name="no_kp" class="form-control" :value="data.voter.no_kp" required/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="telefon">No. Telefon</label>
|
||||||
|
<input type="text" name="telefon" class="form-control" :value="data.voter.telefon" required/>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="Unit">Unit</label>
|
<label for="Unit">Unit</label>
|
||||||
<input type="text" name="unit" class="form-control" :value="data.voter.unit" required/>
|
<input type="text" name="unit" class="form-control" :value="data.voter.unit" required/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<input type="submit" value="Submit" class="btn btn-success"/>
|
<label for="saham">Saham</label>
|
||||||
<router-link :to="{name: 'Manage Voter'}" class="btn btn-default">Back</router-link>
|
<input type="text" name="saham" class="form-control" :value="data.voter.saham" required/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="yuran">Yuran</label>
|
||||||
|
<input type="text" name="yuran" class="form-control" :value="data.voter.yuran" required/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<input type="submit" value="Hantar" class="btn btn-success"/>
|
||||||
|
<router-link :to="{name: 'Manage Voter'}" class="btn btn-default">Kembali</router-link>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user