add saham and yuran at voter
This commit is contained in:
+1
-1
@@ -10,5 +10,5 @@ class Voter extends Authenticatable
|
||||
use HasApiTokens;
|
||||
|
||||
protected $table = 'voter';
|
||||
protected $fillable = ['name', 'no_kp', 'no_anggota','unit', 'election_id', 'alamat', 'telefon'];
|
||||
protected $fillable = ['name', 'no_kp', 'no_anggota','unit', 'election_id', 'alamat', 'telefon', 'saham', 'yuran'];
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddSahamToVoterTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('voter', function (Blueprint $table) {
|
||||
//
|
||||
$table->decimal('saham', 9,2);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('voter', function (Blueprint $table) {
|
||||
//
|
||||
$table->dropColumn('saham');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddYuranToVoterTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('voter', function (Blueprint $table) {
|
||||
//
|
||||
$table->decimal('yuran', 9,2);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('voter', function (Blueprint $table) {
|
||||
//
|
||||
$table->dropColumn('yuran');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -34,6 +34,16 @@
|
||||
<input type="text" name="telefon" class="form-control" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="saham">Saham</label>
|
||||
<input type="text" name="saham" class="form-control" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="yuran">Yuran</label>
|
||||
<input type="text" name="yuran" class="form-control" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-success">Submit</button>
|
||||
<router-link :to="{name: 'Manage Voter'}" class="btn btn-default">Back</router-link>
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
<th>No. Kad Pengenalan</th>
|
||||
<th>No. Anggota</th>
|
||||
<th>Unit</th>
|
||||
<th>Saham</th>
|
||||
<th>Yuran</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -29,6 +31,8 @@
|
||||
<td>{{ voter.no_kp }}</td>
|
||||
<td>{{ voter.no_anggota }}</td>
|
||||
<td>{{ voter.unit }}</td>
|
||||
<td>{{ voter.saham }}</td>
|
||||
<td>{{ voter.yuran }}</td>
|
||||
<td>
|
||||
<button class="btn btn-info" @click="edit(i)">
|
||||
<i class="fa fa-edit"></i> Edit
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
<li class="list-group-item"><b>No. Anggota : </b>{{ data.user.no_anggota }}</li>
|
||||
<li class="list-group-item"><b>Nama : </b>{{ data.user.name }}</li>
|
||||
<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>
|
||||
|
||||
Reference in New Issue
Block a user