Commit 8362e985 by Rinto

Pemesanan

parent 1a8ffe37
......@@ -21,23 +21,12 @@ use Image;
class AdminController extends Controller
{
public function store(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($username = DB::table('users')->where('username' , $input['username'])->first()){
return redirect()->back()->with('info','We are so sorry :( .Username is exists. Please choose another username');
}else{
User::create(['username' => $input['username'],'password' => bcrypt($input['password']),'role' => $input['role'],'image' => $input['image']])->id;
User::create(['username' => $input['username'],'password' => bcrypt($input['password']),'role' => $input['role']])->id;
return redirect(url('/admin/user'))->with('info','Data User Berhasil ditambah');
}
}
......@@ -253,4 +242,9 @@ class AdminController extends Controller
$this->data['pemesanan'] = Pemesanan::find($id);
return view('admin.pemesanan.detail',$this->data);
}
public function tolak($id){
pemesanan::find($id)->delete();
return redirect(url('/admin/pemesanan'))->with('info','Pembatalan pemesanan berhasil dilakukan');
}
}
......@@ -2,86 +2,33 @@
namespace App\Http\Controllers\Auth;
use App\User;
use Validator;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\RegistersUsers;
use App\Models\Customer;
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\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 RegisterController extends Controller
{
/*
|--------------------------------------------------------------------------
| Register Controller
|--------------------------------------------------------------------------
|
| This controller handles the registration of new users as well as their
| validation and creation. By default this controller uses a trait to
| provide this functionality without requiring any additional code.
|
*/
use RegistersUsers;
/**
* Where to redirect users after login / registration.
*
* @var string
*/
protected $redirectTo = '/register';
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest');
}
public function store(Request $request){
public function store(Request $request){
$input = $request->all();
if($username = DB::table('customer_data')->where('username' , $input['username'])->first()){
if($username = DB::table('users')->where('username' , $input['username'])->first()){
return redirect()->back()->with('info','We are so sorry :( .Username is exists. Please choose another username');
}else{
User::create(['username' => $input['username'],'password' => bcrypt($input['password']),'role' => 'customer'])->id;
$customer = $request->except(['password','role']);
Customer::create($customer);
return redirect()->back()->with('info','Registrasi berhasil dilakukan. Silahkan login');
User::create(['username' => $input['username'],'password' => bcrypt($input['password']),'role' => $input['role']])->id;
return redirect(url('/index'))->with('info','Data User Berhasil ditambah');
}
}
/**
* Get a validator for an incoming registration request.
*
* @param array $data
* @return \Illuminate\Contracts\Validation\Validator
*/
protected function validator(array $data)
{
return Validator::make($data, [
'name' => 'required|max:255',
'email' => 'required|email|max:255|unique:users',
'password' => 'required|min:6|confirmed',
]);
}
/**
* Create a new user instance after a valid registration.
*
* @param array $data
* @return User
*/
protected function create(array $data)
{
return User::create([
'name' => $data['name'],
'email' => $data['email'],
'password' => bcrypt($data['password']),
]);
}
}
......@@ -9,6 +9,7 @@ use Illuminate\Support\Facades\Input;
use File;
use App\Models\Pemesanan;
use App\Models\Bus;
use App\Models\Batal;
use App\Models\Users;
use Image;
Use App\Models\OrderTemp;
......@@ -65,8 +66,8 @@ class KlienController extends Controller
$this->data['title'] = 'History Pemesanan';
$this->data['users'] = Users::find($id);
$this->data['history'] = DB::table('pemesanan')->where('client_username' , $username)->orderBy('id','desc')->paginate(10);
$this->data['total'] = DB::table('pemesanan')->where('client_username' , $username)->get();
$this->data['history'] = DB::table('batal')->where('client_username' , $username)->orderBy('id','desc')->paginate(10);
$this->data['total'] = DB::table('batal')->where('client_username' , $username)->get();
return view('klien.history.index',$this->data);
}
......@@ -82,15 +83,22 @@ class KlienController extends Controller
return view('klien.status.index',$this->data);
}
public function batal($id){
pemesanan::find($id)->delete();
return redirect(url('/klien/pesan'))->with('info','Pembatalan pemesanan berhasil dilakukan');
}
public function pilih_bus($id){
$key = Input::get('search');
$this->data['bus'] = Bus::find($id);
$this->data['title'] = 'Pilih Bus IT Del';
return view('klien.pesan.pilih_bus',$this->data);
}
public function batal($id){
$this->data['title'] = 'Detail Pemesanan';
$this->data['pemesanan'] = Pemesanan::find($id);
return view('klien.status.batal',$this->data);
}
public function kirim_pembatalan(Request $request){
$input = $request->all();
Batal::create($input);
return redirect(url('/klien'))->with('info','Pembatalan Berhasil dilakukan');
}
}
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Batal extends Model
{
protected $table = 'batal';
protected $fillable = ['id','tujuan','jumlah','alasan','berangkat','kembali','client_username','plat_bus','alasan_batal'];
//
}
\ No newline at end of file
......@@ -7,6 +7,6 @@ use Illuminate\Database\Eloquent\Model;
class Users extends Model
{
protected $table = 'users';
protected $fillable = ['username','password','role','image'];
protected $fillable = ['username','password','role'];
//
}
\ 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>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>
<div class="form-group has-feedback">
<a href="{{url('admin/bus/ubah',$bus->id)}}" class="btn btn-danger">Ubah Data Bus</a>
</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('admin/bus/detail',$bu->id)}}" class="btn btn-danger">Detail</a>
<a href="{{url('admin/bus/hapus',$bu->id)}}" class="btn btn-danger">Hapus</a>
</td>
</tr>
</form>
@endforeach
</tbody>
</table>
</div>
<div class="box-footer">
<a href="{{url('admin/bus/tambah')}}" class="btn btn-danger">Tambah Data Bus</a>
</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>Bus</li>
<li class="active"><i class="fa-bus"></i>Add Bus</li>
</ol><!-- breadcrumbs -->
</section>
<!-- Main content -->
<section class="content">
<div class="login-box">
<!-- /.login-logo -->
<div class="login-box-body">
<p class="login-box-msg">Add new Data Bus</p>
<form action="{{url('/admin/storebus')}}" method="post" enctype="multipart/form-data">
{{ csrf_field() }}
<div class="row">
<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" required>
<span class="fa-bus glyphicon-envelope form-control-feedback"></span>
</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" required>
<span class="fa-bus glyphicon-envelope form-control-feedback"></span>
</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" required>
<span class="fa-bus glyphicon-envelope form-control-feedback"></span>
</div>
<div class="form-group">
<label>Deskripsi</label>
<textarea class="form-control" placeholder="Berikan deskripsi disini" rows="3" name="deskripsi" required></textarea>
</div>
<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="Tambah Bus" class="btn btn-danger">
</div>
</div>
</form>
</div>
</div>
</section>
</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>Bus</li>
<li class="active"><i class="fa-users"></i>Ubah Data 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) }}"/>
<a href="{{url('admin/bus/ubah',$bus->id)}}" class="btn btn-danger">Ubah Gambar</a>
</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 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}}" required>
</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}}" required>
</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}}" required>
</div>
<div class="form-group">
<label>Deskripsi</label>
<textarea class="form-control" placeholder="Berikan deskripsi disini" rows="3" name="deskripsi" required>{{$bus->deskripsi}}</textarea>
</div>
<div class="form-group">
<input type="submit" value="Ubah Bus" 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
@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</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="" method="post">
{{ 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">
<label class="col-md-4 control-label">Plat Bus</label>
<input type="text" class="form-control" name="plat_bus" value="{{$pemesanan->plat_bus}}" readonly>
</div>
<div class="form-group has-feedback">
<a href="{{url('admin/pemesanan/konfirmasi',$pemesanan->id)}}" class="btn btn-danger">Konfirmasi</a>
<a href="{{url('admin/pemesanan/tolak',$pemesanan->id)}}" class="btn btn-danger">Tolak</a>
</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 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 Pemesanan</h3>
<div class="box-tools">
<form action="{{url('/admin/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">Request</span></td>
<td colspan="3">
<a href="{{url('admin/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-users"></i>Supir</li>
<li class="active"><i class="fa-users"></i>Detail Supir</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/' . $supir->image) }}"/>
<span class="username">{{$supir->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/' . $supir->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">ID Supir</label>
<input type="text" class="form-control" name="id" value="{{$supir->id}}" readonly>
</div>
<div class="form-group has-feedback">
<label class="col-md-4 control-label">Nama Supir</label>
<input type="text" class="form-control" name="nama_supir" value="{{$supir->nama_supir}}" readonly>
</div>
<div class="form-group has-feedback">
<label class="col-md-4 control-label">Tempat/Tgl Lahir</label>
<input type="text" class="form-control" name="ttl" value="{{$supir->ttl}}" readonly>
</div>
<div class="form-group has-feedback">
<label class="col-md-4 control-label">Alamat</label>
<input type="text" class="form-control" name="alamat" value="{{$supir->alamat}}" readonly>
</div>
<div class="form-group has-feedback">
<label class="col-md-4 control-label">Jenis Kelamin</label>
<input type="text" class="form-control" name="jk" value="{{$supir->jk}}" readonly>
</div>
<div class="form-group has-feedback">
<label class="col-md-4 control-label">Agama</label>
<input type="text" class="form-control" name="agama" value="{{$supir->agama}}" readonly>
</div>
<div class="form-group has-feedback">
<a href="{{url('admin/supir/ubahsupir',$supir->id)}}" class="btn btn-danger">Ubah Data Supir</a>
</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-users"></i>Supir</li>
</ol><!-- breadcrumbs -->
</section>
<!-- Main content -->
<section class="content">
<!-- /.row -->
<div class="row">
<div class="col-xs-12">
<div class="box box-primary">
<div class="box-header">
<h3 class="box-title">Supir</h3>
<div class="box-tools">
<form action="{{url('/admin/supir')}}">
<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 class="form-group">
<?php $jumlah=0 ?>
@foreach($total as $tot)
<?php $jumlah++ ?>
@endforeach
<h4>Total Supir = {{$jumlah}}</h4>
</div>
</div>
<!-- /.box-header -->
<div class="box-body table-responsive no-padding">
<table class="table table-hover">
<thead><tr>
<th>Nama Supir</th>
<th>ID Supir</th>
<th>Aksi</th>
</tr></thead>
<tbody>
@foreach($supir as $supi)
<tr>
<td>{{$supi->nama_supir}}</td>
<td>{{$supi->id}}</td>
<td colspan="2">
<a href="{{url('admin/supir/detail',$supi->id)}}" class="btn btn-danger">Detail</a>
<a href="{{url('admin/supir/hapus',$supi->id)}}" class="btn btn-danger">Hapus</a>
</td>
</tr>
</form>
@endforeach
</tbody>
</table>
{{$supir->links()}}
</div>
<!-- /.box-body -->
<div class="box-footer">
<a href="{{url('admin/supir/tambah')}}" class="btn btn-danger">Tambah Supir</a>
<i fa-user-plus></i>
</div>
</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>Supir</li>
<li class="active"><i class="fa-bus"></i>Tambah Supir</li>
</ol><!-- breadcrumbs -->
</section>
<!-- Main content -->
<section class="content">
<div class="login-box">
<!-- /.login-logo -->
<div class="login-box-body">
<p class="login-box-msg">Add new Data Supir</p>
<form action="{{url('/admin/storesupir')}}" method="post" enctype="multipart/form-data">
{{ csrf_field() }}
<div class="row">
<div class="form-group has-feedback">
<label class="col-md-4 control-label">ID Supir</label>
<input type="text" class="form-control" name="id" required>
<span class="fa-bus glyphicon-envelope form-control-feedback"></span>
</div>
<div class="form-group has-feedback">
<label class="col-md-4 control-label">Nama Supir</label>
<input type="text" class="form-control" name="nama_supir" required>
<span class="fa-bus glyphicon-envelope form-control-feedback"></span>
</div>
<div class="form-group has-feedback">
<label class="col-md-4 control-label">Tempat/Tgl Lahir</label>
<input type="text" class="form-control" name="ttl" required>
<span class="fa-bus glyphicon-envelope form-control-feedback"></span>
</div>
<div class="form-group has-feedback">
<label class="col-md-4 control-label">Alamat</label>
<input type="text" class="form-control" name="alamat" required>
<span class="fa-bus glyphicon-envelope form-control-feedback"></span>
</div>
<div class="form-group has-feedback">
<label class="col-md-4 control-label">Jenis Kelamin</label>
<select class="form-control" name="jk" required>
<option value="Laki-Laki">Laki-Laki</option>
<option value="Perempun">Perempuan</option>
</select>
</div>
<div class="form-group has-feedback">
<label class="col-md-4 control-label">Agama</label>
<select class="form-control" name="agama" required>
<option value="K.Protestan">K.Protestan</option>
<option value="K.Katolik">K.Katolik</option>
<option value="Islam">Islam</option>
<option value="Hindu">Hindu</option>
<option value="Budha">Budha</option>
<option value="Lain">Lain</option>
</select>
</div>
<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="Tambah Supir" class="btn btn-danger">
</div>
</div>
</form>
</div>
</div>
</section>
</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>Bus</li>
<li class="active"><i class="fa-users"></i>Ubah Data Supir</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/' . $supir->image) }}"/>
<span class="username">{{$supir->nama_supir}}</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/' . $supir->image) }}"/>
<a href="{{url('admin/supir/ubahsupir',$supir->id)}}" class="btn btn-danger">Ubah Gambar</a>
</div>
<!-- /.box-footer -->
<div class="box-footer">
<form action="{{url('/admin/ubahsupir',$supir->id)}}" method="post" enctype="multipart/form-data">
{{ csrf_field() }}
<div class="form-group has-feedback">
<label class="col-md-4 control-label">Nama Supir</label>
<input type="text" class="form-control" name="nama_supir" value="{{$supir->nama_supir}}" required>
</div>
<div class="form-group">
<input type="submit" value="Ubah Supir" 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
......@@ -34,11 +34,11 @@
</div>
<div class="form-group has-feedback">
<label class="col-md-4 control-label">Role</label>
<input type="text" value="klien" class="form-control" name="role" readonly>
</div>
<div class="form-group has-feedback">
<label for="exampleInputImage">Masukkan Gambar</label>
<input type="file" id="exampleInputImage" name="image" required/>
<select class="form-control" name="role" required>
<option value="klien">Klien</option>
<option value="k_klien">Koordinator Klien</option>
<option value="k_supir">Koordinator Supir</option>
</select>
</div>
<div class="row">
<!-- /.col -->
......
......@@ -30,6 +30,7 @@
<!-- /.col -->
</div>
</form>
<a class="text-center" href="{{url('/register')}}">Register a new membership</a>
</div>
<!-- /.login-box-body -->
</div>
......
......@@ -30,7 +30,7 @@
<th>Nama Pemesan</th>
<th>Tujuan</th>
<th>Berangkat</th>
<th>Plat Bus</th>
<th>Alasan Pembatalan</th>
<th>Status</th>
</tr></thead>
<tbody>
......@@ -39,8 +39,8 @@
<td>{{$his->client_username}}</td>
<td>{{$his->tujuan}}</td>
<td>{{$his->berangkat}}</td>
<td>{{$his->plat_bus}}</td>
<td><span class="label label-info">Request</span>
<td>{{$his->alasan_batal}}</td>
<td><span class="label label-danger">Dibatalkan</span>
</tr>
</form>
@endforeach
......
@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</li>
<li class="active"><i class="fa-users"></i>Batalkan 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('/klien/kirim_pembatalan')}}" 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">
<label class="col-md-4 control-label">Plat Bus</label>
<input type="text" class="form-control" name="plat_bus" value="{{$pemesanan->plat_bus}}" readonly>
</div>
<div class="form-group">
<label>Isi Alasan Pembatalan</label>
<textarea class="form-control" rows="3"name="alasan_batal" placeholder="Alasan..." style="width: 499px; height: 104px;" required></textarea>
</div>
<!-- /.form-group -->
<div class="form-group has-feedback">
<input type="submit" value="Kirim" 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
......@@ -41,7 +41,7 @@
<td>{{$stat->berangkat}}</td>
<td>{{$stat->plat_bus}}</td>
<td><span class="label label-info">Request</span>
<a href="{{url('klien/pemesanan/batal',$stat->id)}}" class="label label-danger">Batalkan</a></td>
<a href="{{url('klien/status/batal',$stat->id)}}" class="label label-danger">Batalkan</a></td>
</tr>
</form>
@endforeach
......
......@@ -36,6 +36,28 @@
<i class="fa fa-group"></i> <span>User</span>
</a>
</li>
<li class="{{Request::segment(2) == 'bus' ? 'active' : ''}}">
<a href="{{url('admin/bus')}}">
<i class="fa-truck"></i> <span>Bus</span>
</a>
</li>
<li class="treeview {{Request::segment(2) == 'supir' ? 'active' : ''}}">
<a href="#"><span>Supir</span> <i class="fa fa-angle-left pull-right"></i></a>
<ul class="treeview-menu">
<li><a href="{{url('admin/supir')}}">Data Supir</a></li>
</ul>
</li>
<li class="{{Request::segment(2) == 'pemesanan' ? 'active' : ''}}">
<a href="{{url('admin/pemesanan')}}">
<i class="fa fa-group"></i>
<span>Pemesanan</span>
<small class="label pull-right bg-yellow">
</small>
</a>
</li>
</ul>
......
@extends('layouts.layout')
<head></head>
<body class="hold-transition login-page">
<div class="login-box">
<div class="login-logo">
<a href="../../index2.html"><b>Booking Driver</b>IS</a>
</div>
<!-- /.login-logo -->
<div class="login-box-body">
<p class="login-box-msg">Register New Member</p>
<form method="POST" action="{{ url('/register') }}">
{{ csrf_field() }}
<div class="form-group has-feedback">
<label class="col-md-4 control-label">Username</label>
<input type="text" class="form-control" name="username" required>
<span class="glyphicon glyphicon-envelope form-control-feedback"></span>
</div>
<div class="form-group has-feedback">
<label class="col-md-4 control-label">Password</label>
<input class="form-control" type="password" name="password" required/>
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
</div>
<div class="row">
<!-- /.col -->
<div class="col-xs-4">
<button type="submit" class="btn btn-primary btn-block btn-flat">Sign In</button>
</div>
<!-- /.col -->
</div>
</form>
</div>
<!-- /.login-box-body -->
</div>
<!-- /.login-box -->
<!-- jQuery 2.2.3 -->
<script src="../../plugins/jQuery/jquery-2.2.3.min.js"></script>
<!-- Bootstrap 3.3.6 -->
<script src="../../bootstrap/js/bootstrap.min.js"></script>
<!-- iCheck -->
<script src="../../plugins/iCheck/icheck.min.js"></script>
<script>
$(function () {
$('input').iCheck({
checkboxClass: 'icheckbox_square-blue',
radioClass: 'iradio_square-blue',
increaseArea: '20%' // optional
});
});
</script>
</body>
\ No newline at end of file
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