Commit b3d10d21 by Palti Sinaga
parents 7d024783 876cb435
...@@ -18,20 +18,55 @@ class OwnerController extends Controller ...@@ -18,20 +18,55 @@ class OwnerController extends Controller
return view('adminlte::layouts.owner.home'); return view('adminlte::layouts.owner.home');
} }
public function create() public function daftarKamar(){
{
// /*$dataTrans = DB::table('homestay')
->join('transaksi','homestay.id','=','transaksi.id_homestay')
->join('pemilikhomestay','homestay.idPemilik','=','pemilikhomestay.id')
->select('transaksi.*','pemilikhomestay.nama','pemilikhomestay.noRekening')
->where('transaksi.id_pelanggan','=',$data[0]->id)
->get();
*/
$pem = DB::table('pemilikhomestay')
->select('pemilikhomestay.*')
->where('pemilikhomestay.id_Akun','=',Auth::user()->id)
->get();
$data = DB::table('homestay')
->join('pemilikhomestay','homestay.idPemilik','pemilikhomestay.id')
->join('kamar','homestay.id','=','kamar.idHomestay')
->select('kamar.*','homestay.*','pemilikhomestay.*')
->where('pemilikhomestay.id','=',$pem[0]->id)
->get();
dd("masuk gan",Auth::user()->id,$data,$pem);
}
public function listTransaction(){
$dataPel = DB::table('pemilikhomestay')
->select('pemilikhomestay.*')
->where('pemilikhomestay.id_Akun','=',Auth::user()->id)
->get();
$data = DB::table('homestay')
//->join('transaksi','transaksi.id_homestay','=','homestay.id')
->join('pemilikhomestay','homestay.idPemilik','=','pemilikhomestay.id')
->join('transaksi','homestay.id','=','transaksi.id_homestay')
->join('pelanggan','transaksi.id_pelanggan','=','pelanggan.id')
->select('transaksi.*','pelanggan.nama','pelanggan.alamat','pelanggan.noTelepon')
->where('homestay.idPemilik','=',$dataPel[0]->id)
->get();
//dd("masuk agan",$data,$data->count());
return view('adminlte::layouts.owner.listPesanan')->with('data',$data)->with('count',$data->count());
} }
public function requestFasilitas(){ public function requestFasilitas(){
//dd('Masuk Gan');
return view('adminlte::layouts.owner.RequestFasilitas'); return view('adminlte::layouts.owner.RequestFasilitas');
} }
public function storeRequest(Request $request){ public function storeRequest(Request $request){
/*$data = DB::table('pemilikhomestay') /*$data = DB::table('pemilikhomestay')
->join('pengajuan_homestay','pemilikhomestay.id','=','pengajuan_homestay.idPemilikHomestay') ->join('pengajuan_homestay','pemilikhomestay.id','=','pengajuan_homestay.idPemilikHomestay')
->select('pemilikhomestay.nama','pengajuan_homestay.*') ->select('pemilikhomestay.nama','pengajuan_homestay.*')
...@@ -120,23 +155,5 @@ class OwnerController extends Controller ...@@ -120,23 +155,5 @@ class OwnerController extends Controller
return view('adminlte::layouts.owner.ListPengajuanFasilitas')->with('data',$data)->with('count',$count); return view('adminlte::layouts.owner.ListPengajuanFasilitas')->with('data',$data)->with('count',$count);
} }
public function store(Request $request)
{
//
}
public function show($id)
{
//
}
public function edit($id)
{
//
}
public function destroy($id)
{
//
}
} }
@extends('adminlte::layouts.app')
@section('htmlheader_title')
{{ trans('adminlte_lang::message.home') }}
@endsection
@section('main-content')
<div class="container-fluid spark-screen">
<div class="row">
<div class="col-md-12 col-md-offset-0">
<div class="panel panel-default">
<div id="app">
@if (count($errors) > 0)
<div class="alert alert-danger">
<strong>Whoops!</strong> {{ trans('adminlte_lang::message.someproblems') }}<br><br>
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
<br>
<div class="col-md-4 col-sm-6 col-xs-12">
<div class="info-box bg-info">
<span class="info-box-icon bg-yellow"><i class="glyphicon glyphicon-modal-window"></i></span>
<div class="info-box-content">
<span class="info-box-text">List Pengajuan Pemesanan</span>
<span class="info-box-number">{{$count}}</span>
</div>
<!-- /.info-box-content -->
</div>
<!-- /.info-box -->
</div>
<br>
<table class="table table-striped">
<tr>
<th>Nama Pelanggan</th>
<th>Nomor Telepon</th>
<th>Pekerjaan</th>
<th>Tanggal Mulai</th>
<th>Tanggal Berakhir</th>
<th>Lama Menginap</th>
<th>Jumlah Kamar</th>
<th>Bukti Pembayaran</th>
<th>Status</th>
</tr>
@foreach($data as $a)
<tr>
<td>{{$a->nama}}</td>
<td>{{$a->alamat}}</td>
<td>{{$a->noTelepon}}</td>
<td>{{$a->tanggal_mulai}}</td>
<td>{{$a->tanggal_berakhir}}</td>
<td>{{$a->lama_menginap}} Hari</td>
<td>{{$a->jumlah_kamar}}</td>
<td><img src="/img/{{ $a->bukti_pembayaran }}" style="width: 100px" alt="User Image" /></td>
<td>{{"belum bang"}}</td>
</tr>
@endforeach
</table>
</div>
</div>
</div>
</div>
</div>
@endsection
...@@ -34,21 +34,13 @@ ...@@ -34,21 +34,13 @@
@elseif(Auth::user()->role=="Owner") @elseif(Auth::user()->role=="Owner")
<li><a href="#"><i class='fa fa-list'></i> <span>Edit Room</span></a></li> <li><a href="#"><i class='fa fa-list'></i> <span>Edit Room</span></a></li>
<li><a href="#"><i class='fa fa-list'></i> <span>Daftar Pesanan</span></a></li> <li><a href="{{url('pesanan')}}"><i class='fa fa-list'></i> <span>Daftar Pesanan</span></a></li>
<li><a href="{{url('reqFasilitas')}}"><i class='fa fa-list'></i> <span>Request Fasilitas</span></a></li> <li><a href="{{url('reqFasilitas')}}"><i class='fa fa-list'></i> <span>Request Fasilitas</span></a></li>
<li><a href="#"><i class='fa fa-list'></i> <span>Add Book Manual</span></a></li> <li><a href="#"><i class='fa fa-list'></i> <span>Add Book Manual</span></a></li>
<li><a href="#"><i class='fa fa-list'></i> <span>Daftar Kamar</span></a></li> <li><a href="{{url('daftarKamar')}}"><i class='fa fa-list'></i> <span>Daftar Kamar</span></a></li>
<li><a href="listPengajuan"><i class="fa fa-list"></i><span>Daftar Pengajuan Homestay</span></a></li> <li><a href="listPengajuan"><i class="fa fa-list"></i><span>Daftar Pengajuan Homestay</span></a></li>
<li><a href="listPengajuanFasilitas"><i class='fa fa-list'></i> <span>Daftar Pengajuan Fasilitas</span></a></li> <li><a href="listPengajuanFasilitas"><i class='fa fa-list'></i> <span>Daftar Pengajuan Fasilitas</span></a></li>
<li><a href="pengajuanHomestay"><i class='fa fa-list'></i> <span>Pengajuan Homestay</span></a></li> <li><a href="pengajuanHomestay"><i class='fa fa-list'></i> <span>Pengajuan Homestay</span></a></li>
@elseif(Auth::user()->role=="Customer")
<li><a href="#"><i class='fa fa-list'></i> <span>Booking Homestay</span></a></li>
<li><a href="#"><i class='fa fa-list'></i> <span>Give Some Feedback</span></a></li>
<li><a href="#"><i class='fa fa-list'></i> <span>Cek Detail Homestay</span></a></li>
<li><a href="#"><i class='fa fa-list'></i> <span>Pembayaran</span></a></li>
@endif @endif
......
...@@ -45,6 +45,9 @@ Route::group(['middleware' => 'auth'], function () { ...@@ -45,6 +45,9 @@ Route::group(['middleware' => 'auth'], function () {
//Please do not remove this if you want adminlte:route and adminlte:link commands to works correctly. //Please do not remove this if you want adminlte:route and adminlte:link commands to works correctly.
#adminlte_routes #adminlte_routes
}); });
Route::get('daftarKamar','OwnerController@daftarKamar');
Route::get('pesanan','OwnerController@listTransaction');
Route::put('upload/{id}','CustomerController@upload'); Route::put('upload/{id}','CustomerController@upload');
Route::get('detailhomestay/{id}','CustomerController@detailhomestay'); Route::get('detailhomestay/{id}','CustomerController@detailhomestay');
Route::get('customerHistory','CustomerController@history'); Route::get('customerHistory','CustomerController@history');
......
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