Commit 558f9674 by Palti Sinaga

qwerty

parents 7816281a 2cd41842
...@@ -432,4 +432,12 @@ class AdminController extends Controller ...@@ -432,4 +432,12 @@ class AdminController extends Controller
$data = Owner::find($id); $data = Owner::find($id);
return view('adminlte::layouts.admin.ownerprofil')->with('data',$data); return view('adminlte::layouts.admin.ownerprofil')->with('data',$data);
} }
public function cancelRequest(Request $request){
$req = RequestFasilitas::find($request->requestID);
$req->status = 2;
$req->notif = 1;
$req->pesan = $request->pesan;
$req->update();
}
} }
...@@ -120,6 +120,31 @@ class GuestController extends Controller ...@@ -120,6 +120,31 @@ class GuestController extends Controller
return view('adminlte::layouts.customers.rincianpemesanan')->with('data',$data[0])->with('request',$request)->with('totalHarga',$TotalHarga)->with('dataUser',$dataUser[0])->with('id',$id); return view('adminlte::layouts.customers.rincianpemesanan')->with('data',$data[0])->with('request',$request)->with('totalHarga',$TotalHarga)->with('dataUser',$dataUser[0])->with('id',$id);
} }
public function sendFeedback(Request $request, $id){
if(Auth::guest()){
return redirect()->action('GuestController@detailhomestay', ['id' => $id])->with('message','Anda Harus Login Dulu !!');
//dd("maaf nggak bisa bang");
}
$dataPelanggan = DB::table('pelanggan')
->select('pelanggan.id')
->where('pelanggan.id_akun','=',Auth::user()->id)
->get();
$dataPemilik = DB::table('homestay')
->select('homestay.id_pemilik')
->where('homestay.id','=',$id)
->get();
$feed = new Feedback();
$feed->id_pemilik_homestay = $dataPemilik[0]->id_pemilik;
$feed->id_pelanggan = $dataPelanggan[0]->id;
$feed->feedback = $request['feedback'];
$feed->save();
return redirect()->action('GuestController@detailhomestay', ['id' => $id]);
}
public function homestay($id,$tm,$lm,$ts,$jt,$jk){ public function homestay($id,$tm,$lm,$ts,$jt,$jk){
...@@ -372,12 +397,28 @@ class GuestController extends Controller ...@@ -372,12 +397,28 @@ class GuestController extends Controller
->where('homestay.id','=',$id) ->where('homestay.id','=',$id)
->get(); ->get();
//dd($data[0]->id_pemilik);
$daftarBook = DB::table('daftar_book') $daftarBook = DB::table('daftar_book')
->select('daftar_book.*') ->select('daftar_book.*')
->where('daftar_book.homestay','=',$id) ->where('daftar_book.homestay','=',$id)
->where('daftar_book.status','=',1) ->where('daftar_book.status','=',1)
->get(); ->get();
$dataFeedback = DB::table('feedback')
->join('pelanggan','feedback.id_pelanggan','pelanggan.id')
->select('feedback.*','pelanggan.nama')
->where('feedback.id_pemilik_homestay','=',$data[0]->id_pemilik)
->orderBy('feedback.id', 'desc')
->paginate(5);
/*
$dataFeedback = DB::table('feedback')
->where('feedback.id_pemilik_homestay','=',$data[0]->id_pemilik)
->get();*/
//dd($dataFeedback);
$now = new DateTime(); $now = new DateTime();
$nowCurrent = $now->format('Y-m-d'); $nowCurrent = $now->format('Y-m-d');
...@@ -396,6 +437,6 @@ class GuestController extends Controller ...@@ -396,6 +437,6 @@ class GuestController extends Controller
->where('kamar.id_homestay','=',$id) ->where('kamar.id_homestay','=',$id)
->get(); ->get();
return view('adminlte::layouts.pages.Homestay')->with('data',$data[0])->with('daftarBook',$daftarBook)->with('dataKamar',$dataKamar)->with('avilable',$avilableRoom); return view('adminlte::layouts.pages.Homestay')->with('data',$data[0])->with('daftarBook',$daftarBook)->with('dataKamar',$dataKamar)->with('avilable',$avilableRoom)->with('feedback',$dataFeedback);
} }
} }
...@@ -4889,3 +4889,96 @@ select option{ ...@@ -4889,3 +4889,96 @@ select option{
padding: 10px; padding: 10px;
background-color: none; background-color: none;
} }
.timeline {
position: relative;
margin: 0 0 30px 0;
padding: 0;
list-style: none;
}
.timeline:before {
content: '';
position: absolute;
top: 0;
bottom: 0;
width: 4px;
background: #ddd;
left: 31px;
margin: 0;
border-radius: 2px;
}
.timeline > li {
position: relative;
margin-right: 10px;
margin-bottom: 15px;
}
.timeline > li:before,
.timeline > li:after {
content: " ";
display: table;
}
.timeline > li:after {
clear: both;
}
.timeline > li > .timeline-item {
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
border-radius: 3px;
margin-top: 0;
background: #fff;
color: #444;
margin-left: 60px;
margin-right: 15px;
padding: 0;
position: relative;
}
.timeline > li > .timeline-item > .time {
color: #999;
float: right;
padding: 10px;
font-size: 12px;
}
.timeline > li > .timeline-item > .timeline-header {
margin: 0;
color: #555;
border-bottom: 1px solid #f4f4f4;
padding: 10px;
font-size: 16px;
line-height: 1.1;
}
.timeline > li > .timeline-item > .timeline-header > a {
font-weight: 600;
}
.timeline > li > .timeline-item > .timeline-body,
.timeline > li > .timeline-item > .timeline-footer {
padding: 10px;
}
.timeline > li > .fa,
.timeline > li > .glyphicon,
.timeline > li > .ion {
width: 30px;
height: 30px;
font-size: 15px;
line-height: 30px;
position: absolute;
color: #666;
background: #d2d6de;
border-radius: 50%;
text-align: center;
left: 18px;
top: 0;
}
.timeline > .time-label > span {
font-weight: 600;
padding: 5px;
display: inline-block;
background-color: #fff;
border-radius: 4px;
}
.timeline-inverse > li > .timeline-item {
background: #f0f0f0;
border: 1px solid #ddd;
box-shadow: none;
}
.timeline-inverse > li > .timeline-item > .timeline-header {
border-bottom-color: #ddd;
}
\ No newline at end of file
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
<div class="input-group-addon"> <div class="input-group-addon">
<i class="fa fa-newspaper-o"></i> <i class="fa fa-newspaper-o"></i>
</div> </div>
<textarea class="form-control" placeholder="Deskripsi" style="height:200px;" name="deskripsi"> </textarea> <textarea class="form-control" placeholder="Deskripsi" id="pesan" style="height:200px;" name="deskripsi"> </textarea>
</div> </div>
<span id="errfn2" style="color: red"></span> <span id="errfn2" style="color: red"></span>
</div> </div>
...@@ -95,16 +95,19 @@ ...@@ -95,16 +95,19 @@
<button type="submit" class="btn btn-info"><i class="fa fa-check"> Terima</i></button> <button type="submit" class="btn btn-info"><i class="fa fa-check"> Terima</i></button>
</form> </form>
<!-- --> </td>
<td>
<!-- -->
{{--<form action="{{url('requestFasilitass/'.$data->id)}}" method="post" style="display:inline">--}} {{--<form action="{{url('requestFasilitass/'.$data->id)}}" method="post" style="display:inline">--}}
{{--{{csrf_field()}}--}} {{--{{csrf_field()}}--}}
{{--<input type="hidden" name="_method" value="PUT">--}} {{--<input type="hidden" name="_method" value="PUT">--}}
{{--<button type="submit" class="btn btn-danger" data-toggle="modal" data-target="#confirmDelete"--}} {{--<button type="submit" class="btn btn-danger" >--}}
{{--data-title="Delete User" data-message="Are you sure you want to delete this user ?">--}}
{{--<i class="fa fa-close" > Tolak</i>--}} {{--<i class="fa fa-close" > Tolak</i>--}}
{{--</button>--}} {{--</button>--}}
{{--</form>--}} {{--</form>--}}
<a class="btn btn-danger" onclick="cancelRequest()"> <i class="fa fa-close"></i>Tolak </a>
</td> </td>
@endif @endif
</tr> </tr>
...@@ -120,25 +123,33 @@ ...@@ -120,25 +123,33 @@
</div> </div>
</div> </div>
<script>
function cancelRequest() {
var check = confirm("Apakah anda yakin untuk menolak nya??");
<!-- <script>
$(".delete").on("submit", function(){ var fiedl = document.getElementById('pesan');
return confirm("Do you want to delete this item?");
}); if(fiedl.value == ' ' || fiedl.value == null){
</script> --> alert('Pesan Harus di isi');
}else {
<!-- <script type="text/javascript"> if(check) {
$('table[data-form="deleteForm"]').on('click', '.form-delete', function(e){ $.ajax({
e.preventDefault(); data: {
var $form=$(this); pesan : fiedl.value,
$('#confirm').modal({ backdrop: 'static', keyboard: false }) requestID: '{{$data->id}}',
.on('click', '#delete-btn', function(){ _token: '{{ csrf_token() }}',
$form.submit(); },
}); url: '{{ url('/cancelrequest') }}',
}); type: 'POST',
</script> --> success: function (data) {
window.location.reload(true);
}
});
}
}
}
</script>
<div id="form" class="modal fade" role="dialog"> <div id="form" class="modal fade" role="dialog">
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
@endif @endif
</td> </td>
<td> <td>
{{$a->pesan}}
</td> </td>
<td> <td>
@if($a->notif==1) @if($a->notif==1)
......
...@@ -99,6 +99,18 @@ ...@@ -99,6 +99,18 @@
</div> </div>
<!-- //Informations --> <!-- //Informations -->
<div class="details agileits w3layouts">
<div class="container">
<div class="col-md-6 col-sm-6 agileits w3layouts contact-grid contact-grid-2 ">
@if(Session::has('message'))
<div class="alert alert-danger">
<center>{{ Session::get('message') }}</center>
</div>
@endif
</div>
</div>
</div>
<!-- Kritik & Saran --> <!-- Kritik & Saran -->
<div class="details agileits w3layouts"> <div class="details agileits w3layouts">
<div class="container"> <div class="container">
...@@ -106,14 +118,13 @@ ...@@ -106,14 +118,13 @@
<h2 style="margin-bottom: 10px;">Feedback</h2> <h2 style="margin-bottom: 10px;">Feedback</h2>
<form action="{{url('feedback/'.$data->id)}}" method="post" style="margin-bottom: 25px;"> <form action="{{url('feedback/'.$data->id)}}" method="post" style="margin-bottom: 25px;">
<input type="hidden" name="_token" value="{{ csrf_token() }}"> <input type="hidden" name="_token" value="{{ csrf_token() }}">
<input type="text" class="text wow agileits w3layouts " name="Name" placeholder="Name" required="">
<textarea name="feedback" class="wow agileits w3layouts " placeholder="Message" required=""></textarea> <textarea name="feedback" class="wow agileits w3layouts " placeholder="Message" required=""></textarea>
<input type="submit" class="more_btn wow agileits w3layouts " value="Kirim Feedback"> <input type="submit" class="more_btn wow agileits w3layouts " value="Kirim Feedback">
</form> </form>
</div> </div>
</div> </div>
</div> </div>
</div>
<script> <script>
function updateDate(object) { function updateDate(object) {
//$('#tanggal_selesai').datepicker({ //$('#tanggal_selesai').datepicker({
...@@ -143,7 +154,24 @@ ...@@ -143,7 +154,24 @@
<h3 style="margin-bottom: 0px; font-weight:10px;"> Review Pengunjung </h3> <h3 style="margin-bottom: 0px; font-weight:10px;"> Review Pengunjung </h3>
<img style="width: 450px; margin-top: 3px;" src="{{asset('img/line1.png')}}"><br> <img style="width: 450px; margin-top: 3px;" src="{{asset('img/line1.png')}}"><br>
DISINI REVIEW <ul class="timeline">
@foreach($feedback as $a)
<li>
<i class="glyphicon glyphicon-envelope"></i>
<div class="timeline-item">
<span class="time"><i class="fa fa-clock-o"></i> {{$a->created_at}}</span>
<h3 class="timeline-header" style="border-bottom: 0px;"><a href="#">{{$a->nama}}</a> </h3>
<div class="timeline-body">
{{$a->feedback}}
</div>
<!-- <div class="timeline-footer">
<a class="btn btn-primary btn-xs">Read more</a>
<a class="btn btn-danger btn-xs">Delete</a>
</div> -->
</div>
</li>
@endforeach
</ul>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -105,6 +105,7 @@ Route::get('detailhomestay/{id}','GuestController@detailhomestay'); ...@@ -105,6 +105,7 @@ Route::get('detailhomestay/{id}','GuestController@detailhomestay');
Route::get('daftar','GuestController@register'); Route::get('daftar','GuestController@register');
Route::post('daftar','GuestController@registerStore'); Route::post('daftar','GuestController@registerStore');
Route::get('rincianpemesanan/{id}','GuestController@rincianpemesanan'); Route::get('rincianpemesanan/{id}','GuestController@rincianpemesanan');
Route::post('feedback/{id}','GuestController@sendFeedback');
Route::group(['middleware' => 'customer'], function () { Route::group(['middleware' => 'customer'], function () {
Route::get('updatepesanan/{id}','CustomerController@updatePesanan'); Route::get('updatepesanan/{id}','CustomerController@updatePesanan');
...@@ -117,7 +118,6 @@ Route::group(['middleware' => 'customer'], function () { ...@@ -117,7 +118,6 @@ Route::group(['middleware' => 'customer'], function () {
Route::get('editProfileCustomer/{id}','CustomerController@editProfile'); Route::get('editProfileCustomer/{id}','CustomerController@editProfile');
Route::put('editProfileCustomer/{id}','CustomerController@updateProfile'); Route::put('editProfileCustomer/{id}','CustomerController@updateProfile');
Route::get('customerProfile','CustomerController@profile'); Route::get('customerProfile','CustomerController@profile');
Route::post('feedback/{id}','CustomerController@sendFeedback');
Route::get('rincianHistory/{id}','CustomerController@rincianHistory'); Route::get('rincianHistory/{id}','CustomerController@rincianHistory');
Route::get('rincianHistoryPrint/{id}','CustomerController@rincianHistoryPrint'); Route::get('rincianHistoryPrint/{id}','CustomerController@rincianHistoryPrint');
}); });
...@@ -145,4 +145,5 @@ Route::group(['middleware' => 'dinaspariwisata'], function () { ...@@ -145,4 +145,5 @@ Route::group(['middleware' => 'dinaspariwisata'], function () {
Route::get('listhomestay','AdminController@listhomestay'); Route::get('listhomestay','AdminController@listhomestay');
Route::get('resultlistpesanan','AdminController@listhomestay'); Route::get('resultlistpesanan','AdminController@listhomestay');
Route::get('printFasilitas/{id}','AdminController@printFasilitas'); Route::get('printFasilitas/{id}','AdminController@printFasilitas');
Route::post('/cancelrequest', 'AdminController@cancelrequest');
}); });
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