diff --git a/app/Http/Controllers/Admin/MstJenisDanaController.php b/app/Http/Controllers/Admin/MstJenisDanaController.php index 41d7306..ca8512f 100644 --- a/app/Http/Controllers/Admin/MstJenisDanaController.php +++ b/app/Http/Controllers/Admin/MstJenisDanaController.php @@ -90,7 +90,7 @@ class MstJenisDanaController extends Controller $select = DB::raw("ID,NAME,GRUP"); $sqlstr = MstJenisDana::select($select); $dataTotal = $sqlstr->count(); - $data = $sqlstr->orderBy("GRUP","DESC"); + $data = $sqlstr->orderBy("ID","ASC"); if (!empty($src)){ $data->whereRaw(" ( lower(NAME) like '%$src%' ) "); } diff --git a/app/helpers.php b/app/helpers.php index 3c73b8a..2504c4e 100644 --- a/app/helpers.php +++ b/app/helpers.php @@ -136,18 +136,23 @@ function getTA() function getJenisDana() { - return ["DBH","DAK","DID","DAU"]; + $conf = config('constants.jenis_dana'); + // call_user_func_array('array_merge',array_keys($conf)) + return array_keys($conf); } function getKodeRekInduk($val) { - $kodeRek = [ - "DBH"=>["4.2.01.01.01"], - // "DBH-CHT"=>"4.2.01.01.01.0004", - "DAU"=>["4.2.01.01.02"], - "DAK"=>["4.2.01.01.03","4.2.01.01.04"], - "DID"=>["4.2.01.02.01"] - ]; + $conf = config('constants.jenis_dana'); + + // $kodeRek = [ + // "DBH"=>["4.2.01.01.01"], + // // "DBH-CHT"=>"4.2.01.01.01.0004", + // "DAU"=>["4.2.01.01.02"], + // "DAK"=>["4.2.01.01.03","4.2.01.01.04"], + // "DID"=>["4.2.01.02.01"] + // ]; + $kodeRek = array_combine(array_keys($conf),array_column(array_values($conf),"rekening")); return $kodeRek[$val]; } \ No newline at end of file diff --git a/config/constants.php b/config/constants.php index 4165705..2abf9de 100644 --- a/config/constants.php +++ b/config/constants.php @@ -11,5 +11,12 @@ 'option_monetery' => '15', 'option_ratings' => '16', 'option_textarea' => '17', + ], + 'jenis_dana' => [ + 'DBH'=>["rekening"=>["4.2.01.01.01"]], + 'DAK'=>["rekening"=>["4.2.01.01.03","4.2.01.01.04"]], + 'DID'=>["rekening"=>["4.2.01.02.01"]], + 'DAU'=>["rekening"=>["4.2.01.01.02"]], + 'IF'=>["rekening"=>["4.2.01.06.01"]] ] ]; \ No newline at end of file diff --git a/public/js/app.js b/public/js/app.js index 2524632..4cdb70c 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -496,4 +496,17 @@ let dauRinci = ()=>{ }); } -dauRinci(); \ No newline at end of file +dauRinci(); + +$('body').on('expanded.pushMenu collapsed.pushMenu', function() { + console.log("WOKE") + // Add delay to trigger code only after the pushMenu animation completes + setTimeout(function() { + + // Code ... + // Example: refresh datatable column widths after collapse/expansion completes + $.fn.dataTable.tables( {visible: true, api: true} ).columns.adjust(); + + // Time depends on your settings + }, 350); + } ); \ No newline at end of file diff --git a/resources/views/realisasi_belanja/index.blade.php b/resources/views/realisasi_belanja/index.blade.php index 478f176..c4c69a7 100644 --- a/resources/views/realisasi_belanja/index.blade.php +++ b/resources/views/realisasi_belanja/index.blade.php @@ -233,7 +233,7 @@ "processing": true, "serverSide": true, "ordering": false, - "autoWidth": false, + "autoWidth": true, "ajax": { url: "{{ $baseUrl }}/realisasi-belanja/datatable", type: "POST",