Commit 1da81d7c by Palti Sinaga

1

parent 3664c6aa
......@@ -24,7 +24,6 @@ use Nexmo\Laravel\Facade\Nexmo;
class CustomerController extends Controller
{
public function __construct(){
$this->middleware('customer');
}
......@@ -310,6 +309,8 @@ class CustomerController extends Controller
//Melakukan Pembookingan Homestay
public function booking(Request $request){
$this->validate($request,[
'tanggal' => 'required',
'jumlah_hari' => 'required|numeric',
......
......@@ -23,6 +23,22 @@ class OwnerController extends Controller
$this->middleware('owner');
}
public function detailpesanan($id){
//dd($id);
$dataTrans = DB::table('transaksi')
->join('pelanggan','transaksi.id_pelanggan','=','pelanggan.id')
->select('transaksi.tanggal_mulai','transaksi.tanggal_berakhir','transaksi.jumlah_kamar','pelanggan.nama','pelanggan.no_telepon')
->where('transaksi.id','=',$id)
->get();
//dd($dataTrans);
return view('adminlte::layouts.owner.detailpesanan')->with('data',$dataTrans[0]);
}
public function index()
{
$dataPel = DB::table('pemilikhomestay')
......
@extends('adminlte::layouts.app')
@section('htmlheader_title')
{{ trans('adminlte_lang::message.home') }}
@endsection
@section('main-content')
<div class="box box-info">
<div class="box-header with-border">
<h3 class="box-title"> DETAIL PESANAN </h3>
@if(Session::has('alert-success'))
<div class="alert alert-success">
{{ Session::get('alert-success') }}
</div>
@endif
@if (count($errors) > 0)
<div class="alert alert-danger">
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
</div>
<div class="box-body">
<table class="table table-user-information">
<tr>
<th>Nama </th>
<td>: </td>
<td>{{$data->nama}}</td>
</tr>
<tr>
<th>No Telepon</th>
<td>: </td>
<td>{{$data->no_telepon}}</td>
</tr>
</table>
</div>
<div class="box-footer">
</div>
</div>
@endsection
......@@ -24,6 +24,7 @@
</div>
@endif
</div>
<div class="box-body">
<div class="col-md-4 col-sm-6 col-xs-12">
......@@ -34,34 +35,39 @@
<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>Download </th>
<th colspan="3" style="position: center;">Status</th>
<th></th>
</tr>
@foreach($data as $a)
<tr>
<td>{{$a->nama}}</td>
<td>{{$a->alamat}}</td>
<td>{{$a->no_telepon}}</td>
<td>{{$a->tanggal_mulai}}</td>
<td>{{$a->tanggal_berakhir}}</td>
<td>{{$a->lama_menginap}} Hari</td>
<td>{{$a->jumlah_kamar}}</td>
<td> <a href="{{url('detailpesanan/'.$a->id)}}" class="btn btn-primary"><i class="glyphicon glyphicon-edit"></i> </a></a></td>
<td>
@if($a->bukti_pembayaran==null)
Bukti pembayaran tidak ada
@else
<img src="/img/{{ $a->bukti_pembayaran }}" style="width: 100px" alt="User Image" onclick="document.getElementById('modal').style.display='block'"/>
<a href="/img/{{ $a->bukti_pembayaran }}" alt="Bukti Pembayaran" data-lightbox="roadtrip"><img src="/img/{{ $a->bukti_pembayaran }}" style="max-height: 150px; width:200px;"></a>
@endif
</td>
<td>
@if($a->bukti_pembayaran==null)
@else
<a id="download" href="/img/{{ $a->bukti_pembayaran }}" download="/img/{{ $a->bukti_pembayaran }}" class="btn btn-danger"><i class="fa fa-download"></i> Download</a>
@endif
</td>
<td>
@if($a->status==0)
<td>
......@@ -84,10 +90,17 @@
@endif
</td>
</td>
</tr>
@endforeach
</table>
{!! $data->render() !!}
</div>
</div>
<script type="text/javascript">
document.getElementById("download").setAttribute("download", "bukti pembayaran_{{$a->nama}}.jpg")
</script>
@endsection
......@@ -149,7 +149,6 @@
@endforeach
<div class="clearfix"></div>
<!--Homestay pict -->
</div>
</div>
</div>
......@@ -169,9 +168,20 @@
</div>
</div>
</div>
<!-- //Kritik & Saran -->
<div class="cuisines agileits w3layouts">
<div class="container">
<div class="col-md-6 col-sm-6 cuisines-grids agileits w3layouts cuisines-grids-1 ">
<h3 style="margin-bottom: 0px; font-weight:10px;"> Review Pengunjung </h3>
<img style="width: 450px; margin-top: 3px;" src="{{asset('img/line1.png')}}"><br>
DISINI REVIEW
</div>
</div>
</div>
<!-- //Informations -->
<!-- Scripts -->
<!-- Date-Picker-JavaScript -->
<script src="{{asset('js/jquery-ui.js')}}"></script>
......
......@@ -85,7 +85,7 @@ Route::group(['middleware' => 'owner'], function () {
Route::get('listPengajuanFasilitas','OwnerController@listPengajuanFasilitas');
Route::get('listFeedback','OwnerController@feddback');
Route::get('home','OwnerController@index');
Route::get('detailpesanan/{id}','OwnerController@detailpesanan');
});
Route::get('detailhomestay/{id}','GuestController@detailhomestay');
......@@ -122,29 +122,3 @@ Route::group(['middleware' => 'dinaspariwisata'], function () {
Route::put('listPengajuanHmsty/{id}','AdminController@RejectPengajuanHomestay');
Route::get('ownerprofil/{id}','AdminController@profileowner');
});
Route::get('howtobook', function(){
return view('howtobook');
});
Route::get('gallery', function(){
return view('gallery');
});
Route::get('gallerrry', function(){
return view('media_gallery');
});
/*Route::get('UpdateHomestay', function(){
return view('adminlte::layouts.owner.UpdateHomestay');
});*/
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