From 8bde7a0544e32ee22f38f416ab4ac655c7fe5d21 Mon Sep 17 00:00:00 2001 From: nurafrinaalimi16 Date: Tue, 26 Mar 2024 15:24:48 +0800 Subject: [PATCH] add saham and yuran at voter --- app/Voter.php | 2 +- ..._03_26_095932_add_saham_to_voter_table.php | 34 ++++++++++++++++++ ..._03_26_100140_add_yuran_to_voter_table.php | 35 +++++++++++++++++++ .../js/components/demo/admin/voter/add.vue | 10 ++++++ .../js/components/demo/admin/voter/index.vue | 4 +++ .../js/components/demo/voter/home/index.vue | 2 ++ 6 files changed, 86 insertions(+), 1 deletion(-) create mode 100644 database/migrations/2024_03_26_095932_add_saham_to_voter_table.php create mode 100644 database/migrations/2024_03_26_100140_add_yuran_to_voter_table.php diff --git a/app/Voter.php b/app/Voter.php index a055a05..0ccd09e 100644 --- a/app/Voter.php +++ b/app/Voter.php @@ -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']; } diff --git a/database/migrations/2024_03_26_095932_add_saham_to_voter_table.php b/database/migrations/2024_03_26_095932_add_saham_to_voter_table.php new file mode 100644 index 0000000..9b30d61 --- /dev/null +++ b/database/migrations/2024_03_26_095932_add_saham_to_voter_table.php @@ -0,0 +1,34 @@ +decimal('saham', 9,2); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('voter', function (Blueprint $table) { + // + $table->dropColumn('saham'); + }); + } +} diff --git a/database/migrations/2024_03_26_100140_add_yuran_to_voter_table.php b/database/migrations/2024_03_26_100140_add_yuran_to_voter_table.php new file mode 100644 index 0000000..2695571 --- /dev/null +++ b/database/migrations/2024_03_26_100140_add_yuran_to_voter_table.php @@ -0,0 +1,35 @@ +decimal('yuran', 9,2); + + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('voter', function (Blueprint $table) { + // + $table->dropColumn('yuran'); + }); + } +} diff --git a/resources/assets/js/components/demo/admin/voter/add.vue b/resources/assets/js/components/demo/admin/voter/add.vue index 5f4e828..e631ed0 100644 --- a/resources/assets/js/components/demo/admin/voter/add.vue +++ b/resources/assets/js/components/demo/admin/voter/add.vue @@ -34,6 +34,16 @@ +
+ + +
+ +
+ + +
+
Back diff --git a/resources/assets/js/components/demo/admin/voter/index.vue b/resources/assets/js/components/demo/admin/voter/index.vue index b44b86c..ef38799 100644 --- a/resources/assets/js/components/demo/admin/voter/index.vue +++ b/resources/assets/js/components/demo/admin/voter/index.vue @@ -20,6 +20,8 @@ No. Kad Pengenalan No. Anggota Unit + Saham + Yuran Action @@ -29,6 +31,8 @@ {{ voter.no_kp }} {{ voter.no_anggota }} {{ voter.unit }} + {{ voter.saham }} + {{ voter.yuran }}