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