Commit d2dc83c4 by Juliper

perbaikan lagi

parent 0a508c47
......@@ -107,13 +107,13 @@ class AdminController extends Controller
return redirect(url('admin/create'))->with('info', 'User berhasil ditambah ');
}
//Menampilkan Daftar RequestHomestay
public function RequestHomestay(){
$data = DB::table('pemilikhomestay')
->join('pengajuan_homestay','pemilikhomestay.id','=','pengajuan_homestay.id_pemilik_homestay')
->select('pemilikhomestay.nama','pengajuan_homestay.*')
->orderBy('pengajuan_homestay.id','desc')
->get();
$count = $data->count();
......@@ -148,6 +148,7 @@ class AdminController extends Controller
$data = DB::table('pemilikhomestay')
->join('requestfasilitas','pemilikhomestay.id','=','requestfasilitas.id_pemilik_homestay')
->select('pemilikhomestay.nama','requestfasilitas.*')
->orderBy('requestfasilitas.id','desc')
->get();
$count = $data->count();
......@@ -155,6 +156,17 @@ class AdminController extends Controller
return view('adminlte::layouts.admin.listRequestFasilitas')->with('data',$data)->with('count',$count);
}
//Menolak pengajuan homestay
public function RejectPengajuanHomestay($id){
//dd($id,"masuk agan");
$RH = RequestHomestay::find($id);
$RH->status = 2;
$RH->update();
return redirect('requestHomestay');
}
//Penyetujuan Pengajuan Homestay
public function AccPengajuanHomestay($id){
$RH = RequestHomestay::find($id);
......
......@@ -63,7 +63,7 @@ class CustomerController extends Controller
->get();
$feed = new Feedback();
$feed->id_pemilik_homestay = $dataPemilik[0]->idPemilik;
$feed->id_pemilik_homestay = $dataPemilik[0]->id_pemilik;
$feed->id_pelanggan = $dataPelanggan[0]->id;
$feed->feedback = $request['feedback'];
......@@ -110,6 +110,7 @@ class CustomerController extends Controller
->join('pemilikhomestay','homestay.id_pemilik','=','pemilikhomestay.id')
->select('transaksi.*','pemilikhomestay.nama','pemilikhomestay.no_rekening')
->where('transaksi.id_pelanggan','=',$data[0]->id)
->orderBy('transaksi.id', 'desc')
->get();
return view('adminlte::layouts.customers.History')->with('data',$dataTrans);
......
......@@ -250,9 +250,9 @@ class OwnerController extends Controller
->get();
$dataHomestay = DB::table('homestay')
->join('pemilikhomestay','homestay.idPemilik','pemilikhomestay.id')
->join('pemilikhomestay','homestay.id_pemilik','pemilikhomestay.id')
->select('homestay.id')
->where('homestay.idPemilik','=',$dataPemilik[0]->id)
->where('homestay.id_pemilik','=',$dataPemilik[0]->id)
->get();
$lb->homestay = $dataHomestay[0]->id;
......@@ -337,6 +337,7 @@ class OwnerController extends Controller
->join('pelanggan','transaksi.id_pelanggan','=','pelanggan.id')
->select('transaksi.*','pelanggan.nama','pelanggan.alamat','pelanggan.no_telepon')
->where('homestay.id_pemilik','=',$dataPel[0]->id)
->orderBy('transaksi.id','desc')
->get();
return view('adminlte::layouts.owner.listPesanan')->with('data',$data)->with('count',$data->count());
......@@ -444,6 +445,7 @@ class OwnerController extends Controller
->join('pemilikhomestay','pengajuan_homestay.id_pemilik_homestay','=','pemilikhomestay.id')
->select('pemilikhomestay.nama','pengajuan_homestay.*')
->where('pengajuan_homestay.id_pemilik_homestay','=',$idPemilik[0]->id)
->orderBy('pengajuan_homestay.id','desc')
->get();
//dd('masuk');
$count = $data->count();
......@@ -464,6 +466,7 @@ class OwnerController extends Controller
->join('pemilikhomestay','requestfasilitas.id_pemilik_homestay','=','pemilikhomestay.id')
->select('pemilikhomestay.nama','requestfasilitas.*')
->where('requestfasilitas.id_pemilik_homestay','=',$idPemilik[0]->id)
->orderBy('requestfasilitas.id','desc')
->get();
$count = $data->count();
......
......@@ -45,7 +45,7 @@
<button type="submit" class="btn btn-info"><i class="glyphicon glyphicon-apple"> Terima</i></button>
</form>
<td>
<form action="{{url('listPengajuanHomestay/'.$a->id)}}" method="post">
<form action="{{url('listPengajuanHmsty/'.$a->id)}}" method="post">
{{csrf_field()}}
<input type="hidden" name="_method" value="PUT">
<button type="submit" class="btn btn-danger"><i class="glyphicon glyphicon-trash"> Tolak</i></button>
......
......@@ -54,12 +54,6 @@
<td>
<img src="/img/{{ $a->bukti_pembayaran }}" style="width: 100px" alt="User Image" onclick="document.getElementById('modal').style.display='block'"/>
<div id ="modal" class="w3-modal" onclick="this.style.display='none'">
<span class="w3-closebtn w3-hover-red w3-container w3-padding-hor-16 w3-display-topright">&times;</span>
<div class="w3-modal-content w3-animate-zoom">
<img src="/img/{{ $a->bukti_pembayaran }}" style="width:100%">
</div>
</div>
</td>
<td>
@if($a->status==0)
......
......@@ -106,6 +106,7 @@ Route::group(['middleware' => 'dinaspariwisata'], function () {
Route::put('requestFasilitas/{id}','AdminController@UpdateRequestFasilitas');
Route::put('requestFasilitass/{id}','AdminController@UpdateRequestFasilitass');
Route::put('listPengajuanHomestay/{id}','AdminController@AccPengajuanHomestay');
Route::put('listPengajuanHmsty/{id}','AdminController@RejectPengajuanHomestay');
});
......
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