✨(laporan-admin-kredit): tambah kolom keterangan & kolektibilitas
- Tambah field `keterangan` (TEXT) & `kolektibilitas` (VARCHAR 10) pada tabel laporan_admin_kredit - Update model LaporanAdminKredit dengan fillable baru - Tambah dropdown kolektibilitas (1-5: Lancar, DPK, Kurang Lancar, Diragukan, Macet) di form - Tambah textarea keterangan dengan old() support untuk validasi - Validasi: `keterangan` nullable|string, `kolektibilitas` nullable|string|in:1..5 - Update controller: simpan field baru dengan DB transaction & error handling - Migration baru untuk menambah kolom `keterangan` & `kolektibilitas` - UI/UX: konsistensi styling, responsive grid layout, placeholder informatif - Testing: form simpan & validasi berhasil, migration jalan tanpa error
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<?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::table('laporan_admin_kredit', function (Blueprint $table) {
|
||||
$table->text('keterangan')->nullable()->comment('Keterangan tambahan untuk laporan admin kredit');
|
||||
$table->string('kolektibilitas', 10)->nullable()->comment('Status kolektibilitas kredit');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('laporan_admin_kredit', function (Blueprint $table) {
|
||||
$table->dropColumn(['keterangan', 'kolektibilitas']);
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user