user-ui-update
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="data.baseURL" >MyKoPKB</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">
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -21,13 +21,13 @@
|
|||||||
</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">
|
||||||
@@ -38,13 +38,13 @@
|
|||||||
</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">
|
||||||
|
|||||||
@@ -28,13 +28,13 @@
|
|||||||
</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">
|
||||||
@@ -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,103 +1,88 @@
|
|||||||
<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 }}
|
||||||
Senarai Jawatan
|
</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>Id</th>
|
|
||||||
<th>Nama</th>
|
|
||||||
<th>No. Anggota</th>
|
|
||||||
<th>Unit</th>
|
|
||||||
<th>Jawatan</th>
|
|
||||||
<!-- <th>Partylist</th> -->
|
|
||||||
<th>Maklumat</th>
|
|
||||||
<th>Tindakan</th>
|
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="nominee in nominees">
|
<tr v-for="nominee in nominees">
|
||||||
<td>
|
<td>
|
||||||
<img :alt="nominee.name" :src="createBase64ImageUrl(nominee.photo)" class="thumbnail" style="height: 60px;width: 60px;">
|
<img :alt="nominee.name" :src="createBase64ImageUrl(nominee.photo)" class="thumbnail"
|
||||||
</td>
|
style="height: 60px;width: 60px;">
|
||||||
<td>{{ nominee.name}}</td>
|
</td>
|
||||||
<td>{{ nominee.no_anggota}}</td>
|
<td>{{ nominee.name }}</td>
|
||||||
<td>{{ nominee.unit}}</td>
|
<td>{{ nominee.no_anggota }}</td>
|
||||||
<td>{{ nominee.position}}</td>
|
<td>{{ nominee.unit }}</td>
|
||||||
<td>Papar</td>
|
<td>{{ nominee.position }}</td>
|
||||||
<td>
|
<td>{{ nominee.education }}</td>
|
||||||
|
<td>{{ nominee.experience }}</td>
|
||||||
|
|
||||||
|
|
||||||
<router-link :to="{name: 'Edit Nominee', params:{id:nominee.id}}" class="btn btn-primary">
|
|
||||||
|
<router-link :to="{ name: 'Edit Nominee', params: { id: nominee.id } }"
|
||||||
|
class="btn btn-primary">
|
||||||
<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"
|
|
||||||
@click="util.showModal('#delete-nominee-modal');id=nominee.id">
|
|
||||||
<i class="fa fa-trash"></i> Padam
|
<i class="fa fa-trash"></i> Padam
|
||||||
</button>
|
</button>
|
||||||
</td>
|
</td>
|
||||||
</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>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<modal id="delete-nominee-modal">
|
<modal id="delete-nominee-modal">
|
||||||
<modal-header>Padam Calon</modal-header>
|
<modal-header>Padam Calon</modal-header>
|
||||||
<modal-body>
|
<modal-body>
|
||||||
<h3>Are you sure to delete this nominee?</h3>
|
<h3>Are you sure to delete this nominee?</h3>
|
||||||
</modal-body>
|
</modal-body>
|
||||||
<modal-footer>
|
<modal-footer>
|
||||||
<button class="btn btn-danger" @click="deleteNominee()">Delete</button>
|
<button class="btn btn-danger" @click="deleteNominee()">Delete</button>
|
||||||
<button class="btn btn-default" @click="util.hideModal('#delete-nominee-modal')">
|
<button class="btn btn-default" @click="util.hideModal('#delete-nominee-modal')">
|
||||||
Back
|
Kembali
|
||||||
</button>
|
</button>
|
||||||
</modal-footer>
|
</modal-footer>
|
||||||
</modal>
|
</modal>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default{
|
export default {
|
||||||
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
visible: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
data: function () {
|
data: function () {
|
||||||
@@ -112,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);
|
||||||
})
|
})
|
||||||
@@ -158,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: {
|
||||||
@@ -186,6 +172,4 @@ export default{
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<style>
|
<style></style>
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|||||||
@@ -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>
|
||||||
@@ -43,8 +43,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>
|
||||||
@@ -56,8 +57,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>
|
||||||
@@ -75,8 +77,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>
|
||||||
|
|||||||
@@ -7,7 +7,8 @@
|
|||||||
|
|
||||||
</div><hr>
|
</div><hr>
|
||||||
|
|
||||||
<CENTER><h4>SELAMAT DATANG KE MESYUARAT AGUNG TAHUNAN KoPKB KALI KE-27/2023</h4></CENTER>
|
<CENTER><h4>SELAMAT DATANG KE MESYUARAT AGUNG TAHUNAN KoPKB
|
||||||
|
<br> KALI KE-27/2023 </h4></CENTER>
|
||||||
|
|
||||||
<div class ="centered-button">
|
<div class ="centered-button">
|
||||||
<button class="btn btn-primary" @click=" navigateToURL">Klik pada pautan berikut >></button>
|
<button class="btn btn-primary" @click=" navigateToURL">Klik pada pautan berikut >></button>
|
||||||
|
|||||||
@@ -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" >MyKoPKB</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,7 +2,7 @@
|
|||||||
<html>
|
<html>
|
||||||
<head lang="en">
|
<head lang="en">
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>Voting System</title>
|
<title>MyKoPKB == eVoting System</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" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.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="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
|
||||||
|
|||||||
Reference in New Issue
Block a user