Merge branch 'finadev' of https://gitlab.com/erahn/voting into Hayatie
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
return [
|
||||
'message' => 'KoPKB : %s is your TAC to log in to your myKoPKB Member account. It will expire in 5 minutes.',
|
||||
'minutes' => 5
|
||||
'minutes' => 3
|
||||
];
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddNoCalonToNomineeTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('nominee', function (Blueprint $table) {
|
||||
//
|
||||
$table->string('no_calon', 60)->nullable();
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('nominee', function (Blueprint $table) {
|
||||
//
|
||||
$table->dropColumn('no_calon');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
<template>
|
||||
<<<<<<< HEAD
|
||||
<div class="row col-md-10 col-md-offset-1">
|
||||
<div class="col-md-4">
|
||||
<h4>Maklumat Anggota</h4><hr/>
|
||||
@@ -26,11 +27,35 @@
|
||||
<div v-if="hasVoted()">
|
||||
<hr/>
|
||||
<h4>Your votes information</h4><hr/>
|
||||
=======
|
||||
<div class="row col-md-10 col-md-offset-1">
|
||||
<div class="col-md-4">
|
||||
<h4>Maklumat Anggota</h4>
|
||||
<hr />
|
||||
>>>>>>> 5d1d05717ec58a685bba0b6393ad934904cba077
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item" v-for="result in data.result">
|
||||
<b>{{ getPosition(result.position_id) }} : </b>{{ getNominee(result.nominee_id) }}
|
||||
<li class="list-group-item"><b>Nama : </b>{{ data.user.name }}</li>
|
||||
<li class="list-group-item"><b>No. Kad Pengenalan : </b>{{ data.user.no_kp }}</li>
|
||||
<li class="list-group-item"><b>No. Anggota : </b>{{ data.user.no_anggota }}
|
||||
<li class="list-group-item"><b>Unit : </b>{{ data.user.unit }}</li>
|
||||
<li class="list-group-item"><b>Saham : </b>{{ data.user.saham }}</li>
|
||||
<li class="list-group-item"><b>Yuran : </b>{{ data.user.yuran }}</li>
|
||||
<li class="list-group-item" v-if="data.election.status == 1">
|
||||
<center>Undian belum bermula</center>
|
||||
</li>
|
||||
<li class="list-group-item" v-if="data.election.status == 2">
|
||||
<center>
|
||||
<router-link v-if="data.user.saham >= 500 && !hasVoted()" :to="{ name: 'Vote' }"
|
||||
class="btn btn-info">
|
||||
Undi Sekarang
|
||||
</router-link>
|
||||
<div v-else class="alert alert-danger" role="alert">
|
||||
Saham minima tidak mencukupi untuk pengundian
|
||||
</div>
|
||||
</center>
|
||||
</li>
|
||||
</ul>
|
||||
<<<<<<< HEAD
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -65,36 +90,83 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
=======
|
||||
<div v-if="hasVoted()">
|
||||
<hr />
|
||||
<h4>Maklumat Undian Anda</h4>
|
||||
<hr />
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item" v-for="result in data.result">
|
||||
<b>{{ getPosition(result.position_id) }} : </b>{{ getNominee(result.nominee_id) }}
|
||||
</li>
|
||||
</ul>
|
||||
>>>>>>> 5d1d05717ec58a685bba0b6393ad934904cba077
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<modal id="nominee-information-modal" aClass="primary">
|
||||
<modal-header>{{ header }}</modal-header>
|
||||
<modal-body>
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<img :src="data.storageURL+x.image" style="height: 150px; width: 150px" class="thumbnail"/>
|
||||
</div>
|
||||
<div class="col-md-9" style="margin-left: 5px;">
|
||||
<h3><strong><em>"{{ x.motto }}"</em></strong></h3>
|
||||
<b> Name : </b>{{ x.name }}<br/>
|
||||
<b> Unit : </b>{{ x.unit }}<br/>
|
||||
<b> education : </b>{{ getPartylist(x.education) }}<br/><hr/>
|
||||
{{ x.experience }}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<h4>Maklumat Calon</h4>
|
||||
<hr />
|
||||
<!-- <small>Click Picture to see details</small> -->
|
||||
<div class="panel panel-primary" v-for="position in data.positions">
|
||||
<div class="panel-heading">{{ position.name }}</div>
|
||||
<div class="panel-body table-responsive">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Nama</th>
|
||||
<th>No. Anggota</th>
|
||||
<th>Unit</th>
|
||||
<th>Taraf Pendidikan</th>
|
||||
<th>Pengalaman Kerja </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(nominee, i) in data.nominees" v-if="nominee.position_id == position.id">
|
||||
<td><img @click="view(i)" :src="createBase64ImageUrl(nominee.photo)" class="thumbnail"
|
||||
style="height: 60px;width: 60px;" />
|
||||
</td>
|
||||
<td>{{ nominee.name }}</td>
|
||||
<td>{{ nominee.no_anggota }}</td>
|
||||
<td>{{ nominee.unit }}</td>
|
||||
<td>{{ nominee.education }}</td>
|
||||
<td>{{ nominee.experience }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</modal-body>
|
||||
<modal-footer>
|
||||
<button data-dismiss="modal" class="btn btn-default">Close</button>
|
||||
</modal-footer>
|
||||
</modal>
|
||||
</div>
|
||||
|
||||
<modal id="nominee-information-modal" aClass="primary">
|
||||
<modal-header>{{ header }}</modal-header>
|
||||
<modal-body>
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<img :src="data.storageURL + x.image" style="height: 150px; width: 150px"
|
||||
class="thumbnail" />
|
||||
</div>
|
||||
<div class="col-md-9" style="margin-left: 5px;">
|
||||
<h3><strong><em>"{{ x.motto }}"</em></strong></h3>
|
||||
<b> Name : </b>{{ x.name }}<br />
|
||||
<b> Unit : </b>{{ x.unit }}<br />
|
||||
<b> education : </b>{{ getPartylist(x.education) }}<br />
|
||||
<hr />
|
||||
{{ x.experience }}
|
||||
</div>
|
||||
</div>
|
||||
</modal-body>
|
||||
<modal-footer>
|
||||
<button data-dismiss="modal" class="btn btn-default">Close</button>
|
||||
</modal-footer>
|
||||
</modal>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default{
|
||||
export default {
|
||||
created: function () {
|
||||
//console.log(this)
|
||||
},
|
||||
@@ -110,7 +182,7 @@ export default{
|
||||
return this.data.result.length > 0;
|
||||
},
|
||||
|
||||
getPartylist: function(id) {
|
||||
getPartylist: function (id) {
|
||||
let partylists = this.data.partylists;
|
||||
for (var i in partylists)
|
||||
if (partylists[i]['id'] == id) return partylists[i]['name'];
|
||||
@@ -127,7 +199,7 @@ export default{
|
||||
getNominee: function (id) {
|
||||
let nominees = this.data.nominees;
|
||||
for (var i in nominees)
|
||||
if (nominees[i]['id']==id) return nominees[i].name;
|
||||
if (nominees[i]['id'] == id) return nominees[i].name;
|
||||
return '';
|
||||
},
|
||||
|
||||
@@ -136,15 +208,15 @@ export default{
|
||||
this.util.showModal('#nominee-information-modal');
|
||||
},
|
||||
|
||||
createBase64ImageUrl: function(base64ImageData) {
|
||||
return "data:image/png;base64," + base64ImageData;
|
||||
}
|
||||
createBase64ImageUrl: function (base64ImageData) {
|
||||
return "data:image/png;base64," + base64ImageData;
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
computed: {
|
||||
header: function () {
|
||||
return this.x.name+' for '+this.getPosition(this.x.position_id);
|
||||
return this.x.name + ' for ' + this.getPosition(this.x.position_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,8 +5,13 @@
|
||||
<hr />
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item" v-for="position in data.positions">
|
||||
<b>{{ position.name }} : </b>{{ getName(position.id) }}
|
||||
<b>{{ position.name }} : </b>
|
||||
</li>
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item" v-for="nominee_id in selected[0].nominee_id">
|
||||
<b> - {{ getSelectedNomineeName(nominee_id) }}</b>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<!-- <ul class="list-group">
|
||||
<li class="list-group-item" v-for="result in data.result">
|
||||
@@ -171,9 +176,14 @@ export default {
|
||||
console.log(this.selected[0])
|
||||
},
|
||||
|
||||
getSelectedNomineeName: function(id) {
|
||||
return this.getNominee(id);
|
||||
},
|
||||
|
||||
getName: function (id) {
|
||||
let positions = this.data.positions;
|
||||
let selected = this.selected;
|
||||
|
||||
for (var i in selected)
|
||||
if (selected[i]['position_id'] == id)
|
||||
return this.getNominee(selected[i]['nominee_id']);
|
||||
|
||||
Reference in New Issue
Block a user