Commit 9f287095 by Palti Sinaga

H-1

parent 931f9df9
......@@ -26,7 +26,11 @@ class AdminController extends Controller
public function index()
{
return view('adminlte::home');
$count = User::all()->where('role',"Owner")->count();
$data = User::all()->where('role',"Owner");
//dd($data);
return view('adminlte::layouts.admin.listOwner')->with('data',$data)->with('count',$count);
}
//Mengakses Daftar Pemesanan
......@@ -35,7 +39,7 @@ class AdminController extends Controller
$data = DB::table('homestay')
->join('daftar_book','homestay.id','=','daftar_book.homestay')
->select('daftar_book.*','homestay.nama_homestay','homestay.owner')
->get();
->paginate(10);
return view('adminlte::layouts.admin.dataPemesanan')->with('data',$data);
}
......@@ -157,7 +161,7 @@ class AdminController extends Controller
->join('requestfasilitas','pemilikhomestay.id','=','requestfasilitas.id_pemilik_homestay')
->select('pemilikhomestay.nama','requestfasilitas.*')
->orderBy('requestfasilitas.id','desc')
->get();
->paginate(4);
$count = $data->count();
......
......@@ -50,7 +50,7 @@ class LoginController extends Controller
]);
if ($validator->fails()) {
return redirect('/login');
return redirect('/login')->withErrors($validator->errors());
} else {
if (Auth::attempt(['username' => $request->username, 'password' => $request->password])) {
//dd(Auth::user()->role);
......
......@@ -19,6 +19,7 @@ use Illuminate\Contracts\Auth\Guard;
use DateTime;
use PhpParser\Node\Stmt\Const_;
use Psy\Command\ListCommand\ConstantEnumerator;
use Validator;
class GuestController extends Controller
......@@ -36,6 +37,22 @@ class GuestController extends Controller
//Menyimpan data Pelanggan disaat melakukan Pendaftaran
public function registerStore(Request $data){
$validator = Validator::make($data->all(), [
'name' => 'required',
'username' => 'required',
'email' => 'required|email',
'password' => 'required',
], [
'name.required' => 'Silahkan Masukkan Nama Lengkap!',
'username.required' => 'Silahkan Masukkan Username!',
'email.required' => 'Silahkan Masukkan Email!',
'password.required' => 'Silahkan Masukkan Password!'
]);
if ($validator->fails()) {
return redirect('/daftar')->withErrors($validator->errors());
}else{
$user = new User();
$user->name = $data['name'];
$user->username = $data['username'];
......@@ -61,6 +78,7 @@ class GuestController extends Controller
return redirect('login');
}
}
public function register(){
return view('adminlte::auth.register');
......
......@@ -147,7 +147,7 @@ class OwnerController extends Controller
->join('pelanggan','feedback.id_pelanggan','pelanggan.id')
->select('feedback.*','pelanggan.nama')
->where('feedback.id_pemilik_homestay','=',$dataPemilik[0]->id)
->get();
->paginate(5);
return view('adminlte::layouts.owner.listfeedback')->with('data',$dataFeedback);
}
......@@ -366,7 +366,7 @@ class OwnerController extends Controller
->select('transaksi.*','pelanggan.nama','pelanggan.alamat','pelanggan.no_telepon')
->where('homestay.id_pemilik','=',$dataPel[0]->id)
->orderBy('transaksi.id','desc')
->get();
->paginate(5);
return view('adminlte::layouts.owner.listPesanan')->with('data',$data)->with('count',$data->count());
}
......@@ -418,7 +418,7 @@ class OwnerController extends Controller
$data->save();
return redirect('listPengajuanFasilitas');
return redirect('listPengajuanFasilitas')->with('message', 'Permintaan Fasilitas Telah Dikirim');
}
......@@ -495,10 +495,11 @@ class OwnerController extends Controller
->select('pemilikhomestay.nama','requestfasilitas.*')
->where('requestfasilitas.id_pemilik_homestay','=',$idPemilik[0]->id)
->orderBy('requestfasilitas.id','desc')
->get();
->paginate(4);
$count = $data->count();
return view('adminlte::layouts.owner.ListPengajuanFasilitas')->with('data',$data)->with('count',$count);
}
......
......@@ -5,17 +5,20 @@
@endsection
@section('content')
<body class="hold-transition login-page" style="background-image: url(img/Danau2.jpg); background-size: 100% 130%;
background-repeat:repeat;">
<div id="app">
<div class="login-box" style="box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 20px 0px, rgba(0, 0, 0, 0.239216) 0px 5px 5px 0px; background-color: rgba(255, 255, 255, 0); ">
<div class="login-box" style="box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 20px 0px, rgba(0, 0, 0, 0.239216) 0px 5px 5px 0px; ">
<!-- <div class="login-logo">
<a href="{{ url('/home') }}"><b>SIBH</b></a>
</div><!-- /.login-logo -->
@if (count($errors) > 0)
<div class="alert alert-danger">
<strong>Whoops!</strong> {{ trans('adminlte_lang::message.someproblems') }}<br><br>
<strong>Whoops!</strong>Ada beberapa masalah<br><br>
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
......@@ -24,6 +27,7 @@
</div>
@endif
<div class="login-box-body" >
<!-- <p class="login-box-msg"> {{ trans('adminlte_lang::message.siginsession') }} </p> -->
<div class="login-logo">
......
......@@ -14,7 +14,7 @@
@if (count($errors) > 0)
<div class="alert alert-danger">
<strong>Whoops!</strong> {{ trans('adminlte_lang::message.someproblems') }}<br><br>
<strong>Whoops!</strong> Ada beberapa masalah<br><br>
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
......@@ -23,6 +23,14 @@
</div>
@endif
@if(session()->has('message'))
<div class="alert alert-info">
{{session()->get('message')}}
</div>
@endif
<div class="register-box-body">
<div class="login-logo">
<a href="{{ url('/home') }}"><img src="img/bulbulhomestay.jpg" alt=""></a>
......@@ -30,11 +38,11 @@
<form action="{{ url('/daftar') }}" method="post">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<div class="form-group has-feedback">
<input type="text" class="form-control" placeholder="{{ trans('adminlte_lang::message.fullname') }}" name="name" value="{{ old('name') }}"/>
<input type="text" class="form-control" placeholder="Nama Lengkap" name="name" value="{{ old('name') }}"/>
<span class="glyphicon glyphicon-user form-control-feedback"></span>
</div>
<div class="form-group has-feedback">
<input type="text" class="form-control" placeholder="username" name="username" value="{{ old('username') }}"/>
<input type="text" class="form-control" placeholder="Username" name="username" value="{{ old('username') }}"/>
<span class="glyphicon glyphicon-user form-control-feedback"></span>
</div>
<div class="form-group has-feedback">
......
......@@ -3,7 +3,7 @@
{{ trans('adminlte_lang::message.home') }}
@endsection
@section('main-content')
<div class="col-md-8">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title"> Tambah Pemilik Homestay </h3>
......@@ -66,6 +66,6 @@
</div>
</div>
</div>
</div>
@endsection
......@@ -40,6 +40,7 @@
</tr>
@endforeach
</table>
{!! $data->render() !!}
</div>
</div>
......
......@@ -28,7 +28,7 @@
<th>Deskripsi</th>
<th>Jumlah</th>
<th>Gambar</th>
<th colspan="2">Acction</th>
<th colspan="2">Action</th>
</tr>
@foreach($data as $a)
<tr>
......@@ -64,6 +64,7 @@
</tr>
@endforeach
</table>
{!! $data->render() !!}
</div>
</div>
</div>
......
......@@ -42,7 +42,7 @@
<div class="input-group-addon">
<i class="fa fa-bed"></i>
</div>
<input type="text" name="jumlah_kamar" value="" id="kamar" class="form-control">
<input type="Number" name="jumlah_kamar" value="" id="kamar" class="form-control">
</div>
</div>
<div class="form-group">
......
......@@ -47,7 +47,7 @@
<form action="{{url('checkout/'.$a->id)}}" method="post">
{{csrf_field()}}
<input type="hidden" name="_method" value="PUT">
<button type="submit" class="btn btn-info"><i class="glyphicon glyphicon-apple"> Checkout</i></button>
<button type="submit" class="btn btn-info"><i class="fa fa-check"> Checkout</i></button>
</form>
@endif
</td>
......
......@@ -36,7 +36,7 @@
<td>{{$a->deskripsi}}</td>
<td>
@if($a->gambar==null)
<img alt="Gambar Tidak Ada" class="img-circle img-responsive">
Tidak ada gambar
@else
<img alt="User Pic" src="img/{{$a->gambar}}" style="width: 250px;height: 120px" >
@endif
......@@ -49,7 +49,7 @@
</tr>
@endforeach
</table>
{!! $data->render() !!}
</div>
</div>
@endsection
......@@ -52,9 +52,15 @@
<td>{{$a->lama_menginap}} Hari</td>
<td>{{$a->jumlah_kamar}}</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'"/>
@endif
</td>
<td>
@if($a->status==0)
<td>
......@@ -62,7 +68,7 @@
{{csrf_field()}}
<input type="hidden" name="_method" value="PUT">
<input type="hidden" name="konfirmasi" value="1">
<button type="submit" class="btn btn-info"><i class="glyphicon glyphicon-apple"> Terima</i></button>
<button type="submit" class="btn btn-info"><i class="fa fa-check"> Terima</i></button>
</form>
<td>
<form action="{{url('konfirmasiPemesanan/'.$a->id)}}" method="post">
......@@ -76,9 +82,11 @@
@elseif($a->status==2) Ditolak
@endif
</td>
</td>
</tr>
@endforeach
</table>
{!! $data->render() !!}
</div>
</div>
@endsection
......@@ -24,13 +24,19 @@
</ul>
</div>
@endif
@if(session()->has('message'))
<div class="alert alert-info">
{{session()->get('message')}}
</div>
@endif
</div>
<div class="box-body">
<div class="col-md-4 col-sm-6 col-xs-12">
<!-- /.info-box -->
</div>
<br>
<table class="table table-striped">
<tr>
<th>Nama Pelanggan</th>
......@@ -45,6 +51,7 @@
</tr>
@endforeach
</table>
{!! $data->render() !!}
</div>
</div>
@endsection
......@@ -32,7 +32,7 @@
<i class="fa fa-angle-left pull-right"></i>
</span></a>
<ul class="treeview-menu" style="display : none;">
<li><a href="{{url('reqFasilitas')}}"><i class='fa fa-external-link-square'></i> <span>Daftar Permintaan Fasilitas</span></a></li>
<li><a href="{{url('reqFasilitas')}}"><i class='fa fa-external-link-square'></i> <span>Tambah Permintaan Fasilitas</span></a></li>
<li><a href="{{url('listPengajuanFasilitas')}}"><i class='fa fa-list'></i> <span>Daftar Pengajuan Fasilitas</span></a></li>
</ul>
</li>
......
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