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])