Merge branch 'Hayatie' of https://gitlab.com/erahn/voting into finadev
This commit is contained in:
@@ -50,8 +50,8 @@ class UpdateController extends Controller
|
|||||||
$nominee->no_anggota = $request->no_anggota;
|
$nominee->no_anggota = $request->no_anggota;
|
||||||
$nominee->position_id = $request->position_id;
|
$nominee->position_id = $request->position_id;
|
||||||
$nominee->partylist_id = $request->partylist_id;
|
$nominee->partylist_id = $request->partylist_id;
|
||||||
$nominee->motto = $request->motto;
|
$nominee->education = $request->education;
|
||||||
$nominee->description = $request->description;
|
$nominee->experience = $request->experience;
|
||||||
|
|
||||||
if ($request->hasFile('photo')) {
|
if ($request->hasFile('photo')) {
|
||||||
$imageData = file_get_contents($request->file('photo'));
|
$imageData = file_get_contents($request->file('photo'));
|
||||||
|
|||||||
+2
-2
@@ -14,8 +14,8 @@ class Nominee extends Model
|
|||||||
'position_id',
|
'position_id',
|
||||||
'partylist_id',
|
'partylist_id',
|
||||||
'election_id',
|
'election_id',
|
||||||
'description',
|
'experience',
|
||||||
'motto',
|
'education',
|
||||||
'photo',
|
'photo',
|
||||||
];
|
];
|
||||||
public $timestamp = false;
|
public $timestamp = false;
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
class RenameEducationInNomineeTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('nominee', function (Blueprint $table) {
|
||||||
|
$table->renameColumn('motto', 'education');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('nominee', function (Blueprint $table) {
|
||||||
|
$table->renameColumn('motto', 'education');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
class RenameExperienceInNomineeTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('nominee', function (Blueprint $table) {
|
||||||
|
$table->renameColumn('description', 'experience');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('nominee', function (Blueprint $table) {
|
||||||
|
$table->renameColumn('description', 'experience');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 66 KiB |
@@ -9,7 +9,7 @@
|
|||||||
<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="">Voting System</a>
|
<a class="navbar-brand" href="">MyKoPKB</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="collapse navbar-collapse" id="myNavbar">
|
<div class="collapse navbar-collapse" id="myNavbar">
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="col-md-5 col-md-offset-3">
|
<div class="col-md-5 col-md-offset-3">
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<h4>Admin Login</h4>
|
<h4>Admin Log Masuk </h4>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<h3><b>Tambah Jawatan</b></h3>
|
<h3><b>Tambah Jawatan</b></h3>
|
||||||
<form>
|
<form>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="name">Position</label>
|
<label for="name">Jawatan</label>
|
||||||
<input type="text" name="name" class="form-control" required/>
|
<input type="text" name="name" class="form-control" required/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<script>
|
<script>
|
||||||
export default{
|
export default{
|
||||||
created: function () {
|
created: function () {
|
||||||
this.util.setTitle('Voting System - Manage Account');
|
this.util.setTitle('MyKoPKB - Pengurusan Akaun');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<h4>Update Account</h4>
|
<h4>Kemaskini Akaun</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">Name</label>
|
<label for="name">Nama</label>
|
||||||
<input type="text" name="name" class="form-control" :value="data.user.name" required/>
|
<input type="text" name="name" class="form-control" :value="data.user.name" required/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<input type="submit" value="Submit" class="btn btn-info"/>
|
<input type="submit" value="Submit" class="btn btn-info"/>
|
||||||
<router-link :to="{name: 'Update Password'}" class="btn btn-default">Change Password</router-link>
|
<router-link :to="{name: 'Update Password'}" class="btn btn-default">Tukar Kata Laluan</router-link>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -13,9 +13,9 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>ID</th>
|
<th>ID</th>
|
||||||
<th>Name</th>
|
<th>Nama</th>
|
||||||
<th>Email</th>
|
<th>Email</th>
|
||||||
<th>Delete</th>
|
<th>Padam</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
<td>{{ admin.email }}</td>
|
<td>{{ admin.email }}</td>
|
||||||
<td>
|
<td>
|
||||||
<button class="btn btn-danger" @click="id=admin.id;util.showModal('#delete-admin-modal')">
|
<button class="btn btn-danger" @click="id=admin.id;util.showModal('#delete-admin-modal')">
|
||||||
<i class="fa fa-trash"></i> Delete
|
<i class="fa fa-trash"></i> Padam
|
||||||
</button>
|
</button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -1,26 +1,26 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<h4>Update Password</h4>
|
<h4>Kemaskini Kata Laluan </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="old_password">Old Password</label>
|
<label for="old_password">Kata Laluan lama</label>
|
||||||
<input type="password" name="old_password" class="form-control" required/>
|
<input type="password" name="old_password" class="form-control" required/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="password">New Password</label>
|
<label for="password">Kata Laluan Baru </label>
|
||||||
<input type="password" name="password" class="form-control" required/>
|
<input type="password" name="password" class="form-control" required/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="confirm_password">Confirm Password</label>
|
<label for="confirm_password">Sahkan Kata Laluan</label>
|
||||||
<input type="password" name="confirm_password" class="form-control" required/>
|
<input type="password" name="confirm_password" class="form-control" required/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<input type="submit" value="Submit" class="btn btn-info"/>
|
<input type="submit" value="Submit" class="btn btn-info"/>
|
||||||
<router-link :to="{name: 'Update Account'}" class="btn btn-default">Back</router-link>
|
<router-link :to="{name: 'Update Account'}" class="btn btn-default">Kembali</router-link>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -9,10 +9,10 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th width="10%">No. Anggota</th>
|
<th width="10%">No. Anggota</th>
|
||||||
<th width="30%">Name</th>
|
<th width="30%">Nama</th>
|
||||||
<th width="20%">Partylist</th>
|
<th width="20%">Partylist</th>
|
||||||
<th width="20%">Unit</th>
|
<th width="20%">Unit</th>
|
||||||
<th width="20%">Votes</th>
|
<th width="20%">Undian</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<h4>Positions</h4><hr/>
|
<h4>Jawatan</h4><hr/>
|
||||||
<ul class="list-group">
|
<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>
|
<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 }}
|
{{ position.name }}
|
||||||
@@ -9,14 +9,14 @@
|
|||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<center>
|
<center>
|
||||||
<button class="btn btn-info" @click="refreshNominees()">
|
<button class="btn btn-info" @click="refreshNominees()">
|
||||||
Refresh results <i class="fa fa-refresh"></i>
|
Kemaskini Keputusan<i class="fa fa-refresh"></i>
|
||||||
</button>
|
</button>
|
||||||
</center>
|
</center>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<h4>Results</h4><hr/>
|
<h4>Keputusan</h4><hr/>
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">{{ getPosition(position_id) }} - Results as of : {{ last_update }}</div>
|
<div class="panel-heading">{{ getPosition(position_id) }} - Results as of : {{ last_update }}</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<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" >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>
|
||||||
<div class="collapse navbar-collapse" id="myNavbar">
|
<div class="collapse navbar-collapse" id="myNavbar">
|
||||||
|
|
||||||
@@ -46,14 +46,14 @@
|
|||||||
<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="#">Update Account</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="#">Manage Account</a>
|
<a href="#">Pengurusan Akaun</a>
|
||||||
</router-link>
|
</router-link>
|
||||||
|
|
||||||
<li @click="logout()"><a>Logout</a></li>
|
<li @click="logout()"><a>Log Keluar</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -21,36 +21,36 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="motto">Motto</label>
|
<label for="education">Taraf Pendidikan</label>
|
||||||
<input type="text" name="motto" class="form-control" placeholder="(Optional)" />
|
<input type="text" name="education" class="form-control" placeholder="(Optional)" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="description">Description</label>
|
<label for="pengalaman">Pengalaman Kerja</label>
|
||||||
<textarea name="description" class="form-control" placeholder="(Optional)"></textarea>
|
<textarea name="pengalaman" class="form-control" placeholder="(Optional)"></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="position_id">Position</label>
|
<label for="position_id">Jawatan</label>
|
||||||
<select class="form-control" v-model="position_id" name="position_id" required>
|
<select class="form-control" v-model="position_id" name="position_id" required>
|
||||||
<option value="0" disabled>--- Select Position ---</option>
|
<option value="0" disabled>--- Pilih Jawatan ---</option>
|
||||||
<option v-for="position in data.positions" :value="position.id">{{ position.name }}</option>
|
<option v-for="position in data.positions" :value="position.id">{{ position.name }}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<!-- <div class="form-group">
|
||||||
<label for="partylist_id">Partylist</label>
|
<label for="partylist_id">Partylist</label>
|
||||||
<select class="form-control" name="partylist_id">
|
<select class="form-control" name="partylist_id">
|
||||||
<option value="">--- Select Partylist (Optional) ---</option>
|
<option value="">--- Select Partylist (Optional) ---</option>
|
||||||
<option v-for="partylist in data.partylists" :value="partylist.id">{{ partylist.name }}</option>
|
<option v-for="partylist in data.partylists" :value="partylist.id">{{ partylist.name }}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
<div id="imagePreview">
|
<div id="imagePreview">
|
||||||
<img :src="imageUrl" v-if="imageUrl" alt="Preview">
|
<img :src="imageUrl" v-if="imageUrl" alt="Preview">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label for="image">Masukkan Gambar</label>
|
<label for="image">Muatnaik Gambar</label>
|
||||||
<input name="photo" type="file" accept="image/*" id="file-input" @change="handleImageChange">
|
<input name="photo" type="file" accept="image/*" id="file-input" @change="handleImageChange">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -28,19 +28,19 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="motto">Motto</label>
|
<label for="education">Taraf Pendidikan</label>
|
||||||
<input type="text" name="motto" class="form-control" :value="nominee.motto" placeholder="(Optional)" />
|
<input type="text" name="education" class="form-control" :value="nominee.education" placeholder="(Optional)" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="description">Description</label>
|
<label for="experience">Pengalaman Kerja </label>
|
||||||
<textarea name="description" class="form-control" placeholder="(Optional)">{{ nominee.description}}</textarea>
|
<textarea name="experience" class="form-control" placeholder="(Optional)">{{ nominee.experience}}</textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="position_id">Position</label>
|
<label for="position_id">Jawatan</label>
|
||||||
<select class="form-control" name="position_id" :value="nominee.position_id" required>
|
<select class="form-control" name="position_id" :value="nominee.position_id" required>
|
||||||
<option value="0" disabled>--- Select Position ---</option>
|
<option value="0" disabled>--- Pilih Jawatan ---</option>
|
||||||
<option v-for="position in data.positions" :value="position.id">{{ position.name }}</option>
|
<option v-for="position in data.positions" :value="position.id">{{ position.name }}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
<img :src="imageUrl" v-if="imageUrl" alt="Preview">
|
<img :src="imageUrl" v-if="imageUrl" alt="Preview">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label for="image">Masukkan Gambar</label>
|
<label for="image">Muat Naik Gambar</label>
|
||||||
<input name="photo" type="file" accept="image/*" id="file-input" @change="handleImageChange">
|
<input name="photo" type="file" accept="image/*" id="file-input" @change="handleImageChange">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
<router-link
|
<router-link
|
||||||
:to="{name:'Maklumat Calon'}"
|
:to="{name:'Maklumat Calon'}"
|
||||||
class="btn btn-default">
|
class="btn btn-default">
|
||||||
Back
|
Kembali
|
||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -131,7 +131,7 @@ export default{
|
|||||||
$.notifyClose();
|
$.notifyClose();
|
||||||
vm.loading = false;
|
vm.loading = false;
|
||||||
if (vm.util.showResult(response, 'success', 'ajax'))
|
if (vm.util.showResult(response, 'success', 'ajax'))
|
||||||
vm.$router.push({name: 'Maklumat Calon'});
|
vm.$router.push({name: 'Maklumat Calon',query:{refresh:true}});
|
||||||
},
|
},
|
||||||
error: function (error) {
|
error: function (error) {
|
||||||
$.notifyClose();
|
$.notifyClose();
|
||||||
@@ -139,7 +139,7 @@ export default{
|
|||||||
vm.util.showResult(error, 'error', 'ajax');
|
vm.util.showResult(error, 'error', 'ajax');
|
||||||
},
|
},
|
||||||
uploadProgress: function (a, b, c, progress) {
|
uploadProgress: function (a, b, c, progress) {
|
||||||
vm.util.notify('Updating Nominee', 'progress', progress);
|
this.util.notify('Updating nominee', 'progress', progress);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,91 +1,90 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-3" style="max-width: 250px;">
|
<div class="col-md-3" style="max-width: 250px;">
|
||||||
<ul class="list-group">
|
<ul class="list-group">
|
||||||
<router-link
|
<router-link tag="li" class="list-group-item" :to="{ name: 'Maklumat Calon' }" exact replace
|
||||||
tag="li"
|
:class="{ 'active': position_id == 0 }">
|
||||||
class="list-group-item"
|
Senarai Jawatan
|
||||||
:to="{name: 'Maklumat Calon'}"
|
</router-link>
|
||||||
exact
|
<router-link v-for="position in data.positions" :key="position.id" tag="li" class="list-group-item"
|
||||||
replace
|
:to="{ query: { position_id: position.id } }" exact replace>
|
||||||
:class="{'active':position_id==0}">
|
{{ position.name }}
|
||||||
All Position
|
</router-link>
|
||||||
</router-link>
|
</ul>
|
||||||
<router-link
|
</div>
|
||||||
v-for="position in data.positions"
|
<div class="col-md-9 panel panel-default">
|
||||||
:key="position.id"
|
<div class="panel-body table-responsive">
|
||||||
tag="li"
|
<div class="form-group">
|
||||||
class="list-group-item"
|
<router-link :to="{ name: 'Tambah Calon', query: { position_id: position_id } }"
|
||||||
:to="{query: {position_id:position.id}}"
|
class="btn btn-success"><i class="fa fa-plus"></i> Tambah Calon</router-link>
|
||||||
exact
|
</div>
|
||||||
replace>
|
<table class="table table-hover">
|
||||||
{{ position.name }}
|
<thead>
|
||||||
</router-link>
|
<tr>
|
||||||
</ul>
|
<th>Id</th>
|
||||||
</div>
|
<th>Nama</th>
|
||||||
<div class="col-md-9 panel panel-default">
|
<th>No. Anggota</th>
|
||||||
<div class="panel-body table-responsive">
|
<th>Unit</th>
|
||||||
<div class="form-group">
|
<th>Jawatan</th>
|
||||||
<router-link :to="{name: 'Tambah Calon', query:{position_id:position_id}}" class="btn btn-success"><i class="fa fa-plus"></i> Tambah Calon</router-link>
|
<!-- <th>Partylist</th> -->
|
||||||
</div>
|
<th>Taraf Pendidikan </th>
|
||||||
<table class="table table-hover">
|
<th>Pengalaman Kerja</th>
|
||||||
<thead>
|
<th>Tindakan</th>
|
||||||
<tr>
|
|
||||||
<th></th>
|
</tr>
|
||||||
<th>Name</th>
|
</thead>
|
||||||
<th>No. Anggota</th>
|
<tbody>
|
||||||
<th>Unit</th>
|
<tr v-for="nominee in nominees">
|
||||||
<th>Position</th>
|
<td>
|
||||||
<!-- <th>Partylist</th> -->
|
<img :alt="nominee.name" :src="createBase64ImageUrl(nominee.photo)" class="thumbnail"
|
||||||
<th>Action</th>
|
style="height: 60px;width: 60px;">
|
||||||
</tr>
|
</td>
|
||||||
</thead>
|
<td>{{ nominee.name }}</td>
|
||||||
<tbody>
|
<td>{{ nominee.no_anggota }}</td>
|
||||||
<tr v-for="nominee in nominees">
|
<td>{{ nominee.unit }}</td>
|
||||||
<td>
|
<td>{{ nominee.position }}</td>
|
||||||
<img :alt="nominee.name" :src="createBase64ImageUrl(nominee.photo)" class="thumbnail" style="height: 60px;width: 60px;">
|
<td>{{ nominee.education }}</td>
|
||||||
</td>
|
<td>{{ nominee.experience }}</td>
|
||||||
<td>{{ nominee.name}}</td>
|
|
||||||
<td>{{ nominee.no_anggota}}</td>
|
|
||||||
<td>{{ nominee.unit}}</td>
|
|
||||||
<td>{{ nominee.position}}</td>
|
<router-link :to="{ name: 'Edit Nominee', params: { id: nominee.id } }"
|
||||||
<!-- <td>{{ nominee.partylist}}</td> -->
|
class="btn btn-primary">
|
||||||
<td>
|
|
||||||
<router-link :to="{name: 'Edit Nominee', params:{id:nominee.id}}" class="btn btn-info">
|
|
||||||
<i class="fa fa-edit"></i> Edit
|
<i class="fa fa-edit"></i> Edit
|
||||||
</router-link>
|
</router-link>
|
||||||
<button
|
<button class="btn btn-danger" @click="util.showModal(nominee.id)" id=nominee.id>
|
||||||
class="btn btn-danger"
|
<i class="fa fa-trash"></i> Padam
|
||||||
@click="util.showModal('#delete-nominee-modal');id=nominee.id">
|
|
||||||
<i class="fa fa-trash"></i> Delete
|
|
||||||
</button>
|
</button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr v-if="nominees.length < 1">
|
<tr v-if="nominees.length < 1">
|
||||||
<td colspan="7">No nominees</td>
|
<td colspan="7">No Calon</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<modal id="delete-nominee-modal">
|
||||||
|
<modal-header>Padam Calon</modal-header>
|
||||||
|
<modal-body>
|
||||||
|
<h3>Are you sure to delete this nominee?</h3>
|
||||||
|
</modal-body>
|
||||||
|
<modal-footer>
|
||||||
|
<button class="btn btn-danger" @click="deleteNominee()">Delete</button>
|
||||||
|
<button class="btn btn-default" @click="util.hideModal('#delete-nominee-modal')">
|
||||||
|
Kembali
|
||||||
|
</button>
|
||||||
|
</modal-footer>
|
||||||
|
</modal>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<modal id="delete-nominee-modal">
|
|
||||||
<modal-header>Delete Nominee</modal-header>
|
|
||||||
<modal-body>
|
|
||||||
<h3>Are you sure to delete this nominee?</h3>
|
|
||||||
</modal-body>
|
|
||||||
<modal-footer>
|
|
||||||
<button class="btn btn-danger" @click="deleteNominee()">Delete</button>
|
|
||||||
<button class="btn btn-default" @click="util.hideModal('#delete-nominee-modal')">
|
|
||||||
Back
|
|
||||||
</button>
|
|
||||||
</modal-footer>
|
|
||||||
</modal>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default{
|
export default {
|
||||||
|
|
||||||
|
|
||||||
data: function () {
|
data: function () {
|
||||||
return {
|
return {
|
||||||
id: 0
|
id: 0
|
||||||
@@ -98,32 +97,33 @@ export default{
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
deleteNominee: function () {
|
deleteNominee(nomineeId) {
|
||||||
this.util.hideModal('#delete-nominee-modal');
|
this.util.hideModal('#delete-nominee-modal'); // Hide modal
|
||||||
var vm = this;
|
this.util.notify('Deleting nominee', 'loading'); // Show loading notification
|
||||||
this.util.notify('Deleting nominee', 'loading');
|
|
||||||
axios.delete(config.API+'nominee/'+this.id)
|
axios.delete(config.API + 'nominee/' + nomineeId) // Make DELETE request
|
||||||
.then(response=>{
|
.then(response => {
|
||||||
$.notifyClose();
|
$.notifyClose(); // Close notification
|
||||||
if(vm.util.showResult(response, 'success'))
|
if (this.util.showResult(response, 'success')) { // Show success notification
|
||||||
vm.refreshNominee();
|
this.refreshNominee(); // Refresh the list of nominees
|
||||||
})
|
}
|
||||||
.catch(error=>{
|
})
|
||||||
$.notifyClose();
|
.catch(error => {
|
||||||
vm.util.showResult(error, 'error');
|
$.notifyClose(); // Close notification
|
||||||
})
|
this.util.showResult(error, 'error'); // Show error notification
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
refreshNominee: function () {
|
refreshNominee: function () {
|
||||||
var vm = this;
|
var vm = this;
|
||||||
this.util.notify('Refreshing Nominees', 'loading');
|
this.util.notify('Refreshing Nominees', 'loading');
|
||||||
axios.get(config.API+'nominee')
|
axios.get(config.API + 'nominee')
|
||||||
.then(response=>{
|
.then(response => {
|
||||||
$.notifyClose();
|
$.notifyClose();
|
||||||
console.log(response);
|
console.log(response);
|
||||||
vm.data.nominees = response.data;
|
vm.data.nominees = response.data;
|
||||||
})
|
})
|
||||||
.catch(error=>{
|
.catch(error => {
|
||||||
$.notifyClose();
|
$.notifyClose();
|
||||||
vm.showResult(error);
|
vm.showResult(error);
|
||||||
})
|
})
|
||||||
@@ -144,9 +144,9 @@ export default{
|
|||||||
return 'No partylists';
|
return 'No partylists';
|
||||||
},
|
},
|
||||||
|
|
||||||
createBase64ImageUrl: function(base64ImageData) {
|
createBase64ImageUrl: function (base64ImageData) {
|
||||||
return "data:image/png;base64," + base64ImageData;
|
return "data:image/png;base64," + base64ImageData;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
@@ -170,3 +170,6 @@ export default{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<style></style>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<script>
|
<script>
|
||||||
export default{
|
export default{
|
||||||
created: function () {
|
created: function () {
|
||||||
this.util.setTitle('Voting System - Maklumat Calon');
|
this.util.setTitle('MyKoPKB - Maklumat Calon');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -4,12 +4,12 @@
|
|||||||
<h4>Tambah Jawatan</h4>
|
<h4>Tambah Jawatan</h4>
|
||||||
<form @submit.prevent="add()" id="add-form">
|
<form @submit.prevent="add()" id="add-form">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="name">Name</label>
|
<label for="name">Nama</label>
|
||||||
<input type="text" name="name" class="form-control" required>
|
<input type="text" name="name" class="form-control" required>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<button type="submit" class="btn btn-success">Submit</button>
|
<button type="submit" class="btn btn-success">Hantar</button>
|
||||||
<router-link :to="{name: 'Kemaskini Jawatan'}" class="btn btn-default">Back</router-link>
|
<router-link :to="{name: 'Kemaskini Jawatan'}" class="btn btn-default">Kembali</router-link>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<h4>Edit Position</h4>
|
<h4>Edit Jawatan</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">Name</label>
|
<label for="name">Nama</label>
|
||||||
<input type="text" name="name" class="form-control" :value="data.position.name" required/>
|
<input type="text" name="name" class="form-control" :value="data.position.name" required/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<input type="submit" value="Submit" class="btn btn-success"/>
|
<input type="submit" value="Submit" class="btn btn-success"/>
|
||||||
<router-link :to="{name: 'Kemaskini Jawatan'}" class="btn btn-default">Back</router-link>
|
<router-link :to="{name: 'Kemaskini Jawatan'}" class="btn btn-default">Kembali</router-link>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -18,8 +18,8 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>ID</th>
|
<th>ID</th>
|
||||||
<th>Name</th>
|
<th>Nama</th>
|
||||||
<th>Action</th>
|
<th>Tindakan</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@@ -33,12 +33,12 @@
|
|||||||
<button
|
<button
|
||||||
class="btn btn-danger"
|
class="btn btn-danger"
|
||||||
@click="util.showModal('#delete-position-modal');id=position.id">
|
@click="util.showModal('#delete-position-modal');id=position.id">
|
||||||
<i class="fa fa-trash"></i> Delete
|
<i class="fa fa-trash"></i> Padam
|
||||||
</button>
|
</button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr v-if="data.positions.length < 1">
|
<tr v-if="data.positions.length < 1">
|
||||||
<td colspan="3">No Positions</td>
|
<td colspan="3">No Jawatan</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@@ -47,12 +47,12 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<modal id="delete-position-modal">
|
<modal id="delete-position-modal">
|
||||||
<modal-header>Delete Position</modal-header>
|
<modal-header>Padam Jawatan</modal-header>
|
||||||
<modal-body>
|
<modal-body>
|
||||||
<h2>Are you sure to delete Position?</h2>
|
<h2>Are you sure to delete Position?</h2>
|
||||||
</modal-body>
|
</modal-body>
|
||||||
<modal-footer>
|
<modal-footer>
|
||||||
<button class="btn btn-danger" @click="deletePosition()">Delete</button>
|
<button class="btn btn-danger" @click="deletePosition()">Padam</button>
|
||||||
<button class="btn btn-default" @click="util.hideModal('#delete-position-modal')">Cancel</button>
|
<button class="btn btn-default" @click="util.hideModal('#delete-position-modal')">Cancel</button>
|
||||||
</modal-footer>
|
</modal-footer>
|
||||||
</modal>
|
</modal>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<script>
|
<script>
|
||||||
export default{
|
export default{
|
||||||
created: function () {
|
created: function () {
|
||||||
this.util.setTitle('Voting System - Kemaskini Jawatan');
|
this.util.setTitle('MyKoPKB-Kemaskini Jawatan');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
<script>
|
<script>
|
||||||
export default{
|
export default{
|
||||||
created: function () {
|
created: function () {
|
||||||
this.util.setTitle('Voting System - Maklumat Pengundi');
|
this.util.setTitle('MyKoPKB - Maklumat Pengundi');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="row col-md-10 col-md-offset-1">
|
<div class="row col-md-10 col-md-offset-1">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<h2 class="text-center">Pengesahan Kehadiran</h2>
|
<h3 class="text-center">Pendaftaran Kehadiran</h3>
|
||||||
<hr />
|
<hr />
|
||||||
<ul class="list-group">
|
<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. Kad Pengenalan : </b>{{ data.user.no_kp }}</li>
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
<div v-if="hasVoted()">
|
<div v-if="hasVoted()">
|
||||||
<hr />
|
<hr />
|
||||||
<h4>Your votes information</h4>
|
<h4>Maklumat Undian</h4>
|
||||||
<hr />
|
<hr />
|
||||||
<ul class="list-group">
|
<ul class="list-group">
|
||||||
<li class="list-group-item" v-for="result in data.result">
|
<li class="list-group-item" v-for="result in data.result">
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
Vote Now
|
Vote Now
|
||||||
</router-link>
|
</router-link>
|
||||||
<router-link v-else :to="{name: 'Result'}" class="btn btn-info">
|
<router-link v-else :to="{name: 'Result'}" class="btn btn-info">
|
||||||
View Result
|
Papar Keputusan
|
||||||
</router-link>
|
</router-link>
|
||||||
</center>
|
</center>
|
||||||
</li>
|
</li>
|
||||||
@@ -45,8 +45,9 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th></th>
|
<th></th>
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
<th>Partylist</th>
|
|
||||||
<th>Unit</th>
|
<th>Unit</th>
|
||||||
|
<th>Taraf Pendidikan</th>
|
||||||
|
<th>Pengalaman Kerja </th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@@ -58,8 +59,9 @@
|
|||||||
style="height: 60px;width: 60px;" />
|
style="height: 60px;width: 60px;" />
|
||||||
</td>
|
</td>
|
||||||
<td>{{ nominee.name }}</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>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@@ -77,8 +79,8 @@
|
|||||||
<h3><strong><em>"{{ x.motto }}"</em></strong></h3>
|
<h3><strong><em>"{{ x.motto }}"</em></strong></h3>
|
||||||
<b> Name : </b>{{ x.name }}<br/>
|
<b> Name : </b>{{ x.name }}<br/>
|
||||||
<b> Unit : </b>{{ x.unit }}<br/>
|
<b> Unit : </b>{{ x.unit }}<br/>
|
||||||
<b> Partylist : </b>{{ getPartylist(x.partylist_id) }}<br/><hr/>
|
<b> education : </b>{{ getPartylist(x.education) }}<br/><hr/>
|
||||||
{{ x.description }}
|
{{ x.experience }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</modal-body>
|
</modal-body>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="row col-md-10 col-md-offset-1">
|
<div class="row col-md-10 col-md-offset-1">
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<h4>Positions</h4><hr/>
|
<h4>Jawatan</h4><hr/>
|
||||||
<ul class="list-group">
|
<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>
|
<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 }}
|
{{ position.name }}
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<center>
|
<center>
|
||||||
<button class="btn btn-info" @click="refreshResults()">
|
<button class="btn btn-info" @click="refreshResults()">
|
||||||
Refresh results <i class="fa fa-refresh"></i>
|
Kemaskini Keputusan <i class="fa fa-refresh"></i>
|
||||||
</button>
|
</button>
|
||||||
</center>
|
</center>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -1,16 +1,43 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="row col-md-10 col-md-offset-1">
|
<div class="row col-md-10 col-md-offset-1">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<h2 class="text-center">Pautan Zoom</h2>
|
<h3 class="text-center">Pautan Zoom</h3>
|
||||||
|
<div>
|
||||||
|
<img :src="imageUrl" alt="Centered Image " class="centered-image" />
|
||||||
|
|
||||||
</div>
|
</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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
navigateToURL() {
|
||||||
|
// Navigate to the desired URL
|
||||||
|
window.location.href = 'https://us06web.zoom.us/j/87138156396?pwd=JEakXmAZjRnPeXbPN7K8ajnbL0X77a.1';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
created: function () {
|
created: function () {
|
||||||
//console.log(this)
|
//console.log(this)
|
||||||
},
|
},
|
||||||
@@ -21,12 +48,63 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
header: function () {
|
header: function () {
|
||||||
return this.x.name + ' for ' + this.getPosition(this.x.position_id);
|
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>
|
</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;
|
||||||
|
|
||||||
|
}
|
||||||
|
.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>
|
||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
</button>
|
</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>
|
||||||
<div class="collapse navbar-collapse" id="myNavbar">
|
<div class="collapse navbar-collapse" id="myNavbar">
|
||||||
|
|
||||||
|
|||||||
@@ -1,34 +1,46 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="col-md-5 col-md-offset-3">
|
<div class="col-md-5 col-md-offset-3">
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
|
||||||
<h4>Selamat Datang!</h4>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="panel-body">
|
<div class="text-center">
|
||||||
<form @submit.prevent="login" id="login_form">
|
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="panel-heading">
|
||||||
<label for="no_kp">Masukkan No. Kad Pengenalan!</label>
|
<img id="logo" alt="Logo">
|
||||||
<input type="text" name="no_kp" class="form-control" required/>
|
<h4>Selamat Datang ke MyKoPKB eVoting System !</h4>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="panel-body">
|
||||||
|
<form @submit.prevent="login" id="login_form">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<input
|
<label for="no_kp">Sila Masukkan No. Kad Pengenalan</label>
|
||||||
type="submit"
|
<input type="text" name="no_kp" placeholder="masukkan no .k/p" class="form-control" required />
|
||||||
class="btn btn-primary form-control"
|
</div>
|
||||||
value="Login"/>
|
|
||||||
</div>
|
<div class="form-group">
|
||||||
|
<input type="submit" class="btn btn-primary form-control" value="Masuk" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<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 () {
|
data: function () {
|
||||||
return {
|
return {
|
||||||
@@ -39,22 +51,22 @@ export default{
|
|||||||
created: function () {
|
created: function () {
|
||||||
if (this.util.isLogin())
|
if (this.util.isLogin())
|
||||||
//return this.$router.push({name:'Admin Home'})
|
//return this.$router.push({name:'Admin Home'})
|
||||||
this.util.setTitle('Voter Login');
|
this.util.setTitle('Log Masuk Pengundi=====');
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
login: function(){
|
login: function () {
|
||||||
axios.post(config.API+'voter/login', $('#login_form').serialize())
|
axios.post(config.API + 'voter/login', $('#login_form').serialize())
|
||||||
.then(response => {
|
.then(response => {
|
||||||
this.stopLoading();
|
this.stopLoading();
|
||||||
if (this.util.showResult(response, 'success')) {
|
if (this.util.showResult(response, 'success')) {
|
||||||
this.$router.push({ name: 'Voter Verify',params: {'nokp' : response.data.nokp,'notel' : response.data.notel} })
|
this.$router.push({ name: 'Voter Verify', params: { 'nokp': response.data.nokp, 'notel': response.data.notel } })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
vm.stopLoading();
|
vm.stopLoading();
|
||||||
this.util.showResult(error, 'error');
|
this.util.showResult(error, 'error');
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
startLoading: function () {
|
startLoading: function () {
|
||||||
this.util.notify('Logging in', 'loading');
|
this.util.notify('Logging in', 'loading');
|
||||||
@@ -67,11 +79,41 @@ export default{
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
}
|
|
||||||
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
padding: 50px 5px;
|
padding: 50px 5px;
|
||||||
|
/* background-color:; */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.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>
|
</style>
|
||||||
@@ -4,3 +4,5 @@
|
|||||||
<h4><slot></slot></h4>
|
<h4><slot></slot></h4>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<head lang="en">
|
<head lang="en">
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<title>Voting System - Administrator</title>
|
<title>MyKoPKB - Administrator</title>
|
||||||
<link rel="stylesheet" href="{{ asset('css/app.css') }}">
|
<link rel="stylesheet" href="{{ asset('css/app.css') }}">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@@ -2,15 +2,12 @@
|
|||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head lang="en">
|
<head lang="en">
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<link rel="icon" href="{{ asset('img/myKoPKG.jpg') }}">
|
<title>MyKoPKB == eVoting System</title>
|
||||||
<title>myKoPKB</title>
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||||
<link rel="stylesheet" type="text/css"
|
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
<link rel="stylesheet" href="/css/app.css">
|
||||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css"
|
|
||||||
integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
|
|
||||||
<link rel="stylesheet" href="/css/app.css">
|
|
||||||
|
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
Reference in New Issue
Block a user