From 042cd579b025fa3785328f32309dec90ec545764 Mon Sep 17 00:00:00 2001 From: hafifierahman Date: Mon, 21 Oct 2024 00:46:45 +0800 Subject: [PATCH 1/3] added block specific cawangan transaction --- config/redeemoption.php | 4 +++- resources/views/customers/v2/info.blade.php | 2 ++ resources/views/penebusan/v2/index.blade.php | 6 ++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/config/redeemoption.php b/config/redeemoption.php index 5987f20..306610d 100644 --- a/config/redeemoption.php +++ b/config/redeemoption.php @@ -2,6 +2,8 @@ return [ 'enable_tambahpinjam' => env('ENABLE_TAMBAHPINJAM',1), 'enable_separuh' => env('ENABLE_SEPARUH',1), - 'enable_pembiayaansemula' => env('ENABLE_AUTOTAWARRUQ',1) + 'enable_pembiayaansemula' => env('ENABLE_AUTOTAWARRUQ',1), + 'enable_specific_block' => env('ENABLE_BLOCK',0), + 'cawangan_block' => env('CAWANGAN_BLOCK','011227') ]; ?> \ No newline at end of file diff --git a/resources/views/customers/v2/info.blade.php b/resources/views/customers/v2/info.blade.php index 970f9c6..bf7a5e7 100644 --- a/resources/views/customers/v2/info.blade.php +++ b/resources/views/customers/v2/info.blade.php @@ -135,9 +135,11 @@
+ @if(config('redeemoption.enable_specific_block') == 0 || Auth::user()->cawangan !== config('redeemoption.cawangan_block'))
Daftar Pembiayaan
+ @endif
diff --git a/resources/views/penebusan/v2/index.blade.php b/resources/views/penebusan/v2/index.blade.php index a31a109..6501b41 100644 --- a/resources/views/penebusan/v2/index.blade.php +++ b/resources/views/penebusan/v2/index.blade.php @@ -93,14 +93,20 @@ @if($gadai['tagbaru'] == 1) @if(config('redeemoption.enable_separuh') == 1) + @if(config('redeemoption.enable_specific_block') == 0 || Auth::user()->cawangan !== config('redeemoption.cawangan_block')) + @endif @endif @if(config('redeemoption.enable_tambahpinjam') == 1) + @if(config('redeemoption.enable_specific_block') == 0 || Auth::user()->cawangan !== config('redeemoption.cawangan_block')) + @endif @endif @endif @if(config('redeemoption.enable_pembiayaansemula') == 1) + @if(config('redeemoption.enable_specific_block') == 0 || Auth::user()->cawangan !== config('redeemoption.cawangan_block')) + @endif @endif From 3f9879b8159d17a4d6e02d4e19ecafde686f9150 Mon Sep 17 00:00:00 2001 From: hafifierahman Date: Mon, 30 Dec 2024 20:42:04 +0800 Subject: [PATCH 2/3] added tempblock and * for khazanah --- app/Http/Controllers/PenebusanController.php | 4 +- resources/views/customers/v2/info.blade.php | 17 ++++++++ resources/views/khazanah/index.blade.php | 43 ++++++++++++++------ 3 files changed, 50 insertions(+), 14 deletions(-) diff --git a/app/Http/Controllers/PenebusanController.php b/app/Http/Controllers/PenebusanController.php index bda3316..0e538aa 100644 --- a/app/Http/Controllers/PenebusanController.php +++ b/app/Http/Controllers/PenebusanController.php @@ -519,7 +519,7 @@ class PenebusanController extends Controller 'tag_permata' => $array1['tag_permata'], 'berat_batu_permata' => $array1['berat_batu_permata'], 'jenisAT' => $request->jenisAT, - 'kuantiti' => $array1['bil'] + 'kuantiti' => $array1['bil'] ])->json(); } @@ -687,7 +687,7 @@ class PenebusanController extends Controller 'tag_permata' => $array1['tag_permata'], 'berat_batu_permata' => $array1['berat_batu_permata'], 'nilai_marhun' => $array1['n_marhun'], - 'kuantiti' => $array1['bil'] + 'kuantiti' => $array1['bil'] ])->json(); } diff --git a/resources/views/customers/v2/info.blade.php b/resources/views/customers/v2/info.blade.php index fce9649..335ae2f 100644 --- a/resources/views/customers/v2/info.blade.php +++ b/resources/views/customers/v2/info.blade.php @@ -600,6 +600,13 @@ var pinjaman = $(data).data("pinjaman"); var hargajualan = $(data).data("hargajualan"); + let array_tempblock = ['011237240808-0003','011237240719-0015','011237240806-0011','011237240828-0001', + '011237240904-0007','011237240904-0008','011237240904-0009','011237240719-0023','011237240719-0024', + '011237240719-0025','011237240618-0026','011237240719-0027','011237240719-0028','011237240618-0020', + '011237240719-0030','011237240618-0029','011237240731-0026','011237240715-0027','011237240912-0009', + ]; + + Swal.fire({ title: 'Memuatkan...', allowEscapeKey : false, @@ -609,6 +616,16 @@ } }); + if (array_tempblock.includes(norujukan)) { + Swal.close(); + Swal.fire({ + icon: 'error', + title: 'Amaran', + text: 'Surat Pembiayaan Mengalami Masalah Sila Hubungi IT' + }); + return false; ++ } + if(hargajualan == pinjaman){ Swal.fire({ icon: 'error', diff --git a/resources/views/khazanah/index.blade.php b/resources/views/khazanah/index.blade.php index 9423656..ea440a0 100644 --- a/resources/views/khazanah/index.blade.php +++ b/resources/views/khazanah/index.blade.php @@ -812,20 +812,39 @@ var nokp = $('#noic').val(); if(id_type=='nokp'){ if($.isNumeric(nokp) == false){ - Swal.fire({ - icon: 'error', - title: 'Amaran!', - text: 'Sila Masukkan Nombor Sahaja Pada No KP Pelanggan' - }); - event.preventDefault(); - return false; + // Swal.fire({ + // icon: 'error', + // title: 'Amaran!', + // text: 'Sila Masukkan Nombor Sahaja Pada No KP Pelanggan' + // }); + // event.preventDefault(); + // return false; + if(nokp.substr(-1) != '*'){ + Swal.fire({ + icon: 'error', + title: 'Amaran!', + text: 'Sila Masukkan Nombor Sahaja Pada No KP Pelanggan' + }); + event.preventDefault(); + return false; + } } if(nokp.length != 12){ - Swal.fire({ - icon: 'error', - title: 'Amaran!', - text: 'Sila Periksa No KP Pelanggan' - }); + // Swal.fire({ + // icon: 'error', + // title: 'Amaran!', + // text: 'Sila Periksa No KP Pelanggan' + // }); + if(nokp.substr(-1) != '*') + { + Swal.fire({ + icon: 'error', + title: 'Amaran!', + text: 'Sila Periksa No KP Pelanggan' + }); + event.preventDefault(); + return false; + } event.preventDefault(); return false; } From d21b72b84f8e1281f9986356e5f0fa09c1105f76 Mon Sep 17 00:00:00 2001 From: hafifierahman Date: Mon, 30 Dec 2024 20:50:18 +0800 Subject: [PATCH 3/3] remove + --- resources/views/customers/v2/info.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/customers/v2/info.blade.php b/resources/views/customers/v2/info.blade.php index 335ae2f..c86a400 100644 --- a/resources/views/customers/v2/info.blade.php +++ b/resources/views/customers/v2/info.blade.php @@ -624,7 +624,7 @@ text: 'Surat Pembiayaan Mengalami Masalah Sila Hubungi IT' }); return false; -+ } + } if(hargajualan == pinjaman){ Swal.fire({