diff --git a/app/Http/Controllers/CustomersController.php b/app/Http/Controllers/CustomersController.php index c5b978d..3669c77 100644 --- a/app/Http/Controllers/CustomersController.php +++ b/app/Http/Controllers/CustomersController.php @@ -65,12 +65,16 @@ class CustomersController extends Controller $customer_page = ($cawangan_info['version'] == 'v1') ? 'customers.v1.info' : 'customers.v2.info'; + $getApprovalError = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/admin/ansuran/getApproval',[ + 'kodcaw' => $auth_user['cawangan'], + 'teller' => $auth_user['name'], + ])->json(); if($request->tebus_auto_tawarruq_berjaya === 'true'){ $request->session()->flash('activate_tab', 'SAG_baru'); } - return view($customer_page,compact('cawangan_info','api_url','customer_info','bakilelong','rugilelong','min_komoditi','pekerjaan')); + return view($customer_page,compact('cawangan_info','api_url','customer_info','bakilelong','rugilelong','min_komoditi','pekerjaan','ugama','getApprovalError')); } public function search(Request $request){ diff --git a/resources/views/customers/v2/info.blade.php b/resources/views/customers/v2/info.blade.php index f9baeeb..79ac4c6 100644 --- a/resources/views/customers/v2/info.blade.php +++ b/resources/views/customers/v2/info.blade.php @@ -9,6 +9,7 @@ @section('content') @include('modal.historytebus') @include('modal.wakil') +@include('errors.alert', ['errorapproval' => $getApprovalError ?? null])
@@ -264,7 +265,7 @@ - {{-- --}} +
@@ -2905,6 +2906,7 @@ title: 'Telah Disahkan', text: `Komen : ${data.komen}` }).then(function(){ + console.log("delete ansuran",tarikh,kodcaw,norujukan,tg_id); deleteFuncAnsuran(tarikh,kodcaw,norujukan,tg_id); return true; }); diff --git a/resources/views/errors/alert.blade.php b/resources/views/errors/alert.blade.php new file mode 100644 index 0000000..f4661b9 --- /dev/null +++ b/resources/views/errors/alert.blade.php @@ -0,0 +1,43 @@ +@if($errorapproval) + +@endif \ No newline at end of file