diff --git a/app/Http/Controllers/CustomersController.php b/app/Http/Controllers/CustomersController.php index 1d33fa0..1dd33cf 100644 --- a/app/Http/Controllers/CustomersController.php +++ b/app/Http/Controllers/CustomersController.php @@ -45,7 +45,11 @@ class CustomersController extends Controller $cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json(); $customers_info = Http::get(config('api.url') . '/api/customers/'. $noic)->json(); - $customer_info = $customers_info[0]; + if(sizeof($customers_info)!= 0){ + $customer_info = $customers_info[0]; + }else{ + $customer_info = $customers_info; + } $search = true; if($customer_info){ diff --git a/app/Http/Controllers/HargaEmasController.php b/app/Http/Controllers/HargaEmasController.php index 5b2d554..c7bcc2b 100644 --- a/app/Http/Controllers/HargaEmasController.php +++ b/app/Http/Controllers/HargaEmasController.php @@ -4,6 +4,9 @@ namespace App\Http\Controllers; use Illuminate\Http\Request; use App\HargaEmas; +use Illuminate\Support\Facades\Session; +use Illuminate\Support\Facades\Http; +use Illuminate\Support\Facades\Auth; class HargaEmasController extends Controller { @@ -13,7 +16,9 @@ class HargaEmasController extends Controller } public function index(){ + $auth_user = Auth::user(); + $cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json(); $harga_emas = HargaEmas::all(); - return view('harga_emas.index',compact('harga_emas')); + return view('harga_emas.index',compact('harga_emas','cawangan_info')); } } diff --git a/app/Http/Controllers/MarhunController.php b/app/Http/Controllers/MarhunController.php index 6c440bb..97b15e7 100644 --- a/app/Http/Controllers/MarhunController.php +++ b/app/Http/Controllers/MarhunController.php @@ -14,9 +14,14 @@ class MarhunController extends Controller $this->middleware('auth'); } - public function index(){ + public function index(Request $request){ + $norujukan = $request->norujukan; + $auth_user = Auth::user(); + + $jemas = Http::get(config('api.url') . '/api/jemas/'. $auth_user['cawangan'])->json(); + $hargaemas = Http::get(config('api.url') . '/api/harga_emas')->json(); $cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json(); - return view('marhun.index',compact('cawangan_info')); + return view('marhun.index',compact('cawangan_info','norujukan','jemas','hargaemas')); } } diff --git a/resources/views/gadaian/index.blade.php b/resources/views/gadaian/index.blade.php index 6f5ec64..1ca2722 100644 --- a/resources/views/gadaian/index.blade.php +++ b/resources/views/gadaian/index.blade.php @@ -8,6 +8,10 @@
+ + + +
Nama
@@ -22,7 +26,7 @@ No Pelanggan
- +
@@ -32,7 +36,7 @@ No Rujukan
- +
@@ -58,7 +62,7 @@
- DAFTAR MARHUN + DAFTAR MARHUN
@@ -88,7 +92,7 @@ PINJAMAN MAX
- +
@@ -98,7 +102,7 @@ UPAH SEBULAN
- +
@@ -108,7 +112,7 @@ ID PELULUS
- +
@@ -118,7 +122,7 @@ PINJAMAN
- +
@@ -128,7 +132,7 @@ UPAH 6 BULAN
- +
@@ -138,13 +142,13 @@ PINJAMAN MAX PELULUS
- +
- +
@@ -155,8 +159,110 @@ @endsection diff --git a/resources/views/marhun/index.blade.php b/resources/views/marhun/index.blade.php index 9befd32..5a2c7ec 100644 --- a/resources/views/marhun/index.blade.php +++ b/resources/views/marhun/index.blade.php @@ -7,72 +7,168 @@

MAKLUMAT MARHUN

-
-
-
-
NO RUJUKAN
-
-
MARHUN
-
-
-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - +
+
+
+
+ +
No Rujukan
+
+
Marhun
+
+ +
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
-
-
KARAT
-
-
BERAT
-
-
HARGA
-
-
NILAI MARHUN
-
-
-
-
-
-
- +
Karat
+
+ +
+
Berat
+
+
Harga
+
+
Nilai Marhun
+
-
-
- - +
+
+
+ +
+
+
+
+ + +
-
-
-
-
- - - +
+
+
+ + + +
-
+
+ @endsection diff --git a/routes/web.php b/routes/web.php index 85b0760..df0ceae 100644 --- a/routes/web.php +++ b/routes/web.php @@ -33,7 +33,7 @@ Route::get('/home', 'HomeController@index')->name('home'); Route::get('/pelanggan','CustomersController@index'); Route::get('/customer_info',['as'=>'customer_info','uses'=>'CustomersController@info']); Route::get('/gadaian',['as'=>'gadaian','uses'=>'GadaianController@index']); -Route::get('/daftar_marhun','MarhunController@index'); +Route::get('/daftar_marhun',['as'=>'daftar_marhun','uses'=>'MarhunController@index']); Route::get('/penebusan','PenebusanController@index'); Route::get('/aliran_tunai','AliranTunaiController@index'); Route::get('/harga_emas','HargaEmasController@index');