Commit e98ea325 by Palti Sinaga

123123

parents beefbbac 7979307c
......@@ -28,11 +28,6 @@ class CustomerController extends Controller
$this->middleware('customer');
}
public function rincianpemesanan(){
return view('adminlte::layouts.customers.rincianpemesanan');
}
//Pembatalan Pemesanan/Pembookingan Homestay
public function cancelPemesanan($id){
......@@ -446,6 +441,7 @@ class CustomerController extends Controller
$trans->tanggal_mulai = $request['tanggal'];
$trans->tanggal_berakhir = $baru;
$trans->jumlah_kamar =$request['jumlah_kamar'];
$trans->permintaan_khusus = $request['permintaan_khusus'];
$trans->lama_menginap = $request['jumlah_hari'];
$trans->total_pembayaran = $request['jumlah_kamar'] * $dataHomestay[0]->harga;
$trans->status = 0;
......@@ -458,10 +454,11 @@ class CustomerController extends Controller
->where('transaksi.tanggal_berakhir','=',$baru)
->get();
//Insert Table Daftar Booking
$lb->homestay = $request['id'];
$lb->id_transaksi = $dataTrans[0]->id;
$lb->nama_pemesan = $dataPelanggan[0]->nama;
$lb->nama_pemesan = $request['nama'];
$lb->jumlah_kamar = $request['jumlah_kamar'];
$lb->tanggal_mulai = $request['tanggal'] ;
$lb->tanggal_berakhir = $baru;
......
......@@ -9,7 +9,7 @@ class ListBook extends Model
protected $table = "daftar_book";
protected $fillable = [
'nama_pemesan','tanggal_mulai','tanggal_berakhir','homestay','jumlah_kamar'
'jumlah_tamu','total_harga','permintaan_khusus','nama_pemesan','tanggal_mulai','tanggal_berakhir','homestay','jumlah_kamar'
];
public $timestamps = false;
......
......@@ -9,7 +9,7 @@ class Transaksi extends Model
protected $table = "transaksi";
protected $fillable = [
'id_pelanggan', 'tanggal_mulai', 'tanggal_berakhir','lama_menginap','total_pembayaran','tanggal_konfirmasi','status',
'tanggal_konfirmasi','jumlah_tamu','permintaan_khusus','id_pelanggan', 'tanggal_mulai', 'tanggal_berakhir','lama_menginap','total_pembayaran','tanggal_konfirmasi','status',
];
public $timestamps = false;
......
......@@ -15,7 +15,6 @@
<th> Status Pemesanan</th>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
......@@ -39,22 +38,10 @@
<td>
<a href="{{url('buktipembayaran/'.$a->id)}}">Upload Bukti</a>
</td>
<td>
<a href="{{url('updatepesanan/'.$a->id)}}">Perbaharui Pesanan</a>
</td>
<td>
<form action="{{url('batalkan/'.$a->id)}}" method="post">
<input type="hidden" name="_method" value="PUT">
</i><input type="submit" value="batalkan" class="btn btn-warning">
{{csrf_field()}}
</form>
</td>
@elseif($a->status==1)
<td colspan="3"><h4>Diterima</h4></td>
@elseif($a->status==2)
<td colspan="3"><h4>Ditolak</h4></td>
@elseif($a->status=3)
<td colspan="3"><h4>Telah Dibatalkan</h4></td>
@endif
</td>
</tr>
......
......@@ -4,45 +4,60 @@
<div class="container">
<div class="col-md-6 col-sm-6 cuisines-grids agileits w3layouts" style="padding:0px;">
<h3>Data Pemesanan Homestay</h3> <br>
<!-- <h3 style="margin-left:60px ; margin-top: 3px;"> {{Auth::user()->name}} </h2> -->
<!-- <h3 style="margin-left:60px ; margin-top: 3px;"> </h2> -->
<form class="form-horizontal" action="" method="post" enctype="multipart/form-data">
<input type="hidden" name="_method" value="PUT">
<form class="form-horizontal" action="{{url('booking')}}" method="post" enctype="multipart/form-data">
{{csrf_field()}}
<div class="form-group">
<div class="col-sm-10">
<label for="">Nama</label>
<input type="text" name="nama" class="form-control" id="inputEmail3" value="">
<input type="text" name="nama" class="form-control" value="{{Auth::user()->name}}" id="inputEmail3" >
</div>
</div>
<div class="form-group">
<div class="col-sm-5">
<label>Nomor Handphone Kontak</label>
<input type="text" name="nama" class="form-control" id="inputEmail3" value=" ">
<input type="text" name="kontak_hp" class="form-control" id="inputEmail3" value="{{$dataUser->no_telepon}}">
</div>
<div class="col-sm-5">
<label>Alamat Email Kontak</label>
<input type="text" name="nama" class="form-control" id="inputEmail3" value="">
<input type="text" name="kontak_email" class="form-control" id="inputEmail3" value="{{Auth::user()->email}}">
</div>
</div>
<div class="form-group">
<div class="col-sm-10">
<label>Permintaan Khusus</label>
<textarea style="border: #cccccc 1px solid;border-radius: 5px; min-height:150px;"></textarea>
<textarea name="permintaan_khusus" style="border: #cccccc 1px solid;border-radius: 5px; min-height:150px;"></textarea>
</div>
</div>
<input type="hidden" value="{{$dataUser->no_telepon}}" name="id_user">
<input type="hidden" value="{{$request->lama_menginap}}" name="lama_menginap">
<input type="hidden" value="{{$request->tanggal_mulai}}" name="tanggal_mulai">
<input type="hidden" value="{{$request->tanggal_selesai}}" name="tanggal_selesai">
<input type="hidden" value="{{$request->jumlah_kamar}}" name="jumlah_kamar">
<input type="hidden" value="{{$request->jumlah_tamu}}" name="jumlah_tamu">
<input type="hidden" value="{{$data->harga}}" name="harga_homestay">
<input type="hidden" value="{{$totalHarga}}" name="total_harga">
<input type="hidden" value="{{$id}}" name="id_homestay">
<!-- <div class="form-group" align="right">
<div class="col-sm-10">
<input type="submit" class="btn btn-primary">
</div>
</div> -->
</div>
<div class="form-group" align="left">
<div class="col-sm-10">
<input type="submit" class="btn btn-warning" value="Lanjutkan Pembayaran">
</div>
</div>
</form>
</div>
<div class="col-md-5 col-sm-5 cuisines-grids agileits w3layouts" style="background-color: #f9f9f9;padding: 40px;border-radius: 9px;">
<h3>Rincian Pemesanan Homestay</h3> <br> <br><br>
......@@ -50,26 +65,30 @@
<tr>
<td>Durasi</td>
<td>:</td>
<td>{{$request->lama_menginap}} Malam</td>
</tr>
<tr>
<td> Check-in</td>
<td>:</td>
<td>{{$request->tanggal_mulai}}</td>
</tr>
<tr>
<td> Check-in</td>
<td> Check-out</td>
<td>:</td>
<td>{{$request->tanggal_selesai}}</td>
</tr>
<tr>
<td>Julmah Kamar</td>
<td>Jumlah Kamar</td>
<td>:</td>
<td>{{$request->jumlah_kamar}}</td>
</tr>
<tr>
<td> Jumlah Tamu </td>
<td>:</td>
<td>{{$request->jumlah_tamu}}</td>
</tr>
</table>
......@@ -77,41 +96,20 @@
<div class=" cuisines-grids agileits w3layouts" >
<h3>Rincian Harga</h3><br>
<table class="table-condensed" style="font-size: 16px; margin-left: -3px; color: #777;" >
<label for="">Nama Homestay</label>
<label for="">{{$data->nama_homestay}}</label>
<tr>
<td>Harga Kamar</td>
<td>:</td>
</tr>
<tr>
<td>Harga Kamar</td>
<td>:</td>
<td>{{$data->harga}}</td>
</tr>
<tr>
<td> Total Bayar</td>
<td>:</td>
</tr>
<tr>
<td> Check-in</td>
<td>:</td>
</tr>
<tr>
<td>Julmah Kamar</td>
<td>:</td>
</tr>
<tr>
<td> Jumlah Tamu </td>
<td>:</td>
<td>{{$totalHarga}}</td>
</tr>
</table>
<br>
<form class="form-horizontal" action="" method="post" enctype="multipart/form-data">
<div class="form-group" align="left">
<div class="col-sm-10">
<input type="submit" class="btn btn-warning" value="Lanjutkan Pembayaran">
</div>
</div>
</form>
</div>
</div>
......
......@@ -73,14 +73,13 @@
</tr>
<tr>
<td>
<form action="">
<form action="{{url('rincianpemesanan/'.$id)}}">
<input type="hidden" name="tanggal_mulai" value="{{$tm}}">
<input type="hidden" name="lama_menginap" value="{{$lm}}">
<input type="hidden" name="tanggal_selesai" value="{{$ts}}">
<input type="hidden" name="jumlah_tamu" value="{{$jt}}">
<input type="hidden" name="jumlah_kamar" value="{{$jk}}">
<input type="submit" value="Pesan Sekarang" class="btn-succes">
<a href="{{url('/rincianpemesanan')}}">pesan coba</a>
</form>
</td>
</tr>
......
......@@ -22,10 +22,10 @@
<div class="col-md-4 col-sm-4 details-grid details-grid-2 agileits w3layouts ">
<div class="details-grid2 agileits w3layouts">
<div class="details-grid-image agileits w3layouts" >
<a href ="{{url('homestay/'.$a[0]->id.'/'.$tm.'/'.$lm.'/'.$ts.'/'.$jt.'/'.$jk.'/'.$th)}}" ><img src="/img/{{$a[0]->gambar}}" alt="Agileits W3layouts" ></a>
<a href ="{{url('homestay/'.$a[0]->id.'/'.$tm.'/'.$lm.'/'.$ts.'/'.$jt.'/'.$jk)}}" ><img src="/img/{{$a[0]->gambar}}" alt="Agileits W3layouts" ></a>
</div>
<div class="details-grid-info agileits w3layouts">
<a href ="{{url('homestay/'.$a[0]->id.'/'.$tm.'/'.$lm.'/'.$ts.'/'.$jt.'/'.$jk.'/'.$th)}}" ><h4>{{$a[0]->nama_homestay}}</h4></a>
<a href ="{{url('homestay/'.$a[0]->id.'/'.$tm.'/'.$lm.'/'.$ts.'/'.$jt.'/'.$jk)}}" ><h4>{{$a[0]->nama_homestay}}</h4></a>
</div>
<div class="clearfix"><h5>RP.{{$a[0]->harga}}</h5></div>
</div>
......
......@@ -94,11 +94,13 @@ Route::group(['middleware' => 'owner'], function () {
Route::resource('pdf','PDFController@showPDF');
});
Route::get('homestay/{id}/{tm}/{lm}/{ts}/{jt}/{jk}/{th}','GuestController@homestay');
Route::post('booking','GuestController@booking');
Route::get('homestay/{id}/{tm}/{lm}/{ts}/{jt}/{jk}','GuestController@homestay');
Route::get('cari','GuestController@cari');
Route::get('detailhomestay/{id}','GuestController@detailhomestay');
Route::get('daftar','GuestController@register');
Route::post('daftar','GuestController@registerStore');
Route::get('rincianpemesanan/{id}','GuestController@rincianpemesanan');
Route::group(['middleware' => 'customer'], function () {
Route::get('updatepesanan/{id}','CustomerController@updatePesanan');
......@@ -112,7 +114,7 @@ Route::group(['middleware' => 'customer'], function () {
Route::put('editProfileCustomer/{id}','CustomerController@updateProfile');
Route::get('customerProfile','CustomerController@profile');
Route::post('feedback/{id}','CustomerController@sendFeedback');
Route::get('rincianpemesanan','CustomerController@rincianpemesanan');
});
......
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