Commit fcf353d0 by Juliper

no message

parents f85a06ec 9174037e
......@@ -3,6 +3,7 @@
namespace App\Http\Controllers;
use App\Homestay;
use App\Transaksi;
use App\ListBook;
use App\RequestHomestay;
use App\Room;
......@@ -42,9 +43,19 @@ class AdminController extends Controller
$dataP = DB::table('pengajuan_homestay')
->get();
$dataPesan = DB::table('homestay')
->join('daftar_book','homestay.id','=','daftar_book.homestay')
->select('daftar_book.*','homestay.nama_homestay','homestay.owner')
->get();
return view('adminlte::layouts.admin.home')->with('data',$data)->with('count',$count)->with('dataF',$dataF)->with('countF',$dataF->count())
->with('dataH',$dataH)->with('countH',$dataH->count())
->with('dataP',$dataP)->with('countP',$dataP->count());
->with('dataP',$dataP)->with('countP',$dataP->count())
->with('dataPesan',$dataPesan)->with('countPesan',$dataPesan->count());
}
public function listhomestay()
......@@ -54,6 +65,8 @@ class AdminController extends Controller
return view('adminlte::layouts.admin.listhomestay')->with('data', $data);
}
return view('adminlte::layouts.admin.listhomestay')->with('data',$data);
}
public function cariPesanan(Request $request){
$dataHomestay = Homestay::where('nama_homestay',$request['nama_homestay'])->get();
......@@ -63,14 +76,17 @@ class AdminController extends Controller
//$dataBok = DB::table('daftar_book')
// ->where('da');
$asd = Transaksi::all()->where('status',1);
//dd($asd);
$data = DB::table('daftar_book')
->join('transaksi','daftar_book.id_transaksi','=','transaksi.id')
->join('homestay','daftar_book.homestay','=','homestay.id')
->join('pelanggan','transaksi.id_pelanggan','=','pelanggan.id')
//->join('pelanggan','transaksi.id_pelanggan','=','pelanggan.id')
->where('daftar_book.homestay','=',$dataHomestay[0]->id)
->whereMonth('daftar_book.tanggal_mulai','=',$request['bulan'])
->where('transaksi.status','=',1)
->select('homestay.nama_homestay','homestay.owner','pelanggan.nama','transaksi.total_pembayaran','transaksi.jumlah_kamar','daftar_book.*')
//->where('transaksi.status','=',1)
->select('homestay.nama_homestay','homestay.owner','transaksi.total_pembayaran','transaksi.jumlah_kamar','daftar_book.*')
->get();
$data2 = DB::table('daftar_book')
......@@ -164,10 +180,12 @@ class AdminController extends Controller
$dataOw->no_telepon;
$dataOw->no_rekening;
//dd('aman',$dataOw->id_akun);
$dataUs = User::find($dataOw->id_akun);
$dataUs->username = $request['username'];
$dataUs->password = bcrypt($request['password']);
......
......@@ -21,12 +21,21 @@
</div>
<div class="box-body">
<form action="{{url('caripesanan')}}">
<label>Bulan</label>
<input type="number" min="1" max="12" name="bulan">
<label>Nama Homestay</label>
<input type="text" name="nama_homestay">
<input type="submit" value="Cari">
<div class="form-group" align="right">
<label>Bulan</label>
<input type="number" min="1" max="12" name="bulan">
</div>
<div class="form-group" align="right">
<label>Nama Homestay</label>
<input type="text" name="nama_homestay">
</div>
<div class="form-group" align="right">
<input type="submit" class="btn btn-warning" value="Cari" >
</div>
</form>
<table class="table table-striped">
<tr>
<th>Nama Homestay</th>
......
......@@ -20,17 +20,27 @@
@endif
</div>
<div class="box-body">
<form action="{{url('caripesanan')}}">
<form action="{{url('caripesanan')}}">
<div class="form-group" align="left">
<label>Bulan</label>
<input type="number" min="1" max="12" name="bulan">
<label>Nama Homestay</label>
<input type="text" name="nama_homestay">
<input type="submit" value="Cari">
</form>
<input type="submit" class="btn btn-warning" value="Cari" >
</div>
<div class="form-group" align="right">
</div>
<div class="form-group" align="right">
</div>
</form>
<table class="table table-striped">
<tr>
<th>Nama Homestay</th>
<th>Nama Pemilik Homstay</th>
<th>Nama Pemilik Homestay</th>
<th>Nama Pemesan</th>
<th>Tanggal Mulai</th>
<th>Tanggal Berakhir</th>
......
......@@ -13,7 +13,7 @@
<div class="small-box bg-aqua">
<div class="inner">
<h3>{{$count}}</h3><br><br>
<p>Jumlah Pemilik Homestay</p>
<p>Data Pemilik Homestay</p>
</div>
<div class="icon">
<i class="fa fa-users"></i>
......@@ -27,7 +27,7 @@
<div class="small-box bg-green">
<div class="inner">
<h3>{{$countH}}</h3><br><br>
<p>Jumlah Homestay</p>
<p>Data Homestay</p>
</div>
<div class="icon">
<i class="fa fa-home"></i>
......@@ -50,15 +50,28 @@
</div>
<div class="col-lg-3 col-xs-6">
<div class="small-box bg-yellow">
<div class="small-box bg-green">
<div class="inner">
<h3>{{$countP}}</h3><br><br>
<p>Pengajuan Homestay </p>
</div>
<div class="icon">
<i class="fa fa-home"></i>
<i class="fa fa-list"></i>
</div>
<a href="/requestFasilitas" class="small-box-footer">Lihat <i class="fa fa-arrow-circle-right"></i></a>
<a href="/requestHomestay" class="small-box-footer">Lihat <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<div class="col-lg-3 col-xs-6">
<div class="small-box bg-red">
<div class="inner">
<h3>{{$countPesan}}</h3><br><br>
<p>Data Pemesanan </p>
</div>
<div class="icon">
<i class="fa fa-mail-reply"></i>
</div>
<a href="/listPemesanan" class="small-box-footer">Lihat <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
......
......@@ -25,9 +25,9 @@
<tr>
<th>Nama Lengkap</th>
<th>Username</th>
<th>Email(s)</th>
<th >Engine version</th>
<th></th>
<th>Email</th>
<th>Lihat Data</th>
<th>Perbaharui Data</th>
</tr>
</thead>
<tbody>
......@@ -38,12 +38,12 @@
<td>{{$a->email}}</td>
<td>
<form action="{{url('rincianpemilik/'.$a->id)}}">
<input type="submit" value="Rincian" class="btn btn-warning">
<input type="submit" value="Lihat" class="btn btn-info">
</form>
</td>
<td>
<form action="{{url('ownerr/'.$a->id)}}">
<input type="submit" value="Perbaharui" class="btn btn-success">
<input type="submit" value="Perbaharui" class="btn btn-warning">
</form>
</td>
<!-- <td> <a href="{{url('ownerprofil/'.$a->id)}}" class="btn btn-primary"><i class="glyphicon glyphicon-edit"></i> </a></td> -->
......@@ -59,7 +59,7 @@
$(function () {
$("#example1").DataTable();
$('#example2').DataTable({
"paging": true,
"paging": false,
"lengthChange": false,
"searching": false,
"ordering": true,
......
......@@ -7,7 +7,7 @@
@section('main-content')
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title"> UPDATE PROFIL</h3>
<h3 class="box-title"> UPDATE DATA OWNER</h3>
@if (count($errors) > 0)
<div class="alert alert-danger">
<strong>Whoops!</strong> {{ trans('adminlte_lang::message.someproblems') }}<br><br>
......@@ -45,7 +45,7 @@
<div class="input-group-addon">
<i class="fa fa-bookmark"></i>
</div>
<input type="text" class="form-control" placeholder="username" name="username" value="{{$data->username}}">
<input type="text" class="form-control" placeholder="username" name="username" value="{{$dataUS->username}}">
</div>
</div>
......
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