feat(sync-logs): tambah fitur sinkronisasi log biaya kartu

- Menambahkan route, controller, model, dan migration untuk fitur baru `sync-logs`.
- Mengganti referensi `BiayaKartuController` menjadi `SyncLogsController`.
- Menyediakan halaman untuk menampilkan data log sinkronisasi dengan filter, pencarian, dan pagination.
- Menambahkan kemampuan melihat detail proses sinkronisasi langsung dari modal.
- Memperbarui `module.json` dengan item menu baru untuk fitur log sinkronisasi.
- Menghapus `BiayaKartuController` yang sudah tidak digunakan lagi.
```

Signed-off-by: Daeng Deni Mardaeni <ddeni05@gmail.com>
This commit is contained in:
Daeng Deni Mardaeni
2025-05-10 15:12:56 +07:00
parent 1a62bda959
commit e1e52f78fb
8 changed files with 678 additions and 32 deletions

View File

@@ -0,0 +1,48 @@
<?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('kartu_sync_logs', function (Blueprint $table) {
$table->id();
$table->string('periode')->comment('Periode sinkronisasi (format: YYYY-MM)');
$table->boolean('is_sync')->default(false)->comment('Status sinkronisasi data');
$table->boolean('is_csv')->default(false)->comment('Status pembuatan file CSV');
$table->boolean('is_ftp')->default(false)->comment('Status upload ke FTP');
$table->timestamp('sync_at')->nullable()->comment('Waktu sinkronisasi');
$table->timestamp('csv_at')->nullable()->comment('Waktu pembuatan CSV');
$table->timestamp('ftp_at')->nullable()->comment('Waktu upload FTP');
$table->text('sync_notes')->nullable()->comment('Catatan sinkronisasi');
$table->text('csv_notes')->nullable()->comment('Catatan pembuatan CSV');
$table->text('ftp_notes')->nullable()->comment('Catatan upload FTP');
$table->integer('total_records')->default(0)->comment('Jumlah total rekaman');
$table->integer('success_records')->default(0)->comment('Jumlah rekaman berhasil');
$table->integer('failed_records')->default(0)->comment('Jumlah rekaman gagal');
$table->string('file_path')->nullable()->comment('Path file CSV yang dihasilkan');
$table->string('file_name')->nullable()->comment('Nama file CSV yang dihasilkan');
$table->string('ftp_destination')->nullable()->comment('Tujuan upload FTP');
$table->timestamps();
// Indeks untuk pencarian cepat
$table->index('periode');
$table->index(['is_sync', 'is_csv', 'is_ftp']);
});
}
/**
* Reverse the migrations.
*/
public function down()
: void
{
Schema::dropIfExists('kartu_sync_logs');
}
};