Commit 3de5a7ba by Rinto

Konfirmasi

parent 7e0e03d3
......@@ -109,7 +109,12 @@ class AdminController extends Controller
$this->data['title'] = 'Ubah Data Bus';
$this->data['bus'] = Bus::find($id);
return view('admin.bus.ubah',$this->data);
}
public function ubahgambar($id){
$this->data['title'] = 'Ubah Gambar Bus';
$this->data['bus'] = Bus::find($id);
return view('admin.bus.ubahgambar',$this->data);
}
public function edit(Request $request, $id){
......@@ -137,6 +142,31 @@ class AdminController extends Controller
return redirect(url('/admin/bus'))->with('info','Data Bus Berhasil di Ubah');
}
public function editgambar(Request $request, $id){
$input = $request->all();
if($request->file('image')){
$this->validate($request, [
'image' => 'image|mimes:jpeg,png,jpg,gif,svg|max:2048',
]);
$bus = DB::table('bus')->where('id' , $id)->first();
File::delete('image/' . $bus->image);
$image = $request->file('image');
$input['image'] = time().'.'.$image->getClientOriginalExtension();
$destinationPath = public_path('/image');
$img = Image::make($image->getRealPath());
$img->resize(300, 300, function ($constraint) {
$constraint->aspectRatio();
})->save($destinationPath.'/'.$input['image']);
Bus::find($id)->update($input);
}
else{
Bus::find($id)->update($input);
}
return redirect(url('/admin/bus'))->with('info','Gambar Bus Berhasil di Ubah');
}
public function supir(){
$key = Input::get('search');
$this->data['title'] = 'Supir IT Del';
......@@ -266,7 +296,8 @@ class AdminController extends Controller
public function konfirmasi(Request $request, $id){
$input = $request->all();
pemesanan::find($id)->update($input);
return redirect(url('/admin/pemesanan'))->with('info','Pemesanan Bus Berhasil di Konfirmasi');
Pemesanan::find($id)->update($input);
return redirect(url('/admin/pemesanan/'))->with('info','Data Bus Berhasil di Ubah');
}
}
......@@ -2,17 +2,109 @@
namespace App\Http\Controllers;
use App\Models\Batal;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Input;
use File;
use App\Http\Requests;
use App\Models\Menu;
Use App\Models\OrderTemp;
Use App\Models\Order;
use App\Models\Bus;
use App\Models\Users;
use App\Models\Supir;
use App\Models\Pemesanan;
use Validator;
use App\Http\Controllers\Controller;
use App\User;
use Image;
class K_SupirController extends Controller
{
public function pemesanan(){
$key = Input::get('search');
$this->data['title'] = 'Pemesanan Bus IT Del';
if(isset($key)){
$this->data['pemesanan'] = Pemesanan::where('client_username','like','%'.$key.'%')->orderBy('id','desc')->paginate(10);
}else{
$this->data['pemesanan'] = Pemesanan::orderBy('id','desc')->paginate(10);
}
$this->data['pemesanan'] = DB::table('pemesanan')->where('status','=','diproses')->get();
return view('k_supir.pemesanan.index',$this->data);
}
public function detailpemesanan($id){
$this->data['title'] = 'Detail Pemesanan';
$this->data['pemesanan'] = Pemesanan::find($id);
return view('k_supir.pemesanan.detail',$this->data);
}
public function tolak($id){
pemesanan::find($id)->delete();
return redirect(url('/k_supir/pemesanan'))->with('info','Pembatalan pemesanan berhasil dilakukan');
}
public function konfirmasi(Request $request, $id){
$input = $request->all();
Pemesanan::find($id)->update($input);
return redirect(url('/k_supir/pemesanan/'))->with('info','Data Bus Berhasil di Ubah');
}
public function storebus(Request $request){
$this->validate($request, [
'image' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2048',
]);
$input = $request->all();
$image = $request->file('image');
$input['image'] = time().'.'.$image->getClientOriginalExtension();
$destinationPath = public_path('/image');
$img = Image::make($image->getRealPath());
$img->resize(300, 300, function ($constraint) {
$constraint->aspectRatio();
})->save($destinationPath.'/'.$input['image']);
if($plat_bus = DB::table('bus')->where('plat_bus' , $input['plat_bus'])->first()){
return redirect()->back()->with('info','We are so sorry :( .Plat Bus is exists. Please choose another Plat Bus');
}else{
Bus::create($input);
return redirect(url('/k_supir/bus'))->with('info','Data Bus berhasil ditambah');
}
}
public function bus(){
$key = Input::get('search');
$this->data['title'] = 'Bus IT Del';
if(isset($key)){
$this->data['bus'] = Bus::where('nama_bus','like','%'.$key.'%')->orderBy('id','desc')->paginate(10);
}else{
$this->data['bus'] = Bus::orderBy('id','desc')->paginate(10);
}
$this->data['total'] = DB::table('bus')->get();
return view('k_supir.bus.index',$this->data);
}
public function detail($id){
$this->data['title'] = 'Detail Bus';
$this->data['bus'] = Bus::find($id);
return view('k_supir.bus.detail',$this->data);
}
public function pilih(){
$key = Input::get('search');
$this->data['title'] = 'Bus IT Del';
if(isset($key)){
$this->data['bus'] = Bus::where('nama_bus','like','%'.$key.'%')->orderBy('id','desc')->paginate(10);
}else{
$this->data['bus'] = Bus::orderBy('id','desc')->paginate(10);
}
$this->data['total'] = DB::table('bus')->get();
return view('k_supir.pemesanan.pilih',$this->data);
}
public function pilih_bus($id){
$key = Input::get('search');
$this->data['bus'] = Bus::find($id);
$this->data['title'] = 'Pilih Bus IT Del';
return view('k_supir.pemesanan.pilih_bus',$this->data);
}
}
......@@ -34,7 +34,31 @@
</div>
<!-- /.box-header -->
<div class="box-body">
<img style="display: block;margin-left: auto;margin-right: auto;" src="{{ asset('image/' . $bus->image) }}"/>
<div class="col-md-9">
<div class="nav-tabs-custom">
<ul class="nav nav-tabs">
<li class="active"><a href="#gambar1" data-toggle="tab" aria-expanded="true">Gambar1</a></li>
<li class=""><a href="#gambar2" data-toggle="tab" aria-expanded="false">Gambar2</a></li>
<li class=""><a href="#gambar3" data-toggle="tab" aria-expanded="false">Gambar3</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="gambar1">
<img style="display: block;margin-left: auto;margin-right: auto;" src="{{ asset('image/' . $bus->image) }}"/>
</div>
<!-- /.tab-pane -->
<div class="tab-pane" id="gambar2">
<img style="display: block;margin-left: auto;margin-right: auto;" src="{{ asset('image/' . $bus->image) }}"/>
</div>
<!-- /.tab-pane -->
<div class="tab-pane" id="gambar3">
<img style="display: block;margin-left: auto;margin-right: auto;" src="{{ asset('image/' . $bus->image) }}"/>
</div>
<!-- /.tab-pane -->
</div>
<!-- /.tab-content -->
</div>
<!-- /.nav-tabs-custom -->
</div>
</div>
<!-- /.box-footer -->
<div class="box-footer">
......
......@@ -35,7 +35,7 @@
<!-- /.box-header -->
<div class="box-body">
<img style="display: block;margin-left: auto;margin-right: auto;" src="{{ asset('image/' . $bus->image) }}"/>
<a href="{{url('admin/bus/ubah',$bus->id)}}" class="btn btn-danger">Ubah Gambar</a>
<a href="{{url('admin/bus/ubahgambar',$bus->id)}}" class="btn btn-danger">Ubah Gambar</a>
</div>
<!-- /.box-footer -->
<div class="box-footer">
......
@if(Auth::check())
@extends('layouts.layout')
@include('layouts.header')
<body class="skin-blue sidebar-mini" style="height: auto;">
<div class="wrapper" style="height: auto;">
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section id="content-menu" class="content-menu">
<div class="module-menu-container"></div>
<ol class="breadcrumb"><li><a href="/"><i class="fa-home"></i> Home</a></li>
<li class="active"><i class="fa-users"></i>Bus</li>
<li class="active"><i class="fa-users"></i>Ubah Gambar Bus</li>
</ol><!-- breadcrumbs -->
</section>
<!-- Main content -->
<section class="content">
<!-- /.row -->
<div class="row">
<div class="col-md-6">
<!-- Box Comment -->
<div class="box box-widget">
<div class="box-header with-border">
<div class="user-block">
<img style="display: block;margin-left: auto;margin-right: auto;" src="{{ asset('image/' . $bus->image) }}"/>
<span class="username">{{$bus->nama_bus}}</span>
</div>
<!-- /.user-block -->
<div class="box-tools">
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
</div>
<!-- /.box-tools -->
</div>
<!-- /.box-header -->
<div class="box-body">
<img style="display: block;margin-left: auto;margin-right: auto;" src="{{ asset('image/' . $bus->image) }}"/>
</div>
<!-- /.box-footer -->
<div class="box-footer">
<form action="{{url('/admin/ubah',$bus->id)}}" method="post" enctype="multipart/form-data">
{{ csrf_field() }}
<div class="form-group">
<label for="exampleInputImage">Masukkan Gambar</label>
<input type="file" id="exampleInputImage" name="image" required/>
</div>
<div class="form-group">
<input type="submit" value="Ubah Gambar" class="btn btn-danger">
</div>
</form><br>
</div>
<!-- /.box-footer -->
</div>
<!-- /.box -->
</div>
<!-- /.col -->
</div>
</section>
<!-- /.content -->
</div>
</div>
</body>
@endif
\ No newline at end of file
......@@ -40,7 +40,6 @@
<th>Nama Pemesan</th>
<th>Tujuan</th>
<th>Berangkat</th>
<th>Alasan Pembatalan</th>
<th>Status</th>
</tr></thead>
<tbody>
......@@ -49,7 +48,6 @@
<td>{{$bata->client_username}}</td>
<td>{{$bata->tujuan}}</td>
<td>{{$bata->berangkat}}</td>
<td>{{$bata->alasan_batal}}</td>
<td><span class="label label-danger">Dibatalkan</span>
</tr>
</form>
......@@ -59,7 +57,6 @@
<td>{{$pesan->client_username}}</td>
<td>{{$pesan->tujuan}}</td>
<td>{{$pesan->berangkat}}</td>
<td></td>
<td><span class="label label-info">{{$pesan->status}}</span>
</tr>
</form>
......
......@@ -14,7 +14,27 @@
<!-- Main content -->
<section class="content">
<div class="row"></div>
<div class="row">
<div class="col-md-6">
<div class="nav-tabs-custom">
<ul class="nav nav-tabs">
<li class="active"><a href="#gambar1" data-toggle="tab" aria-expanded="true">Gambar1</a></li>
<li class=""><a href="#gambar2" data-toggle="tab" aria-expanded="false">Gambar2</a></li>
<li class=""><a href="#gambar3" data-toggle="tab" aria-expanded="false">Gambar3</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="gambar1"></div>
<!-- /.tab-pane -->
<div class="tab-pane" id="gambar2"></div>
<!-- /.tab-pane -->
<div class="tab-pane" id="gambar3"></div>
<!-- /.tab-pane -->
</div>
<!-- /.tab-content -->
</div>
<!-- /.nav-tabs-custom -->
</div>
</div>
<!-- /.row -->
<div class="row"></div>
</section>
......
......@@ -65,12 +65,11 @@
</div>
<div class="form-group">
<label class="col-md-4 control-label">Status</label>
<input type="text" value="diproses" class="form-control" name="status" readonly>
<input type="hidden" class="form-control" name="status" value="diproses" readonly>
</div>
<div class="form-group has-feedback">
<a href="{{url('admin/pemesanan/konfirmasi',$pemesanan->id)}}" class="btn btn-danger">Konfirmasi</a>
<input type="submit" value="Konfirmasi" class="btn btn-danger">
<a href="{{url('admin/pemesanan/tolak',$pemesanan->id)}}" class="btn btn-danger">Tolak</a>
</div>
</form><br>
......
......@@ -4,7 +4,7 @@
<div class="login-box">
<div class="login-logo">
<a href="../../index2.html"><b>BoDIS</b>IS</a>
<a href="../../index2.html"><b>Booking Driver</b>IS</a>
</div>
<!-- /.login-logo -->
<div class="login-box-body">
......
@if(Auth::check())
@extends('layouts.layout')
@include('layouts.header')
<body class="skin-blue sidebar-mini" style="height: auto;">
<div class="wrapper" style="height: auto;">
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section id="content-menu" class="content-menu">
<div class="module-menu-container"></div>
<ol class="breadcrumb"><li><a href="/"><i class="fa-home"></i> Home</a></li>
<li class="active"><i class="fa-users"></i>Bus</li>
<li class="active"><i class="fa-users"></i>Detail Bus</li>
</ol><!-- breadcrumbs -->
</section>
<!-- Main content -->
<section class="content">
<!-- /.row -->
<div class="row">
<div class="col-md-6">
<!-- Box Comment -->
<div class="box box-widget">
<div class="box-header with-border">
<div class="user-block">
<img style="display: block;margin-left: auto;margin-right: auto;" src="{{ asset('image/' . $bus->image) }}"/>
<span class="username">{{$bus->nama_bus}}</span>
</div>
<!-- /.user-block -->
<div class="box-tools">
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
</div>
<!-- /.box-tools -->
</div>
<!-- /.box-header -->
<div class="box-body">
<img style="display: block;margin-left: auto;margin-right: auto;" src="{{ asset('image/' . $bus->image) }}"/>
</div>
<!-- /.box-footer -->
<div class="box-footer">
<form action="" method="post">
{{ csrf_field() }}
<div class="form-group has-feedback">
<label class="col-md-4 control-label">Nama Bus</label>
<input type="text" class="form-control" name="nama_bus" value="{{$bus->nama_bus}}" readonly>
</div>
<div class="form-group has-feedback">
<label class="col-md-4 control-label">Jenis Bus</label>
<input type="text" class="form-control" name="jenis_bus" value="{{$bus->jenis_bus}}" readonly>
</div>
<div class="form-group has-feedback">
<label class="col-md-4 control-label">Plat Bus</label>
<input type="text" class="form-control" name="plat_bus" value="{{$bus->plat_bus}}" readonly>
</div>
<div class="form-group has-feedback">
<label class="col-md-4 control-label">Deskripsi</label>
<textarea class="form-control" placeholder="Berikan deskripsi disini" rows="3" name="deskripsi" readonly>{{$bus->deskripsi}}</textarea>
</div>
</form><br>
</div>
<!-- /.box-footer -->
</div>
<!-- /.box -->
</div>
<!-- /.col -->
</div>
</section>
<!-- /.content -->
</div>
</div>
</body>
@endif
\ No newline at end of file
@if(Auth::check())
@extends('layouts.layout')
@include('layouts.header')
<body class="skin-blue sidebar-mini" style="height: auto;">
<div class="wrapper" style="height: auto;">
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section id="content-menu" class="content-menu">
<div class="module-menu-container"></div>
<ol class="breadcrumb"><li><a href="/"><i class="fa-home"></i> Home</a></li>
<li class="active"><i class="fa-bus"></i>Bus</li>
</ol><!-- breadcrumbs -->
</section>
<!-- Main content -->
<section class="content">
<!-- /.row -->
<div class="row">
<div class="col-xs-12">
<div class="box">
<div class="box-header">
<h3 class="box-title">List Bus</h3>
<div class="box-tools">
<form action="{{url('/admin/bus')}}">
<div class="input-group input-group-sm" style="width: 150px;">
<input type="text" name="search" class="form-control pull-right"
placeholder="Nama Bus" id="search" type="text">
<div class="input-group-btn">
<button type="submit" class="btn btn-default"><i class="fa fa-search"></i></button>
</div>
</div>
</form>
</div>
</div>
<!-- /.box-header -->
<div class="box-body table-responsive no-padding">
<table class="table table-hover">
<thead><tr>
<th>Nama Bus</th>
<th>Jenis Bus</th>
<th>Plat Bus</th>
<th>Aksi</th>
</tr></thead>
<tbody>
@foreach($bus as $bu)
<tr>
<td>{{$bu->nama_bus}}</td>
<td>{{$bu->jenis_bus}}</td>
<td>{{$bu->plat_bus}}</td>
<td colspan="3">
<a href="{{url('k_supir/bus/detail',$bu->id)}}" class="btn btn-danger">Detail</a>
</td>
</tr>
</form>
@endforeach
</tbody>
</table>
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
</div>
</div>
</section>
<!-- /.content -->
</div>
</div>
</body>
@endif
\ No newline at end of file
@if(Auth::check())
@extends('layouts.layout')
@include('layouts.header')
<body class="skin-blue sidebar-mini" style="height: auto;">
<div class="wrapper" style="height: auto;">
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section id="content-menu" class="content-menu">
<div class="module-menu-container"></div>
<ol class="breadcrumb"><li><a href="/"><i class="fa-home"></i> Home</a></li>
<li class="active"><i class="fa-users"></i>Pemesanan Kendaraan</li>
<li class="active"><i class="fa-users"></i>Detail Pesanan</li>
</ol><!-- breadcrumbs -->
</section>
<!-- Main content -->
<section class="content">
<!-- /.row -->
<div class="row">
<div class="col-md-6">
<!-- Box Comment -->
<div class="box box-widget">
<div class="box-header with-border">
<div class="user-block">
<span class="username">{{$pemesanan->client_username}}</span>
</div>
<!-- /.user-block -->
<div class="box-tools">
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
</div>
<!-- /.box-tools -->
</div>
<!-- /.box-footer -->
<div class="box-footer">
<form action="{{url('/k_supir/pemesanan/konfirmasi',$pemesanan->id)}}" method="post" enctype="multipart/form-data">
{{ csrf_field() }}
<div class="form-group has-feedback">
<label class="col-md-4 control-label">Nama Pemesan</label>
<input type="text" class="form-control" name="client_username" value="{{$pemesanan->client_username}}" readonly>
</div>
<div class="form-group has-feedback">
<label class="col-md-4 control-label">Tujuan</label>
<input type="text" class="form-control" name="tujuan" value="{{$pemesanan->tujuan}}" readonly>
</div>
<div class="form-group has-feedback">
<label class="col-md-4 control-label">Jumlah</label>
<input type="text" class="form-control" name="jumlah" value="{{$pemesanan->jumlah}}" readonly>
</div>
<div class="form-group has-feedback">
<label class="col-md-4 control-label">Alasan</label>
<textarea class="form-control" placeholder="Berikan deskripsi disini" rows="3" name="alasan" readonly>{{$pemesanan->alasan}}</textarea>
</div>
<div class="form-group has-feedback">
<label class="col-md-4 control-label">Berangkat</label>
<input type="text" class="form-control" name="berangkat" value="{{$pemesanan->berangkat}}" readonly>
</div>
<div class="form-group has-feedback">
<label class="col-md-4 control-label">Kembali</label>
<input type="text" class="form-control" name="kembali" value="{{$pemesanan->kembali}}" readonly>
</div>
<div class="form-group has-feedback">
<div class="input-group input-group-sm">
<input type="text" value="{{$pemesanan->plat_bus}}" class="form-control" name="plat_bus" readonly>
<span class="input-group-btn">
<a href="{{url('k_supir/pemesanan/pilih')}}" type="button" class="btn btn-info btn-flat">Pilih Bus</a>
</span>
</div>
<div class="form-group">
<input type="hidden" class="form-control" name="status" value="disetujui" readonly>
</div>
<div class="form-group has-feedback">
<input type="submit" value="Konfirmasi" class="btn btn-danger">
<a href="{{url('k_supir/pemesanan/tolak',$pemesanan->id)}}" class="btn btn-danger">Tolak</a>
</div>
</div>
</form><br>
</div>
<!-- /.box-footer -->
</div>
<!-- /.box -->
</div>
<!-- /.col -->
</div>
</section>
<!-- /.content -->
</div>
</div>
</body>
@endif
\ No newline at end of file
@if(Auth::check())
@extends('layouts.layout')
@include('layouts.header')
<body class="skin-blue sidebar-mini" style="height: auto;">
<div class="wrapper" style="height: auto;">
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section id="content-menu" class="content-menu">
<div class="module-menu-container"></div>
<ol class="breadcrumb"><li><a href="/"><i class="fa-home"></i> Home</a></li>
<li class="active"><i class="fa-bus"></i>Pemesanan Kendaraan</li>
</ol><!-- breadcrumbs -->
</section>
<!-- Main content -->
<section class="content">
<!-- /.row -->
<div class="row">
<div class="col-xs-12">
<div class="box">
<div class="box-header">
<h3 class="box-title">List Pemesanan</h3>
<div class="box-tools">
<form action="{{url('/k_supir/pemesanan')}}">
<div class="input-group input-group-sm" style="width: 150px;">
<input type="text" name="search" class="form-control pull-right"
placeholder="Username" id="search" type="text">
<div class="input-group-btn">
<button type="submit" class="btn btn-default"><i class="fa fa-search"></i></button>
</div>
</div>
</form>
</div>
</div>
<!-- /.box-header -->
<div class="box-body table-responsive no-padding">
<table class="table table-hover">
<thead><tr>
<th>Nama Pemesan</th>
<th>Tujuan</th>
<th>Berangkat</th>
<th>Status</th>
<th>Aksi</th>
</tr></thead>
<tbody>
@foreach($pemesanan as $pesan)
<tr>
<td>{{$pesan->client_username}}</td>
<td>{{$pesan->tujuan}}</td>
<td>{{$pesan->berangkat}}</td>
<td><span class="label label-info">{{$pesan->status}}</span></td>
<td colspan="3">
<a href="{{url('k_supir/pemesanan/detail',$pesan->id)}}" class="btn btn-danger">Detail</a>
</td>
</tr>
</form>
@endforeach
</tbody>
</table>
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
</div>
</div>
</section>
<!-- /.content -->
</div>
</div>
</body>
@endif
\ No newline at end of file
@if(Auth::check())
@extends('layouts.layout')
@include('layouts.header')
<body class="skin-blue sidebar-mini" style="height: auto;">
<div class="wrapper" style="height: auto;">
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section id="content-menu" class="content-menu">
<div class="module-menu-container"></div>
<ol class="breadcrumb"><li><a href="/"><i class="fa-home"></i> Home</a></li>
<li class="active"><i class="fa-bus"></i>Pemesanan Bus</li>
<li class="active"><i class="fa-bus"></i>Pilih Bus</li>
</ol><!-- breadcrumbs -->
</section>
<!-- Main content -->
<section class="content">
<!-- /.row -->
<div class="row">
<div class="col-xs-12">
<div class="box">
<div class="box-header">
<h3 class="box-title">List Bus</h3>
<div class="box-tools">
<form action="{{url('/k_supir/pemesanan/pilih')}}">
<div class="input-group input-group-sm" style="width: 150px;">
<input type="text" name="search" class="form-control pull-right"
placeholder="Nama Bus" id="search" type="text">
<div class="input-group-btn">
<button type="submit" class="btn btn-default"><i class="fa fa-search"></i></button>
</div>
</div>
</form>
</div>
</div>
<!-- /.box-header -->
<div class="box-body table-responsive no-padding">
<table class="table table-hover">
<thead><tr>
<th>Nama Bus</th>
<th>Jenis Bus</th>
<th>Plat Bus</th>
<th>Aksi</th>
</tr></thead>
<tbody>
@foreach($bus as $bu)
<tr>
<td>{{$bu->nama_bus}}</td>
<td>{{$bu->jenis_bus}}</td>
<td>{{$bu->plat_bus}}</td>
<td colspan="1">
<a href="{{url('k_supir/bus/detail',$bu->id)}}" class="btn btn-danger">Detail</a>
<a href="{{url('k_supir/pemesanan/pilih_bus',$bu->id)}}" class="btn btn-danger">Pilih</a>
</td>
</tr>
</form>
@endforeach
</tbody>
</table>
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
</div>
</div>
</section>
<!-- /.content -->
</div>
</div>
</body>
@endif
\ No newline at end of file
@if(Auth::check())
@extends('layouts.layout')
@include('layouts.header')
<body class="skin-blue sidebar-mini" style="height: auto;">
<div class="wrapper" style="height: auto;">
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section id="content-menu" class="content-menu">
<div class="module-menu-container"></div>
<ol class="breadcrumb"><li><a href="/"><i class="fa-home"></i> Home</a></li>
<li class="active"><i class="fa-users"></i>Pemesanan Kendaraan</li>
<li class="active"><i class="fa-users"></i>Detail Pesanan</li>
</ol><!-- breadcrumbs -->
</section>
<!-- Main content -->
<section class="content">
<div class="box box-default">
<form action="{{url('/k_supir/pemesanan')}}" method="post" enctype="multipart/form-data">
{{ csrf_field() }}
<!-- /.box-header -->
<div class="box-body">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label>Nama Pemesan</label>
<input type="text" value="{{ Auth::user()->username }}" class="form-control" name="client_username" readonly>
</div>
<div class="form-group">
<label>Tempat Tujuan Keberangkatan</label>
<input type="text" class="form-control" name="tujuan" required>
</div>
<!-- /.form-group -->
<div class="form-group">
<label>Jumlah Anggota</label>
<input type="text" class="form-control" name="jumlah" required>
</div>
<!-- /.form-group -->
<div class="form-group">
<label>Keperluan Pemesanan</label>
<textarea class="form-control" rows="3"name="alasan" placeholder="Alasan..." style="width: 499px; height: 104px;" required></textarea>
</div>
<!-- /.form-group -->
</div>
<!-- /.col -->
<div class="col-md-6">
<div class="form-group">
<label>Rencana Keberangkatan:</label>
<div class="input-group">
<div class="input-group-addon">
<i class="fa fa-calendar"></i>
</div>
<input class="form-control" placeholder="yyyy-mm-dd" data-inputmask="'alias': 'yyyy-mm-dd'" data-mask="" type="date" name="berangkat" required>
</div>
<!-- /.input group -->
</div>
<!-- /.form-group -->
<div class="form-group">
<label>Rencana Kembali:</label>
<div class="input-group">
<div class="input-group-addon">
<i class="fa fa-calendar"></i>
</div>
<input class="form-control" placeholder="yyyy-mm-dd" data-inputmask="'alias': 'yyyy-mm-dd'" data-mask="" type="date" name="kembali" required>
</div>
<!-- /.input group -->
</div>
<!-- /.form-group -->
<div class="input-group input-group-sm">
<input type="text" value="{{$bus->plat_bus}}" class="form-control" name="plat_bus" readonly>
<span class="input-group-btn">
<a href="{{url('klien/pesan/pilih')}}" type="button" class="btn btn-info btn-flat">Pilih Bus</a>
</span>
</div>
<div class="form-group">
<input type="hidden" value="request" class="form-control" name="status" readonly>
</div>
<div class="form-group">
</div>
<!-- /.form-group -->
<!-- /.form-group -->
<div class="form-group">
<input type="submit" value="Konfirmasi" class="btn btn-danger">
</div>
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</div>
<!-- /.box-body -->
</form>
</div>
</section>
<!-- /.content -->
</div>
</div>
</body>
@endif
\ No newline at end of file
......@@ -47,7 +47,8 @@
<td>{{$stat->client_username}}</td>
<td>{{$stat->tujuan}}</td>
<td>{{$stat->berangkat}}</td>
<td><span class="label label-info">Request</span>
<td><span class="label label-info">{{$stat->status}}</span></td>
</tr>
@endforeach
</tbody>
</table>
......
......@@ -84,6 +84,10 @@
</div>
<div class="form-group">
<input type="hidden" value="request" class="form-control" name="status" readonly>
</div>
<div class="form-group">
</div>
<!-- /.form-group -->
......
......@@ -84,8 +84,7 @@
</div>
<div class="form-group">
<label>Status</label>
<input type="text" value="request" class="form-control" name="status" readonly>
<input type="hidden" value="request" class="form-control" name="status" readonly>
</div>
<div class="form-group">
......
......@@ -40,7 +40,7 @@
<td>{{$stat->tujuan}}</td>
<td>{{$stat->berangkat}}</td>
<td>{{$stat->plat_bus}}</td>
<td><span class="label label-info">Request</span>
<td><span class="label label-info">{{$stat->status}}</span>
<a href="{{url('klien/status/batal',$stat->id)}}" class="label label-danger">Batalkan</a></td>
</tr>
</form>
......
......@@ -97,11 +97,26 @@
<i class="fa fa-dashboard"></i> <span>Dashboard</span>
</a>
</li>
<li class="{{Request::segment(2) == 'user' ? 'active' : ''}}">
<a href="{{url('admin/user')}}">
<i class="fa fa-edit"></i> <span>User</span>
<li class="{{Request::segment(2) == 'pemesanan' ? 'active' : ''}}">
<a href="{{url('k_supir/pemesanan')}}">
<i class="fa fa-group"></i>
<span>Pemesanan</span>
<small class="label pull-right bg-yellow">
</small>
</a>
</li>
<li class="{{Request::segment(2) == 'bus' ? 'active' : ''}}">
<a href="{{url('k_supir/bus')}}">
<i class="fa-truck"></i> <span>Bus</span>
</a>
</li>
<li class="{{Request::segment(2) == 'bus' ? 'active' : ''}}">
<a href="{{url('k_supir/bus')}}">
<i class="fa-truck"></i> <span>Jadwal Bus</span>
</a>
</li>
</ul>
@elseif(Auth::user()->role == 'klien')
......
......@@ -43,8 +43,10 @@ Route::group(['prefix' => 'admin','middleware' => 'admin'], function() {
Route::get('/bus','AdminController@bus');
Route::get('/bus/detail/{id}','AdminController@detail');
Route::get('/bus/ubah/{id}','AdminController@ubah');
Route::get('/bus/ubahgambar/{id}','AdminController@ubahgambar');
Route::get('/bus/hapus/{id}','AdminController@hapusbus');
Route::post('/ubah/{id}','AdminController@edit');
Route::post('/ubahgambar/{id}','AdminController@editgambar');
Route::get('/bus/tambah','AdminController@tambahbus');
Route::post('/storebus','AdminController@storebus');
......@@ -62,7 +64,7 @@ Route::group(['prefix' => 'admin','middleware' => 'admin'], function() {
Route::get('/pemesanan','AdminController@pemesanan');
Route::get('/pemesanan/detail/{id}','AdminController@detailpemesanan');
Route::get('/pemesanan/tolak/{id}','AdminController@tolak');
Route::get('/pemesanan/konfirmasi/{id}','AdminController@konfirmasi');
Route::post('/pemesanan/konfirmasi/{id}','AdminController@konfirmasi');
});
......@@ -71,6 +73,16 @@ Route::group(['prefix' => 'k_supir','middleware' => 'k_supir'], function() {
$this->data['title'] = 'Dashboard';
return view('k_supir.index',$this->data);
});
Route::post('/storebus','K_SupirController@storebus');
Route::get('/bus','K_SupirController@bus');
Route::get('/bus/detail/{id}','K_SupirController@detail');
Route::get('/pemesanan','K_SupirController@pemesanan');
Route::get('/pemesanan/detail/{id}','K_SupirController@detailpemesanan');
Route::get('/pemesanan/tolak/{id}','K_SupirController@tolak');
Route::post('/pemesanan/konfirmasi/{id}','K_SupirController@konfirmasi');
Route::get('/pemesanan/pilih','K_SupirController@pilih');
Route::get('/pemesanan/pilih_bus/{id}','K_SupirController@pilih_bus');
});
Route::group(['prefix' => 'klien','middleware' => 'klien'], function() {
......
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