Commit 02e91aee by Palti Sinaga

cobak chart

parent 54b1e62b
......@@ -17,6 +17,7 @@ class OwnerController extends Controller
public function index()
{
return view('adminlte::layouts.owner.home');
}
public function updateRoom(Request $request, $id){
......@@ -36,7 +37,7 @@ class OwnerController extends Controller
$dataKamar->update();
return redirect('daftarKamar');
return redirect('daftarKamar')->with('message', 'Update Kamar Sukses!');
}
public function editRoom($id){
......@@ -81,7 +82,7 @@ class OwnerController extends Controller
}
public function requestFasilitas(){
return view('adminlte::layouts.owner.RequestFasilitas');
return view('adminlte::layouts.owner.RequestFasilitas')->with('message', 'Request Fasilitas Berhasil Dikirim!');
}
public function storeRequest(Request $request){
......@@ -166,5 +167,24 @@ class OwnerController extends Controller
return view('adminlte::layouts.owner.ListPengajuanFasilitas')->with('data',$data)->with('count',$count);
}
// //coba chart
// public function chartjs()
// {
// $viewer = View::select(DB::raw("SUM(numberofview) as count"))
// ->orderBy("created_at")
// ->groupBy(DB::raw("year(created_at)"))
// ->get()->toArray();
// $viewer = array_column($viewer, 'count');
//
// $click = Click::select(DB::raw("SUM(numberofclick) as count"))
// ->orderBy("created_at")
// ->groupBy(DB::raw("year(created_at)"))
// ->get()->toArray();
// $click = array_column($click, 'count');
//
// return view('chartjs')
// ->with('viewer',json_encode($viewer,JSON_NUMERIC_CHECK))
// ->with('click',json_encode($click,JSON_NUMERIC_CHECK));
// }
}
......@@ -7,7 +7,7 @@
@section('main-content')
<div class="box box-warning">
<div class="box-header with-border">
<h3 class="box-title"> LIST PENGAJUAN HOMESTAY </h3>
<h3 class="box-title"> LIST PENGAJUAN FASILITAS </h3>
@if (count($errors) > 0)
<div class="alert alert-danger">
<strong>Whoops!</strong> {{ trans('adminlte_lang::message.someproblems') }}<br><br>
......
......@@ -17,6 +17,13 @@
@endforeach
</ul>
</div>
@if(session()->has('message'))
<div class="alert alert-info">
{{session()->get('message')}}
</div>
@endif
@endif
</div>
<div class="box-body">
......
......@@ -30,7 +30,7 @@
<span class="info-box-icon "><i class="glyphicon glyphicon glyphicon-list-alt"></i></span>
<div class="info-box-content">
<span class="info-box-text">List Pengajuan Pemesanan</span>
<span class="info-box-text">DaftarPesanan</span>
<span class="info-box-number">{{$count}}</span>
</div>
<!-- /.info-box-content -->
......
......@@ -7,7 +7,7 @@
@section('main-content')
<div class="box box-warning">
<div class="box-header with-border">
<h3 class="box-title"> LIST RUANGAN </h3>
<h3 class="box-title"> LIST KAMAR </h3>
@if (count($errors) > 0)
<div class="alert alert-danger">
<strong>Whoops!</strong> {{ trans('adminlte_lang::message.someproblems') }}<br><br>
......@@ -18,6 +18,16 @@
</ul>
</div>
@endif
@if(session()->has('message'))
<div class="alert alert-info">
{{session()->get('message')}}
</div>
@endif
@if(!empty($success))
<div class="alert alert-success">
{{$succes}}
</div>
@endif
</div>
<div class="box-body">
<div class="col-md-4 col-sm-6 col-xs-12">
......
......@@ -45,14 +45,14 @@
<li class="treeview"><a href="#"><i class='fa fa-television'></i> <span> FASILITAS </span></a>
<ul class="treeview-menu" style="display : none;">
<li><a href="{{url('reqFasilitas')}}"><i class='fa fa-external-link-square'></i> <span>Request Fasilitas</span></a></li>
<li><a href="listPengajuanFasilitas"><i class='fa fa-list'></i> <span>Daftar Pengajuan Fasilitas</span></a></li>
<li><a href="{{url('listPengajuanFasilitas')}}"><i class='fa fa-list'></i> <span>Daftar Pengajuan Fasilitas</span></a></li>
</ul>
</li>
<li class="treeview"><a href="#"><i class='fa fa-bed'></i> <span> KAMAR </span></a>
<ul class="treeview-menu" style="display : none;">
<li><a href="{{url('daftarKamar')}}"><i class='fa fa-list'></i> <span>Daftar Kamar</span></a></li>
<li><a href="listPengajuanFasilitas"><i class='fa fa-external-link-square'></i> <span>Daftar Pengajuan Fasilitas</span></a></li>
<li><a href="{{url('listPesanan')}}"><i class='fa fa-external-link-square'></i> <span>Daftar Pengajuan Fasilitas</span></a></li>
</ul>
</li>
......
......@@ -44,7 +44,9 @@ Route::get('adminlte', function(){
return view('welcome');
});
//Coba cart
Route::get('chartjs', 'OwnerController@chartjs');
//
Route::get('AddBook', function(){
return view('adminlte::layouts.owner.AddBookManual');
......@@ -56,7 +58,7 @@ Route::get('DataPemesanan', function(){
Route::get('listPemesanan','AdminController@listPesanan');
Route::put('editRoom/{id}','OwnerController@updateRoom');
Route::get('editRoom/{id}','OwnerController@editRoom');
Route::get('editRoom/{id}','OwnerController@editRoom') ;
Route::get('daftarKamar','OwnerController@daftarKamar');
Route::get('pesanan','OwnerController@listTransaction');
Route::put('upload/{id}','CustomerController@upload');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment