✨ feat: Tambah kolom nomor tiket dan perbaiki null safety NOC
- Tambahkan kolom 'nomor_tiket' di tabel NOC (index, pembayaran, penyelesaian) - Perbaiki null safety dengan operator ?-> untuk mencegah error - Update model Noc: ganti fillable dengan guarded, tambah relasi debiture & branch - Hapus filter whereDoesntHave untuk memo_penyelesaian (commented out) - Tambah fallback data dari noc->debiture dan noc->branch - Perbaiki sorting dengan ->values() untuk reset array keys - Update view pembayaran.blade.php dengan kolom nomor tiket
This commit is contained in:
@@ -220,9 +220,9 @@
|
|||||||
$query = PersetujuanPenawaran::query();
|
$query = PersetujuanPenawaran::query();
|
||||||
|
|
||||||
// Filter for pembayaran (where memo_penyelesaian is null)
|
// Filter for pembayaran (where memo_penyelesaian is null)
|
||||||
$query->whereDoesntHave('noc', function($q) {
|
/*$query->whereDoesntHave('noc', function($q) {
|
||||||
$q->whereNotNull('memo_penyelesaian');
|
$q->whereNotNull('memo_penyelesaian');
|
||||||
});
|
});*/
|
||||||
|
|
||||||
// Apply search filter if provided
|
// Apply search filter if provided
|
||||||
if ($request->has('search') && !empty($request->get('search'))) {
|
if ($request->has('search') && !empty($request->get('search'))) {
|
||||||
@@ -260,10 +260,11 @@
|
|||||||
$data = $data->map(function ($persetujuanPenawaran) {
|
$data = $data->map(function ($persetujuanPenawaran) {
|
||||||
return [
|
return [
|
||||||
'id' => $persetujuanPenawaran->id,
|
'id' => $persetujuanPenawaran->id,
|
||||||
'nomor_registrasi' => $persetujuanPenawaran->permohonan->nomor_registrasi ?? $persetujuanPenawaran->penawaran->nomor_registrasi,
|
'nomor_registrasi' => $persetujuanPenawaran->permohonan?->nomor_registrasi ?? $persetujuanPenawaran->penawaran?->nomor_registrasi,
|
||||||
'nama_debitur' => $persetujuanPenawaran->permohonan->debiture->name ?? $persetujuanPenawaran->penawaran->permohonan->debiture->name,
|
'nomor_tiket' => $persetujuanPenawaran->nomor_tiket ?? '',
|
||||||
'kode_cabang' => $persetujuanPenawaran->permohonan->branch->code ?? $persetujuanPenawaran->penawaran->permohonan->branch->code,
|
'nama_debitur' => $persetujuanPenawaran?->permohonan?->debiture->name ?? $persetujuanPenawaran->penawaran?->permohonan?->debiture->name ?? $persetujuanPenawaran->noc?->debiture->name,
|
||||||
'cabang' => $persetujuanPenawaran->permohonan->branch->name ?? $persetujuanPenawaran->penawaran->permohonan->branch->name,
|
'kode_cabang' => $persetujuanPenawaran?->permohonan?->branch->code ?? $persetujuanPenawaran->penawaran?->permohonan?->branch->code ?? $persetujuanPenawaran->noc?->branch->code,
|
||||||
|
'cabang' => $persetujuanPenawaran?->permohonan?->branch->name ?? $persetujuanPenawaran->penawaran?->permohonan?->branch->name ?? $persetujuanPenawaran->noc?->branch->name,
|
||||||
'tanggal_pembayaran' => dateFormat(
|
'tanggal_pembayaran' => dateFormat(
|
||||||
$persetujuanPenawaran->noc->tanggal_pembayaran ?? $persetujuanPenawaran->noc?->created_at,
|
$persetujuanPenawaran->noc->tanggal_pembayaran ?? $persetujuanPenawaran->noc?->created_at,
|
||||||
true,
|
true,
|
||||||
@@ -347,9 +348,11 @@
|
|||||||
$data = $data->map(function ($persetujuanPenawaran) {
|
$data = $data->map(function ($persetujuanPenawaran) {
|
||||||
return [
|
return [
|
||||||
'id' => $persetujuanPenawaran->id,
|
'id' => $persetujuanPenawaran->id,
|
||||||
'nomor_registrasi' => $persetujuanPenawaran->permohonan->nomor_registrasi ?? $persetujuanPenawaran->penawaran->nomor_registrasi,
|
'nomor_registrasi' => $persetujuanPenawaran->permohonan?->nomor_registrasi ?? $persetujuanPenawaran->penawaran?->nomor_registrasi ?? '',
|
||||||
'nama_debitur' => $persetujuanPenawaran->permohonan->debiture->name ?? $persetujuanPenawaran->penawaran->permohonan->debiture->name,
|
'nomor_tiket' => $persetujuanPenawaran->nomor_tiket ?? '',
|
||||||
'cabang' => $persetujuanPenawaran->permohonan->branch->name ?? $persetujuanPenawaran->penawaran->permohonan->branch->name,
|
'nama_debitur' => $persetujuanPenawaran->permohonan->debiture->name ?? $persetujuanPenawaran->penawaran->permohonan->debiture->name ?? $persetujuanPenawaran->noc->debiture->name,
|
||||||
|
'kode_cabang' => $persetujuanPenawaran?->permohonan?->branch->code ?? $persetujuanPenawaran->penawaran?->permohonan?->branch->code ?? $persetujuanPenawaran->noc?->branch->code,
|
||||||
|
'cabang' => $persetujuanPenawaran->permohonan->branch->name ?? $persetujuanPenawaran->penawaran->permohonan->branch->name ?? $persetujuanPenawaran->noc?->branch->name,
|
||||||
'tanggal_pembayaran' => dateFormat(
|
'tanggal_pembayaran' => dateFormat(
|
||||||
$persetujuanPenawaran->noc->tanggal_pembayaran ?? $persetujuanPenawaran->noc?->created_at,
|
$persetujuanPenawaran->noc->tanggal_pembayaran ?? $persetujuanPenawaran->noc?->created_at,
|
||||||
true,
|
true,
|
||||||
@@ -371,7 +374,7 @@
|
|||||||
true) : '-',
|
true) : '-',
|
||||||
'updated_at' => dateFormat($persetujuanPenawaran->updated_at, true),
|
'updated_at' => dateFormat($persetujuanPenawaran->updated_at, true),
|
||||||
];
|
];
|
||||||
})->sortBy('updated_at', 1);
|
})->sortBy('updated_at', 1)->values();
|
||||||
|
|
||||||
// Calculate the page count
|
// Calculate the page count
|
||||||
$pageCount = ceil($totalRecords / $request->get('size'));
|
$pageCount = ceil($totalRecords / $request->get('size'));
|
||||||
|
|||||||
@@ -8,39 +8,7 @@ class Noc extends Base
|
|||||||
{
|
{
|
||||||
protected $table = 'noc';
|
protected $table = 'noc';
|
||||||
|
|
||||||
protected $fillable = [
|
protected $guarded = ['id'];
|
||||||
'permohonan_id',
|
|
||||||
'persetujuan_penawaran_id',
|
|
||||||
'nomor_tiket',
|
|
||||||
'bukti_bayar',
|
|
||||||
'nominal_bayar',
|
|
||||||
'total_pembukuan',
|
|
||||||
'status_bayar',
|
|
||||||
'status_kurang_bayar',
|
|
||||||
'nominal_kurang_bayar',
|
|
||||||
'status_lebih_bayar',
|
|
||||||
'nominal_lebih_bayar',
|
|
||||||
'bukti_pengembalian',
|
|
||||||
'tanggal_pembayaran',
|
|
||||||
'nominal_penyelesaian',
|
|
||||||
'status_penyelesaiaan',
|
|
||||||
'tanggal_penyelesaian',
|
|
||||||
'bukti_penyelesaian',
|
|
||||||
'bukti_ksl',
|
|
||||||
'memo_penyelesaian',
|
|
||||||
'memo_penyelesaian_number',
|
|
||||||
'memo_penyelesaian_date',
|
|
||||||
'memo_penyelesaian_payment_date',
|
|
||||||
'memo_penyelesaian_created_at',
|
|
||||||
'catatan_noc',
|
|
||||||
'status',
|
|
||||||
'authorized_status',
|
|
||||||
'authorized_at',
|
|
||||||
'authorized_by',
|
|
||||||
'nomor_rekening_lebih_bayar',
|
|
||||||
'bukti_ksl_lebih_bayar',
|
|
||||||
'bukti_ksl_kurang_bayar'
|
|
||||||
];
|
|
||||||
|
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
'nominal_bayar' => 'decimal:2',
|
'nominal_bayar' => 'decimal:2',
|
||||||
@@ -78,4 +46,12 @@ class Noc extends Base
|
|||||||
{
|
{
|
||||||
return $this->belongsTo(User::class, 'authorized_by');
|
return $this->belongsTo(User::class, 'authorized_by');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function debiture(){
|
||||||
|
return $this->belongsTo(Debiture::class,'debiture_id');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function branch(){
|
||||||
|
return $this->belongsTo(Branch::class,'branch_id');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,6 +39,10 @@
|
|||||||
<span class="sort"> <span class="sort-label"> Nomor Registrasi </span>
|
<span class="sort"> <span class="sort-label"> Nomor Registrasi </span>
|
||||||
<span class="sort-icon"> </span> </span>
|
<span class="sort-icon"> </span> </span>
|
||||||
</th>
|
</th>
|
||||||
|
<th class="min-w-[150px]" data-datatable-column="nomor_tiket">
|
||||||
|
<span class="sort"> <span class="sort-label"> Nomor Tiket </span>
|
||||||
|
<span class="sort-icon"> </span> </span>
|
||||||
|
</th>
|
||||||
<th class="min-w-[150px]" data-datatable-column="nama_debitur">
|
<th class="min-w-[150px]" data-datatable-column="nama_debitur">
|
||||||
<span class="sort"> <span class="sort-label"> Nama Debitur </span>
|
<span class="sort"> <span class="sort-label"> Nama Debitur </span>
|
||||||
<span class="sort-icon"> </span> </span>
|
<span class="sort-icon"> </span> </span>
|
||||||
@@ -151,6 +155,9 @@
|
|||||||
nomor_registrasi: {
|
nomor_registrasi: {
|
||||||
title: 'Nomor Registrasi'
|
title: 'Nomor Registrasi'
|
||||||
},
|
},
|
||||||
|
nomor_tiket: {
|
||||||
|
title: 'Nomor Tiket'
|
||||||
|
},
|
||||||
nama_debitur: {
|
nama_debitur: {
|
||||||
title: 'Nama Debitur',
|
title: 'Nama Debitur',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -39,6 +39,10 @@
|
|||||||
<span class="sort"> <span class="sort-label"> Nomor Registrasi </span>
|
<span class="sort"> <span class="sort-label"> Nomor Registrasi </span>
|
||||||
<span class="sort-icon"> </span> </span>
|
<span class="sort-icon"> </span> </span>
|
||||||
</th>
|
</th>
|
||||||
|
<th class="min-w-[150px]" data-datatable-column="nomor_tiket">
|
||||||
|
<span class="sort"> <span class="sort-label"> Nomor Tiket </span>
|
||||||
|
<span class="sort-icon"> </span> </span>
|
||||||
|
</th>
|
||||||
<th class="min-w-[150px]" data-datatable-column="nama_debitur">
|
<th class="min-w-[150px]" data-datatable-column="nama_debitur">
|
||||||
<span class="sort"> <span class="sort-label"> Nama Debitur </span>
|
<span class="sort"> <span class="sort-label"> Nama Debitur </span>
|
||||||
<span class="sort-icon"> </span> </span>
|
<span class="sort-icon"> </span> </span>
|
||||||
@@ -135,6 +139,9 @@
|
|||||||
nomor_registrasi: {
|
nomor_registrasi: {
|
||||||
title: 'Nomor Registrasi'
|
title: 'Nomor Registrasi'
|
||||||
},
|
},
|
||||||
|
nomor_tiket: {
|
||||||
|
title: 'Nomor Tiket'
|
||||||
|
},
|
||||||
nama_debitur: {
|
nama_debitur: {
|
||||||
title: 'Nama Debitur',
|
title: 'Nama Debitur',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -5,9 +5,10 @@
|
|||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
|
<div class="grid gap-5 mx-auto w-full lg:gap-7.5">
|
||||||
<div class="card border border-agi-100 card-grid min-w-full" data-datatable="false" data-datatable-page-size="10" data-datatable-state-save="false" id="noc-table" data-api-url="{{ route('noc.datatables.penyelesaian') }}">
|
<div class="min-w-full border card border-agi-100 card-grid" data-datatable="false" data-datatable-page-size="10"
|
||||||
<div class="card-header bg-agi-50 py-5 flex-wrap">
|
data-datatable-state-save="false" id="noc-table" data-api-url="{{ route('noc.datatables.penyelesaian') }}">
|
||||||
|
<div class="flex-wrap py-5 card-header bg-agi-50">
|
||||||
<h3 class="card-title">
|
<h3 class="card-title">
|
||||||
Daftar NOC Penyelesaian
|
Daftar NOC Penyelesaian
|
||||||
</h3>
|
</h3>
|
||||||
@@ -27,77 +28,82 @@
|
|||||||
|
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="scrollable-x-auto">
|
<div class="scrollable-x-auto">
|
||||||
<table class="table table-auto table-border align-middle text-gray-700 font-medium text-sm" data-datatable-table="true">
|
<table class="table text-sm font-medium text-gray-700 align-middle table-auto table-border"
|
||||||
|
data-datatable-table="true">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="w-14">
|
<th class="w-14">
|
||||||
<input class="checkbox checkbox-sm" data-datatable-check="true" type="checkbox"/>
|
<input class="checkbox checkbox-sm" data-datatable-check="true" type="checkbox" />
|
||||||
</th>
|
</th>
|
||||||
<th class="min-w-[150px]" data-datatable-column="nomor_registrasi">
|
<th class="min-w-[150px]" data-datatable-column="nomor_registrasi">
|
||||||
<span class="sort"> <span class="sort-label"> Nomor Registrasi </span>
|
<span class="sort"> <span class="sort-label"> Nomor Registrasi </span>
|
||||||
<span class="sort-icon"> </span> </span>
|
<span class="sort-icon"> </span> </span>
|
||||||
</th>
|
</th>
|
||||||
<th class="min-w-[150px]" data-datatable-column="nama_debitur">
|
<th class="min-w-[150px]" data-datatable-column="nomor_tiket">
|
||||||
<span class="sort"> <span class="sort-label"> Nama Debitur </span>
|
<span class="sort"> <span class="sort-label"> Nomor Tiket </span>
|
||||||
<span class="sort-icon"> </span> </span>
|
<span class="sort-icon"> </span> </span>
|
||||||
</th>
|
</th>
|
||||||
<th class="min-w-[150px]" data-datatable-column="cabang">
|
<th class="min-w-[150px]" data-datatable-column="nama_debitur">
|
||||||
<span class="sort"> <span class="sort-label"> Cabang </span>
|
<span class="sort"> <span class="sort-label"> Nama Debitur </span>
|
||||||
<span class="sort-icon"> </span> </span>
|
<span class="sort-icon"> </span> </span>
|
||||||
</th>
|
</th>
|
||||||
<th class="min-w-[150px]" data-datatable-column="tanggal_setor">
|
<th class="min-w-[150px]" data-datatable-column="cabang">
|
||||||
<span class="sort"> <span class="sort-label"> Tanggal KSL </span>
|
<span class="sort"> <span class="sort-label"> Cabang </span>
|
||||||
<span class="sort-icon"> </span> </span>
|
<span class="sort-icon"> </span> </span>
|
||||||
</th>
|
</th>
|
||||||
<th class="min-w-[150px]" data-datatable-column="nominal_bayar">
|
<th class="min-w-[150px]" data-datatable-column="tanggal_setor">
|
||||||
<span class="sort"> <span class="sort-label"> Nominal bayar </span>
|
<span class="sort"> <span class="sort-label"> Tanggal KSL </span>
|
||||||
<span class="sort-icon"> </span> </span>
|
<span class="sort-icon"> </span> </span>
|
||||||
</th>
|
</th>
|
||||||
<th class="min-w-[150px]" data-datatable-column="bukti_bayar">
|
<th class="min-w-[150px]" data-datatable-column="nominal_bayar">
|
||||||
<span class="sort"> <span class="sort-label"> Bukti Bayar </span>
|
<span class="sort"> <span class="sort-label"> Nominal bayar </span>
|
||||||
<span class="sort-icon"> </span> </span>
|
<span class="sort-icon"> </span> </span>
|
||||||
</th>
|
</th>
|
||||||
<th class="min-w-[150px]" data-datatable-column="nominal_diterima">
|
<th class="min-w-[150px]" data-datatable-column="bukti_bayar">
|
||||||
<span class="sort"> <span class="sort-label"> Nominal Diterima </span>
|
<span class="sort"> <span class="sort-label"> Bukti Bayar </span>
|
||||||
<span class="sort-icon"> </span> </span>
|
<span class="sort-icon"> </span> </span>
|
||||||
</th>
|
</th>
|
||||||
<th class="min-w-[150px]" data-datatable-column="bukti_ksl">
|
<th class="min-w-[150px]" data-datatable-column="nominal_diterima">
|
||||||
<span class="sort"> <span class="sort-label"> Bukti KSL </span>
|
<span class="sort"> <span class="sort-label"> Nominal Diterima </span>
|
||||||
<span class="sort-icon"> </span> </span>
|
<span class="sort-icon"> </span> </span>
|
||||||
</th>
|
</th>
|
||||||
<th class="min-w-[150px]" data-datatable-column="tanggal_pembayaran">
|
<th class="min-w-[150px]" data-datatable-column="bukti_ksl">
|
||||||
<span class="sort"> <span class="sort-label"> Tanggal Pembayaran </span>
|
<span class="sort"> <span class="sort-label"> Bukti KSL </span>
|
||||||
<span class="sort-icon"> </span> </span>
|
<span class="sort-icon"> </span> </span>
|
||||||
</th>
|
</th>
|
||||||
<th class="min-w-[150px]" data-datatable-column="memo_penyelesaian">
|
<th class="min-w-[150px]" data-datatable-column="tanggal_pembayaran">
|
||||||
<span class="sort"> <span class="sort-label"> Memo Penyelesaian </span>
|
<span class="sort"> <span class="sort-label"> Tanggal Pembayaran </span>
|
||||||
<span class="sort-icon"> </span> </span>
|
<span class="sort-icon"> </span> </span>
|
||||||
</th>
|
</th>
|
||||||
<th class="min-w-[150px]" data-datatable-column="bukti_penyelesaian">
|
<th class="min-w-[150px]" data-datatable-column="memo_penyelesaian">
|
||||||
<span class="sort"> <span class="sort-label"> Bukti Penyelesaian </span>
|
<span class="sort"> <span class="sort-label"> Memo Penyelesaian </span>
|
||||||
<span class="sort-icon"> </span> </span>
|
<span class="sort-icon"> </span> </span>
|
||||||
</th>
|
</th>
|
||||||
<th class="min-w-[150px]" data-datatable-column="nominal_penyelesaian">
|
<th class="min-w-[150px]" data-datatable-column="bukti_penyelesaian">
|
||||||
<span class="sort"> <span class="sort-label"> Nominal Penyelesaian </span>
|
<span class="sort"> <span class="sort-label"> Bukti Penyelesaian </span>
|
||||||
<span class="sort-icon"> </span> </span>
|
<span class="sort-icon"> </span> </span>
|
||||||
</th>
|
</th>
|
||||||
<th class="min-w-[150px]" data-datatable-column="tanggal_penyelesaian">
|
<th class="min-w-[150px]" data-datatable-column="nominal_penyelesaian">
|
||||||
<span class="sort"> <span class="sort-label"> Tanggal Penyelesaian </span>
|
<span class="sort"> <span class="sort-label"> Nominal Penyelesaian </span>
|
||||||
<span class="sort-icon"> </span> </span>
|
<span class="sort-icon"> </span> </span>
|
||||||
</th>
|
</th>
|
||||||
<th class="min-w-[50px] text-center" data-datatable-column="actions">Action</th>
|
<th class="min-w-[150px]" data-datatable-column="tanggal_penyelesaian">
|
||||||
</tr>
|
<span class="sort"> <span class="sort-label"> Tanggal Penyelesaian </span>
|
||||||
|
<span class="sort-icon"> </span> </span>
|
||||||
|
</th>
|
||||||
|
<th class="min-w-[50px] text-center" data-datatable-column="actions">Action</th>
|
||||||
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="card-footer justify-center md:justify-between flex-col md:flex-row gap-3 text-gray-600 text-2sm font-medium">
|
class="flex-col gap-3 justify-center font-medium text-gray-600 card-footer md:justify-between md:flex-row text-2sm">
|
||||||
<div class="flex items-center gap-2">
|
<div class="flex gap-2 items-center">
|
||||||
Show
|
Show
|
||||||
<select class="select select-sm w-16" data-datatable-size="true" name="perpage"> </select> per
|
<select class="w-16 select select-sm" data-datatable-size="true" name="perpage"> </select> per
|
||||||
page
|
page
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-center gap-4">
|
<div class="flex gap-4 items-center">
|
||||||
<span data-datatable-info="true"> </span>
|
<span data-datatable-info="true"> </span>
|
||||||
<div class="pagination" data-datatable-pagination="true">
|
<div class="pagination" data-datatable-pagination="true">
|
||||||
</div>
|
</div>
|
||||||
@@ -105,140 +111,146 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@push('scripts')
|
@push('scripts')
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function prosesData(data) {
|
function prosesData(data) {
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
title: 'NOC Penyelesaian',
|
title: 'NOC Penyelesaian',
|
||||||
text: "Apakah Anda yakin ingin menyetujui penyelesaian ini?",
|
text: "Apakah Anda yakin ingin menyetujui penyelesaian ini?",
|
||||||
icon: 'info',
|
icon: 'info',
|
||||||
showCancelButton: true,
|
showCancelButton: true,
|
||||||
confirmButtonColor: '#3085d6',
|
confirmButtonColor: '#3085d6',
|
||||||
cancelButtonColor: '#d33',
|
cancelButtonColor: '#d33',
|
||||||
confirmButtonText: 'Ya',
|
confirmButtonText: 'Ya',
|
||||||
cancelButtonText: 'Tidak'
|
cancelButtonText: 'Tidak'
|
||||||
}).then((result) => {
|
}).then((result) => {
|
||||||
if (result.isConfirmed) {
|
if (result.isConfirmed) {
|
||||||
window.location.href = `noc/${data}/edit`;
|
window.location.href = `noc/${data}/edit`;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="module">
|
||||||
|
const element = document.querySelector('#noc-table');
|
||||||
|
const searchInput = document.getElementById('search');
|
||||||
|
|
||||||
|
const apiUrl = element.getAttribute('data-api-url');
|
||||||
|
const dataTableOptions = {
|
||||||
|
apiEndpoint: apiUrl,
|
||||||
|
pageSize: 5,
|
||||||
|
columns: {
|
||||||
|
select: {
|
||||||
|
render: (item, data, context) => {
|
||||||
|
const checkbox = document.createElement('input');
|
||||||
|
checkbox.className = 'checkbox checkbox-sm';
|
||||||
|
checkbox.type = 'checkbox';
|
||||||
|
checkbox.value = data.id.toString();
|
||||||
|
checkbox.setAttribute('data-datatable-row-check', 'true');
|
||||||
|
return checkbox.outerHTML.trim();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
nomor_registrasi: {
|
||||||
|
title: 'Nomor Registrasi'
|
||||||
|
},
|
||||||
|
nomor_tiket: {
|
||||||
|
title: 'Nomor Tiket',
|
||||||
|
},
|
||||||
|
nama_debitur: {
|
||||||
|
title: 'Nama Debitur',
|
||||||
|
},
|
||||||
|
cabang: {
|
||||||
|
title: 'Cabang',
|
||||||
|
render: (item, data) => {
|
||||||
|
return data.kode_cabang + ' - ' + data.cabang;
|
||||||
}
|
}
|
||||||
})
|
},
|
||||||
}
|
tanggal_setor: {
|
||||||
</script>
|
title: 'Tanggal Setor',
|
||||||
|
},
|
||||||
<script type="module">
|
nominal_bayar: {
|
||||||
const element = document.querySelector('#noc-table');
|
title: 'Nominal Bayar',
|
||||||
const searchInput = document.getElementById('search');
|
},
|
||||||
|
bukti_bayar: {
|
||||||
const apiUrl = element.getAttribute('data-api-url');
|
title: 'Bukti KSL',
|
||||||
const dataTableOptions = {
|
render: (item, data) => {
|
||||||
apiEndpoint: apiUrl,
|
if (data.bukti_bayar) {
|
||||||
pageSize: 5,
|
return `<a href="storage/${data.bukti_bayar}" download="storage/${data.bukti_bayar}" target="_blank" class="badge badge-sm badge-outline">
|
||||||
columns: {
|
|
||||||
select: {
|
|
||||||
render: (item, data, context) => {
|
|
||||||
const checkbox = document.createElement('input');
|
|
||||||
checkbox.className = 'checkbox checkbox-sm';
|
|
||||||
checkbox.type = 'checkbox';
|
|
||||||
checkbox.value = data.id.toString();
|
|
||||||
checkbox.setAttribute('data-datatable-row-check', 'true');
|
|
||||||
return checkbox.outerHTML.trim();
|
|
||||||
},
|
|
||||||
},
|
|
||||||
nomor_registrasi: {
|
|
||||||
title: 'Nomor Registrasi'
|
|
||||||
},
|
|
||||||
nama_debitur: {
|
|
||||||
title: 'Nama Debitur',
|
|
||||||
},
|
|
||||||
cabang: {
|
|
||||||
title: 'Cabang',
|
|
||||||
},
|
|
||||||
tanggal_setor: {
|
|
||||||
title: 'Tanggal Setor',
|
|
||||||
},
|
|
||||||
nominal_bayar: {
|
|
||||||
title: 'Nominal Bayar',
|
|
||||||
},
|
|
||||||
bukti_bayar: {
|
|
||||||
title: 'Bukti KSL',
|
|
||||||
render: (item, data) => {
|
|
||||||
if (data.bukti_bayar) {
|
|
||||||
return `<a href="storage/${data.bukti_bayar}" download="storage/${data.bukti_bayar}" target="_blank" class="badge badge-sm badge-outline">
|
|
||||||
Download <i class="ki-filled ki-cloud-download"></i>
|
Download <i class="ki-filled ki-cloud-download"></i>
|
||||||
</a>`;
|
</a>`;
|
||||||
} else {
|
} else {
|
||||||
return '-';
|
return '-';
|
||||||
}
|
}
|
||||||
},
|
|
||||||
},
|
},
|
||||||
nominal_diterima: {
|
},
|
||||||
title: 'Nominal Diterima',
|
nominal_diterima: {
|
||||||
},
|
title: 'Nominal Diterima',
|
||||||
bukti_ksl: {
|
},
|
||||||
title: 'Bukti KSL',
|
bukti_ksl: {
|
||||||
render: (item, data) => {
|
title: 'Bukti KSL',
|
||||||
if (data.bukti_ksl) {
|
render: (item, data) => {
|
||||||
return `<a href="storage/${data.bukti_ksl}" download="storage/${data.bukti_ksl}" target="_blank" class="badge badge-sm badge-outline">
|
if (data.bukti_ksl) {
|
||||||
|
return `<a href="storage/${data.bukti_ksl}" download="storage/${data.bukti_ksl}" target="_blank" class="badge badge-sm badge-outline">
|
||||||
Download <i class="ki-filled ki-cloud-download"></i>
|
Download <i class="ki-filled ki-cloud-download"></i>
|
||||||
</a>`;
|
</a>`;
|
||||||
} else {
|
} else {
|
||||||
return '-';
|
return '-';
|
||||||
}
|
}
|
||||||
},
|
|
||||||
},
|
},
|
||||||
tanggal_pembayaran: {
|
},
|
||||||
title: 'Tanggal Pembayaran',
|
tanggal_pembayaran: {
|
||||||
},
|
title: 'Tanggal Pembayaran',
|
||||||
memo_penyelesaian: {
|
},
|
||||||
title: 'Memo Penyelesaian',
|
memo_penyelesaian: {
|
||||||
render: (item, data) => {
|
title: 'Memo Penyelesaian',
|
||||||
if (data.memo_penyelesaian) {
|
render: (item, data) => {
|
||||||
return `<a href="storage/${data.memo_penyelesaian}" download="storage/${data.memo_penyelesaian}" target="_blank" class="badge badge-sm badge-outline">
|
if (data.memo_penyelesaian) {
|
||||||
|
return `<a href="storage/${data.memo_penyelesaian}" download="storage/${data.memo_penyelesaian}" target="_blank" class="badge badge-sm badge-outline">
|
||||||
Download <i class="ki-filled ki-cloud-download"></i>
|
Download <i class="ki-filled ki-cloud-download"></i>
|
||||||
</a>`;
|
</a>`;
|
||||||
} else {
|
} else {
|
||||||
return '-';
|
return '-';
|
||||||
}
|
}
|
||||||
},
|
|
||||||
},
|
},
|
||||||
bukti_penyelesaian: {
|
},
|
||||||
title: 'Bukti Penyelesaian',
|
bukti_penyelesaian: {
|
||||||
render: (item, data) => {
|
title: 'Bukti Penyelesaian',
|
||||||
if (data.bukti_penyelesaian) {
|
render: (item, data) => {
|
||||||
return `<a href="storage/${data.bukti_penyelesaian}" download="storage/${data.bukti_penyelesaian}" target="_blank" class="badge badge-sm badge-outline">
|
if (data.bukti_penyelesaian) {
|
||||||
|
return `<a href="storage/${data.bukti_penyelesaian}" download="storage/${data.bukti_penyelesaian}" target="_blank" class="badge badge-sm badge-outline">
|
||||||
Download <i class="ki-filled ki-cloud-download"></i>
|
Download <i class="ki-filled ki-cloud-download"></i>
|
||||||
</a>`;
|
</a>`;
|
||||||
} else {
|
} else {
|
||||||
return '-';
|
return '-';
|
||||||
}
|
}
|
||||||
},
|
|
||||||
},
|
},
|
||||||
nominal_penyelesaian: {
|
},
|
||||||
title: 'Nominal Penyelesaian',
|
nominal_penyelesaian: {
|
||||||
},
|
title: 'Nominal Penyelesaian',
|
||||||
tanggal_penyelesaian: {
|
},
|
||||||
title: 'Tanggal Penyelesaian',
|
tanggal_penyelesaian: {
|
||||||
},
|
title: 'Tanggal Penyelesaian',
|
||||||
actions: {
|
},
|
||||||
title: 'Action',
|
actions: {
|
||||||
render: (item, data) => {
|
title: 'Action',
|
||||||
return `<div class="flex flex-nowrap justify-center">
|
render: (item, data) => {
|
||||||
|
return `<div class="flex flex-nowrap justify-center">
|
||||||
<a class="btn btn-sm btn-outline btn-info" onclick="prosesData(${data.id})">
|
<a class="btn btn-sm btn-outline btn-info" onclick="prosesData(${data.id})">
|
||||||
<i class="ki-filled ki-double-check"></i>
|
<i class="ki-filled ki-double-check"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>`;
|
</div>`;
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
let dataTable = new KTDataTable(element, dataTableOptions);
|
let dataTable = new KTDataTable(element, dataTableOptions);
|
||||||
// Custom search functionality
|
// Custom search functionality
|
||||||
searchInput.addEventListener('input', function () {
|
searchInput.addEventListener('input', function() {
|
||||||
const searchValue = this.value.trim();
|
const searchValue = this.value.trim();
|
||||||
dataTable.search(searchValue, true);
|
dataTable.search(searchValue, true);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@endpush
|
@endpush
|
||||||
|
|||||||
@@ -131,6 +131,7 @@ Route::middleware(['auth'])->group(function () {
|
|||||||
|
|
||||||
Route::controller(PembayaranController::class)->group(function () {
|
Route::controller(PembayaranController::class)->group(function () {
|
||||||
Route::get('/pembayaran', 'index')->name('pembayaran.index');
|
Route::get('/pembayaran', 'index')->name('pembayaran.index');
|
||||||
|
Route::get('/pembayaran/create', 'create')->name('pembayaran.create');
|
||||||
Route::get('/pembayaran/kurang', 'kurang')->name('pembayaran.kurang.index');
|
Route::get('/pembayaran/kurang', 'kurang')->name('pembayaran.kurang.index');
|
||||||
Route::get('/pembayaran/lebih', 'lebih')->name('pembayaran.lebih.index');
|
Route::get('/pembayaran/lebih', 'lebih')->name('pembayaran.lebih.index');
|
||||||
Route::get('/pembayaran/{pembayaran}/edit', 'edit')->name('pembayaran.edit');
|
Route::get('/pembayaran/{pembayaran}/edit', 'edit')->name('pembayaran.edit');
|
||||||
|
|||||||
Reference in New Issue
Block a user