feat(webstatement): tambah fitur manajemen Jenis Kartu

- Menambahkan model, migrasi, seed, controller, request, dan tampilan untuk fitur Jenis Kartu.
- Menambahkan routing dan breadcrumbs untuk Jenis Kartu.
- Mengimplementasikan fungsi CRUD, ekspor data ke Excel, dan penghapusan multiple records pada Jenis Kartu.
- Memperbarui `module.json` untuk menampilkan menu Jenis Kartu di bagian Master.
- Menambah seeder untuk data awal Jenis Kartu.

Signed-off-by: Daeng Deni Mardaeni <ddeni05@gmail.com>
This commit is contained in:
Daeng Deni Mardaeni
2025-05-10 10:47:10 +07:00
parent df097a279f
commit 496d7f58c7
13 changed files with 870 additions and 45 deletions

View File

@@ -0,0 +1,37 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('jenis_kartu', function (Blueprint $table) {
$table->id();
$table->string('code')->unique();
$table->string('name');
$table->decimal('biaya', 10, 2)->nullable();
$table->timestamps();
$table->softDeletes();
$table->timestamp('crreated_at')->nullable();
$table->string('authorized_status', 1)->default('0');
$table->unsignedBigInteger('created_by')->nullable();
$table->unsignedBigInteger('updated_by')->nullable();
$table->unsignedBigInteger('deleted_by')->nullable();
$table->unsignedBigInteger('authorized_by')->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('jenis_kartu');
}
};

View File

@@ -0,0 +1,56 @@
<?php
namespace Modules\Webstatement\Database\Seeders;
use Illuminate\Database\Seeder;
use Modules\Webstatement\Models\JenisKartu;
class JenisKartuSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
$jenisKartu = [
[
'code' => 'CLASSIC',
'name' => 'Kartu Classic',
'biaya' => 3000,
'created_at' => now(),
'updated_at' => now(),
],
[
'code' => 'CLAS',
'name' => 'Kartu Classic (Singkatan)',
'biaya' => 3000,
'created_at' => now(),
'updated_at' => now(),
],
[
'code' => 'SILVER',
'name' => 'Kartu Silver',
'biaya' => 5000,
'created_at' => now(),
'updated_at' => now(),
],
[
'code' => 'SILV',
'name' => 'Kartu Silver (Singkatan)',
'biaya' => 5000,
'created_at' => now(),
'updated_at' => now(),
],
[
'code' => 'GOLD',
'name' => 'Kartu Gold',
'biaya' => 10000,
'created_at' => now(),
'updated_at' => now(),
],
];
JenisKartu::insert($jenisKartu);
}
}

View File

@@ -11,6 +11,8 @@ class WebstatementDatabaseSeeder extends Seeder
*/
public function run(): void
{
// $this->call([]);
$this->call([
JenisKartuSeeder::class
]);
}
}