feat(branch): tambah kolom baru dan dukungan pencarian terkait data cabang

- Menambahkan kolom baru pada tabel `branches` melalui migrasi:
  - `address`
  - `mnemonic`
  - `customer_company`
  - `customer_mnemonic`
  - `company_group`
  - `curr_no`
  - `co_code`
  - `l_vendor_atm`
  - `l_vendor_cpc`
- Memperbarui model `Branch` agar mendukung kolom baru di properti `fillable`.
- Menambahkan dukungan pencarian berdasarkan kolom `address` pada:
  - `BranchExport.php` (untuk ekspor data)
  - `BranchController.php` (untuk API pencarian data cabang)
- Memperbarui tampilan daftar cabang (`branch/index.blade.php`) untuk menampilkan kolom `address`.
- Memperbarui format data ekspor cabang dengan menambahkan kolom `address`.
- Memperbaiki pengaturan format kolom tanggal pada data ekspor.

Signed-off-by: Daeng Deni Mardaeni <ddeni05@gmail.com>
This commit is contained in:
Daeng Deni Mardaeni
2025-05-20 21:57:13 +07:00
parent be271dbe6e
commit 9c0ee08c40
5 changed files with 77 additions and 2 deletions

View File

@@ -0,0 +1,46 @@
<?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('branches', function (Blueprint $table) {
$table->string('address')->nullable()->after('name');
$table->string('mnemonic')->nullable()->after('address');
$table->string('customer_company')->nullable()->after('mnemonic');
$table->string('customer_mnemonic')->nullable()->after('customer_company');
$table->string('company_group')->nullable()->after('customer_mnemonic');
$table->string('curr_no')->nullable()->after('company_group');
$table->string('co_code')->nullable()->after('curr_no');
$table->boolean('l_vendor_atm')->default(false)->after('co_code');
$table->boolean('l_vendor_cpc')->default(false)->after('l_vendor_atm');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('branches', function (Blueprint $table) {
$table->dropColumn([
'address',
'mnemonic',
'customer_company',
'customer_mnemonic',
'company_group',
'curr_no',
'co_code',
'l_vendor_atm',
'l_vendor_cpc'
]);
});
}
};