Commit 5f0ba28b by Juliper

no message

parent b09e06dc
......@@ -245,7 +245,9 @@ class AdminController extends Controller
->select('daftar_book.*','homestay.nama_homestay','homestay.owner')
->paginate(10);
return view('adminlte::layouts.admin.dataPemesanan')->with('data',$data);
$homestay = Homestay::all();
return view('adminlte::layouts.admin.dataPemesanan')->with('data',$data)->with('homestay',$homestay);
}
//Mengakses Daftar Owner
......
......@@ -98,6 +98,7 @@ class GuestController extends Controller
$lb->jumlah_kamar = $request['jumlah_kamar'];
$lb->jumlah_tamu = $request['jumlah_tamu'];
$lb->tanggal_mulai = $request['tanggal_mulai'] ;
$lb->lama_menginap = $request['lama_menginap'];
$lb->tanggal_berakhir = $request['tanggal_selesai'];
$lb->status = 0;
......@@ -121,7 +122,7 @@ class GuestController extends Controller
public function rincianpemesanan(Request $request, $id){
if(Auth::guest()){
return redirect('')->with('message','Anda Harus Login dulu !!');
return redirect('login')->with('message','Anda Harus Login dulu !!');
}else{
$dataUser = DB::table('pelanggan')
->where('pelanggan.id_Akun','=',Auth::user()->id)
......@@ -215,13 +216,16 @@ class GuestController extends Controller
$counter = 0;
$j=0;
//Mencocokkan data pesanan untuk mendapat current room avilable
foreach ($dataBook as $db){
$ldbm = explode('-',$db->tanggal_mulai);
$ldbs = explode('-',$db->tanggal_berakhir);
//dd($tm,$ts);
if($tm[1]==$ts[1]){
if($tm[1] == $ldbm[1] && $ts[1] == $ldbs[1]){
if(($tm[2] >= $ldbm[2] && $tm[2] <= $ldbs[2] ) && ($ts[2] >= $ldbm[2] && $ts[2]<= $ldbs[2]) ){
//dd('beriirisan total');
......@@ -269,6 +273,8 @@ class GuestController extends Controller
}
//dd('masuk');
if($counter==0){
if($request['jumlah_kamar'] <= $a->jumlah_kamar){
if($request['jumlah_Tamu'] <= ($request['jumlah_kamar']*2)){
......@@ -421,7 +427,7 @@ class GuestController extends Controller
->where('homestay.id','=',$id)
->get();
//dd($data[0]->id_pemilik);
$daftarBook = DB::table('daftar_book')
->select('daftar_book.*')
......@@ -429,6 +435,8 @@ class GuestController extends Controller
->where('daftar_book.status','=',1)
->get();
$dataFeedback = DB::table('feedback')
->join('pelanggan','feedback.id_pelanggan','pelanggan.id')
->select('feedback.*','pelanggan.nama')
......@@ -443,6 +451,8 @@ class GuestController extends Controller
//dd($dataFeedback);
$now = new DateTime();
$nowCurrent = $now->format('Y-m-d');
......@@ -450,17 +460,22 @@ class GuestController extends Controller
$avilableRoom = 0;
if($dataJumlahKamar->count() == null){
/* if($dataJumlahKamar->count() == null){
$avilableRoom = $data[0]->jumlah_kamar;
dd($data[0]->id_pemilik);
}else{
$avilableRoom = $dataJumlahKamar[0]->jumlah_kamar;
}
*/
$dataKamar = DB::table('kamar')
->select('kamar.*')
->where('kamar.id_homestay','=',$id)
->get();
return view('adminlte::layouts.pages.Homestay')->with('data',$data[0])->with('daftarBook',$daftarBook)->with('dataKamar',$dataKamar)->with('avilable',$avilableRoom)->with('feedback',$dataFeedback);
}
}
......@@ -24,6 +24,8 @@ class OwnerController extends Controller
$this->middleware('owner');
}
public function Report(Request $request){
$dataHomestay = DB::table('homestay')
->join('pemilikhomestay','homestay.id_pemilik','=','pemilikhomestay.id')
......@@ -48,7 +50,14 @@ class OwnerController extends Controller
//dd($dataHomestay,$request['bulan'],$dataPesanan,$penghasilan);
}
public function printReportOwner(Request $request){
//$//path = window.location.pathname;
//dd($request['bulan']);
$dataHomestay = DB::table('homestay')
->join('pemilikhomestay','homestay.id_pemilik','=','pemilikhomestay.id')
->where('pemilikhomestay.id_akun','=',Auth::user()->id)
......@@ -74,11 +83,18 @@ class OwnerController extends Controller
}
public function Record(){
$homestay = Homestay::all();
$data = null;
return view('adminlte::layouts.owner.Report')->with('data',$data);
return view('adminlte::layouts.owner.Report')->with('data',$data)->with('homestay',$homestay);
}
public function Asread(Request $request,$id){
$req = RequestFasilitas::find($id);
$req->notif = 2;
......@@ -142,10 +158,12 @@ class OwnerController extends Controller
->get();
$HasdataRequest = DB::table('requestfasilitas')
->where('requestfasilitas.status','<>',0)
->where('requestfasilitas.notif','=',1)
//->where()
->get();
//dd($HasdataRequest);
$datakamar = DB::table('homestay')
->join('pemilikhomestay','homestay.id_pemilik','pemilikhomestay.id')
->join('kamar','homestay.id','=','kamar.id_homestay')
......@@ -558,6 +576,8 @@ class OwnerController extends Controller
$data->nama_request_fasilitas = $request['namaRequestFasilitas'];
$data->deskripsi = $request['deskripsi'];
$data->jumlah = $request['jumlah'];
$data->status = 0;
$data->notif = 0;
if($request->file('gambar')==null){
$data->gambar = $data->gambar;
......
......@@ -12,54 +12,44 @@
<center> <h1>Laporan di Bulan {{$bulan}}</h1></center>
<center> {{$namaHomestay}} </center>
@foreach($data as $a)
<table class="table table-user-information">
<table class="table table-user-information">
<tr>
<th></th>
<th>Nama Pemesan</th>
<td>: </td>
<td>{{$a->nama_pemesan}}</td>
</tr>
<tr>
<th>Jumlah Kamar</th>
<td>: </td>
<td>{{$a->jumlah_kamar}} kamar</td>
</tr>
<tr>
<th>Jumlah Tamu</th>
<td>: </td>
<td>{{$a->jumlah_tamu}} orang</td>
</tr>
<tr>
<th>Lama Menginap</th>
<td>: </td>
<td>{{$a->lama_menginap}} Malam </td>
</tr>
<tr>
<th>Extra-bed</th>
<td>: </td>
<td>{{$a->extrabed}} buah</td>
</tr>
<tr>
<th>Tanggal Check-in</th>
<td>:</td>
<td>{{$a->tanggal_mulai}}</td>
</tr>
<tr>
<th>Tanggal Check-out</th>
<td>:</td>
<td>{{$a->tanggal_berakhir}}</td>
<th>Total Pembayaran</th>
</tr>
@foreach($data as $a)
<tr>
<th>Total Pembayaran</th>
<td>:</td>
<td></td>
<td>{{$a->nama_pemesan}}</td>
<td>{{$a->jumlah_kamar}} kamar</td>
<td>{{$a->jumlah_tamu}} orang</td>
<td>{{$a->lama_menginap}} Malam </td>
<td>{{$a->extrabed}} buah</td>
<td>{{$a->tanggal_mulai}}</td>
<td>{{$a->tanggal_berakhir}}</td>
<td>Rp. {{$a->total_harga}}</td>
</tr> <br><br>
</tr>
@endforeach
<tr>
<td>Total</td>
<td></td>
<td></td>
<td>{{$tamu}}</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>{{$penghasilan}}</td>
</tr>
</table>
@endforeach
<h3>Total Tamu : {{$tamu}}</h3>
<h3>Total Penghasilan : Rp. {{$penghasilan}}</h3>
</body>
</html>
......@@ -27,8 +27,9 @@
<label>Nama Homestay</label>
<!-- <input type="text" name="nama_homestay"> -->
<select class="" name="nama_homestay">
<option value="Mawar Homestay"> Mawar Homestay</option>
<option value="Dion Homestay"> Dion Homestay </option>
@foreach($homestay as $h)
<option value="{{$h->nama_homestay}}">{{$h->nama_homestay}}</option>
@endforeach
</select>
<input type="submit" class="btn btn-warning" value="Cari" >
</div>
......@@ -50,7 +51,8 @@
<th>Nama Pemesan</th>
<th>Tanggal Mulai</th>
<th>Tanggal Berakhir</th>
<th>Jumlah Kamar yang dipesan</th>
<th>Jumlah Kamar</th>
<th>Total Harga</th>
</tr>
</thead>
<tbody>
......@@ -62,6 +64,7 @@
<td>{{$a->tanggal_mulai}}</td>
<td>{{$a->tanggal_berakhir}}</td>
<td>{{$a->jumlah_kamar}}</td>
<td>Rp {{number_format($a->total_harga)}}</td>
</tr>
@endforeach
</tbody>
......
......@@ -129,7 +129,7 @@
var fiedl = document.getElementById('pesan');
if(fiedl.value == ' ' || fiedl.value == null){
if(fiedl.value == ' ' || fiedl.value == null || fiedl.value == ' '){
alert('Pesan Harus di isi');
}else {
if(check) {
......
......@@ -71,7 +71,7 @@
<div class="col-lg-3 col-xs-6">
<div class="small-box bg-blue">
<div class="inner">
<h3>{{$countPesan}}</h3><br><br>
<h4>Feedback</h4><br><br>
<p>Feedback Pengunjung <i class="fa fa-arrow-circle-right"></i></p>
</div>
<div class="icon">
......
......@@ -26,6 +26,7 @@
<th>Pengaju</th>
<th>Nama Request Fasilitas</th>
<th>Gambar</th>
<th>Status</th>
<th>Lihat</th>
</tr>
@foreach($data as $a)
......@@ -39,6 +40,12 @@
@endif
</td>
<td>
@if($a->status == 0) Sedang Menunggu
@elseif($a->status == 1) Diterima
@elseif($a->status == 2) Ditolak
@endif
</td>
<td>
<a href="{{url('detailreqFasilitas/'.$a->id)}}" class="btn btn-primary"><i class="fa fa-eye"></i> </a></td>
</td>
</tr>
......
......@@ -22,6 +22,9 @@
<input type="submit" class="btn btn-warning" value="Print">
</div>
</form>
@if($data==null)
<H2>Data Tidak Ada</H2>
@else
......@@ -48,7 +51,7 @@
<td>{{$a->extrabed}}</td>
<td>{{$a->tanggal_mulai}}</td>
<td>{{$a->tanggal_berakhir}}</td>
<td>{{$a->total_harga}}</td>
<td><Rp></Rp> {{number_format($a->total_harga,0)}}</td>
</tr>
@endforeach
<tr>
......@@ -60,7 +63,7 @@
<td></td>
<td></td>
<td></td>
<td>{{$penghasilan}}</td>
<td>Rp {{number_format($penghasilan)}}</td>
</tr>
</table>
@endif
......
......@@ -36,6 +36,7 @@
<tr>
<th>Nama Pelanggan</th>
<th>Tanggal Check-in</th>
<th>Tanggal Check-out</th>
<th>Bukti Pembayaran</th>
<th>Lihat Detail</th>
<th>Download Bukti Pembayaran</th>
......@@ -46,6 +47,7 @@
<tr>
<td>{{$a->nama}}</td>
<td>{{$a->tanggal_mulai}}</td>
<td>{{$a->tanggal_berakhir}}</td>
<td>
@if($a->bukti_pembayaran==null)
Bukti pembayaran tidak ada
......
......@@ -33,7 +33,7 @@
<input class="date agileits w3layouts" id="datepicker1" name="tanggal_mulai" type="text" required value="Tanggal Check in" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = '';}">
</div>
<div class="col-md-2 col-sm-2 agileits w3layouts contact-grid contact-grid-2 ">
<label>Durasi</label>
<label>Durasi/Malam</label>
<input type="number" min="1" class="text wow agileits w3layouts " name="jumlah_hari" required onchange="updateDate(this)" placeholder="Lama Menginap" style="background-color: white; color: black">
</div>
<div class="col-md-2 col-sm-2 agileits w3layouts contact-grid contact-grid-2 ">
......@@ -167,14 +167,12 @@
<div class="services agileits w3layouts" style="padding-top: 10px">
<h1> Lokasi Kami</h1>
<div class="banner agileits w3layouts">
{{--<iframe--}}
{{--width="100%"--}}
{{--height="400"--}}
{{--frameborder="0" style="border:0"--}}
{{--src="https://www.google.com/maps/embed/v1/place?key=AIzaSyBsbx4u_4cq_g-Qq7YCoPyYcO6A48YkOgQ=Pantai+Lumban+Bulbul,+Kabupaten+Toba+Samosir,+Sumatera+Utara" allowfullscreen>--}}
<img src="/img/new_map.jpg" alt="Agileits W3layouts" >
<iframe
width="100%"
height="400"
frameborder="0" style="border:0"
src="https://www.google.com/maps/embed?pb=!1m14!1m8!1m3!1d3986.473439179238!2d99.07229116254526!3d2.346290392637484!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x0%3A0x7438dfa4c9a63950!2sPantai+BUL+BUL!5e0!3m2!1sen!2sid!4v1497693314254" width="600" height="450" frameborder="0" style="border:0" allowfullscreen>
</iframe>
</div>
......
......@@ -28,6 +28,8 @@
@if(Auth::user()->role=="Customer")
<li><a href="{{ url('customerHistory') }}">History</a></li>
<li class="dropdown user user-menu">
<!-- Menu Toggle Button -->
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
......@@ -55,11 +57,6 @@
<div class="pull-left">
<a href="{{ url('customerProfile') }}" class="btn btn-default btn-flat">{{ trans('adminlte_lang::message.profile') }}</a>
</div>
<div class="pull-left" style="margin-left: 20px">
<a href="{{ url('customerHistory') }}" class="btn btn-default btn-flat">History</a>
</div>
<div class="pull-right">
<a href="{{ url('/logout') }}" class="btn btn-default btn-flat"
onclick="event.preventDefault();
......
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