Commit 4b66b1c6 by Juliper

no message

parent 7979307c
...@@ -81,6 +81,8 @@ class GuestController extends Controller ...@@ -81,6 +81,8 @@ class GuestController extends Controller
$lb->tanggal_berakhir = $request['tanggal_selesai']; $lb->tanggal_berakhir = $request['tanggal_selesai'];
$lb->status = 0; $lb->status = 0;
$lb->save();
return redirect('customerHistory'); return redirect('customerHistory');
//dd($request); //dd($request);
......
...@@ -67,7 +67,9 @@ class OwnerController extends Controller ...@@ -67,7 +67,9 @@ class OwnerController extends Controller
->get(); ->get();
$dataListOfBook = DB::table('daftar_book') $dataListOfBook = DB::table('daftar_book')
->join('transaksi','daftar_book.id_transaksi','=','transaksi.id')
->select('daftar_book.*') ->select('daftar_book.*')
->where('transaksi.status','=',0)
->where('daftar_book.homestay','=',$dataHomestay[0]->id) ->where('daftar_book.homestay','=',$dataHomestay[0]->id)
->get(); ->get();
...@@ -249,6 +251,7 @@ class OwnerController extends Controller ...@@ -249,6 +251,7 @@ class OwnerController extends Controller
//Mengakses Daftar Booking Homestay //Mengakses Daftar Booking Homestay
public function listOfBook(){ public function listOfBook(){
$dataPemilik = DB::table('pemilikhomestay') $dataPemilik = DB::table('pemilikhomestay')
->select('pemilikhomestay.id') ->select('pemilikhomestay.id')
->where('pemilikhomestay.id_akun','=',Auth::user()->id) ->where('pemilikhomestay.id_akun','=',Auth::user()->id)
...@@ -261,11 +264,15 @@ class OwnerController extends Controller ...@@ -261,11 +264,15 @@ class OwnerController extends Controller
->where('pemilikhomestay.id','=',$dataPemilik[0]->id) ->where('pemilikhomestay.id','=',$dataPemilik[0]->id)
->get(); ->get();
//dd($dataHomestay);
$dataListOfBook = DB::table('daftar_book') $dataListOfBook = DB::table('daftar_book')
->select('daftar_book.*') ->select('daftar_book.*')
->where('daftar_book.homestay','=',$dataHomestay[0]->id) ->where('daftar_book.homestay','=',$dataHomestay[0]->id)
->get(); ->get();
// dd($dataListOfBook);
return view('adminlte::layouts.owner.ListBooking')->with('data',$dataListOfBook)->with('count',$dataListOfBook->count()); return view('adminlte::layouts.owner.ListBooking')->with('data',$dataListOfBook)->with('count',$dataListOfBook->count());
} }
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<td>{{$a->tanggal_berakhir}}</td> <td>{{$a->tanggal_berakhir}}</td>
<td>{{$a->jumlah_kamar}}</td> <td>{{$a->jumlah_kamar}}</td>
<td> <td>
@if($a->status==0) Pengunjung sudah checkout @if($a->status==0) Pengunjung Belum Check In
@else @else
<form action="{{url('checkout/'.$a->id)}}" method="post"> <form action="{{url('checkout/'.$a->id)}}" method="post">
{{csrf_field()}} {{csrf_field()}}
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
<th>Keterangan</th> <th>Keterangan</th>
<th>Gambar</th> <th>Gambar</th>
<th>Status</th> <th>Status</th>
<th>Alasan</th>
</tr> </tr>
@foreach($data as $a) @foreach($data as $a)
<tr> <tr>
...@@ -46,6 +47,9 @@ ...@@ -46,6 +47,9 @@
@elseif($a->status==2) Ditolak @elseif($a->status==2) Ditolak
@endif @endif
</td> </td>
<td>
</td>
</tr> </tr>
@endforeach @endforeach
</table> </table>
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<th>Lihat Detail</th> <th>Lihat Detail</th>
<th>Download Bukti Pembayaran</th> <th>Download Bukti Pembayaran</th>
<th style="position: center;">Status</th> <th style="position: center;">Status</th>
<th colspan="2">aksi</th> <th colspan="2"></th>
</tr> </tr>
@foreach($data as $a) @foreach($data as $a)
<tr> <tr>
......
...@@ -42,10 +42,8 @@ ...@@ -42,10 +42,8 @@
</span></a> </span></a>
<ul class="treeview-menu" style="display : none;"> <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="{{url('daftarKamar')}}"><i class='fa fa-list'></i> <span>Daftar Kamar</span></a></li>
<li><a href="{{url('pengajuanHomestay')}}"><i class='fa fa-external-link-square'></i> <span> Pengajuan Homestay </span></a></li>
<li><a href="{{url('listFeedback')}}"><i class='fa fa-list'></i> <span> Komentar Pelanggan </span></a></li> <li><a href="{{url('listFeedback')}}"><i class='fa fa-list'></i> <span> Komentar Pelanggan </span></a></li>
<li><a href="{{url('updateHomestay')}}"><i class='fa fa-edit'></i> <span>Perbaharui Homestay</span></a></li> <li><a href="{{url('updateHomestay')}}"><i class='fa fa-edit'></i> <span>Perbaharui Homestay</span></a></li>
<li><a href="{{url('listPengajuan')}}"><i class='fa fa-list'></i> <span> Daftar Pengajuan Homestay </span></a></li>
</ul> </ul>
</li> </li>
......
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