Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PA21617D4TI04
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Rinto
PA21617D4TI04
Commits
f99148e8
Commit
f99148e8
authored
May 12, 2017
by
Rinto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New
parent
8362e985
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
152 additions
and
13 deletions
+152
-13
AdminController.php
app/Http/Controllers/AdminController.php
+24
-2
KlienController.php
app/Http/Controllers/KlienController.php
+3
-0
Pemesanan.php
app/Models/Pemesanan.php
+2
-1
pemesanan_bus.sql
pemesanan_bus.sql
+0
-0
index.blade.php
resources/views/admin/history/index.blade.php
+82
-0
detail.blade.php
resources/views/admin/pemesanan/detail.blade.php
+7
-1
index.blade.php
resources/views/admin/pemesanan/index.blade.php
+1
-1
index.blade.php
resources/views/klien/history/index.blade.php
+8
-3
pilih_bus.blade.php
resources/views/klien/pesan/pilih_bus.blade.php
+5
-0
status.blade.php
resources/views/klien/pesan/status.blade.php
+1
-1
batal.blade.php
resources/views/klien/status/batal.blade.php
+1
-1
header.blade.php
resources/views/layouts/header.blade.php
+2
-2
sidebar.blade.php
resources/views/layouts/sidebar.blade.php
+7
-0
web.php
routes/web.php
+9
-1
No files found.
app/Http/Controllers/AdminController.php
View file @
f99148e8
...
...
@@ -2,6 +2,7 @@
namespace
App\Http\Controllers
;
use
App\Models\Batal
;
use
Illuminate\Http\Request
;
use
Illuminate\Support\Facades\Auth
;
use
Illuminate\Support\Facades\DB
;
...
...
@@ -112,7 +113,7 @@ class AdminController extends Controller
}
public
function
edit
(
Request
$request
,
$id
){
// code : from itsolutionstuff.com and modified by group 9 using intervention image
$input
=
$request
->
all
();
if
(
$request
->
file
(
'image'
)){
$this
->
validate
(
$request
,
[
...
...
@@ -196,7 +197,7 @@ class AdminController extends Controller
}
public
function
editsupir
(
Request
$request
,
$id
){
// code : from itsolutionstuff.com and modified by group 9 using intervention image
$input
=
$request
->
all
();
if
(
$request
->
file
(
'image'
)){
$this
->
validate
(
$request
,
[
...
...
@@ -225,6 +226,21 @@ class AdminController extends Controller
return
view
(
'admin.profil.index'
,
$this
->
data
);
}
public
function
history
(){
$key
=
Input
::
get
(
'search'
);
$this
->
data
[
'title'
]
=
' Riwayat Pemesanan Bus IT Del'
;
if
(
isset
(
$key
)){
$this
->
data
[
'batal'
]
=
Batal
::
where
(
'client_username'
,
'like'
,
'%'
.
$key
.
'%'
)
->
orderBy
(
'id'
,
'desc'
)
->
paginate
(
10
);
$this
->
data
[
'pemesanan'
]
=
Pemesanan
::
where
(
'client_username'
,
'like'
,
'%'
.
$key
.
'%'
)
->
orderBy
(
'id'
,
'desc'
)
->
paginate
(
10
);
}
else
{
$this
->
data
[
'batal'
]
=
Batal
::
orderBy
(
'id'
,
'desc'
)
->
paginate
(
10
);
$this
->
data
[
'pemesanan'
]
=
Pemesanan
::
orderBy
(
'id'
,
'desc'
)
->
paginate
(
10
);
}
$this
->
data
[
'total'
]
=
DB
::
table
(
'batal'
)
->
get
();
$this
->
data
[
'total'
]
=
DB
::
table
(
'pemesanan'
)
->
get
();
return
view
(
'admin.history.index'
,
$this
->
data
);
}
public
function
pemesanan
(){
$key
=
Input
::
get
(
'search'
);
$this
->
data
[
'title'
]
=
'Pemesanan Bus IT Del'
;
...
...
@@ -247,4 +263,10 @@ class AdminController extends Controller
pemesanan
::
find
(
$id
)
->
delete
();
return
redirect
(
url
(
'/admin/pemesanan'
))
->
with
(
'info'
,
'Pembatalan pemesanan berhasil dilakukan'
);
}
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'
);
}
}
app/Http/Controllers/KlienController.php
View file @
f99148e8
...
...
@@ -68,6 +68,8 @@ class KlienController extends Controller
$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
();
$this
->
data
[
'status'
]
=
DB
::
table
(
'pemesanan'
)
->
where
(
'client_username'
,
$username
)
->
orderBy
(
'id'
,
'desc'
)
->
paginate
(
10
);
$this
->
data
[
'total'
]
=
DB
::
table
(
'pemesanan'
)
->
where
(
'client_username'
,
$username
)
->
get
();
return
view
(
'klien.history.index'
,
$this
->
data
);
}
...
...
@@ -93,6 +95,7 @@ class KlienController extends Controller
public
function
batal
(
$id
){
$this
->
data
[
'title'
]
=
'Detail Pemesanan'
;
$this
->
data
[
'pemesanan'
]
=
Pemesanan
::
find
(
$id
);
pemesanan
::
find
(
$id
)
->
delete
();
return
view
(
'klien.status.batal'
,
$this
->
data
);
}
...
...
app/Models/Pemesanan.php
View file @
f99148e8
...
...
@@ -7,6 +7,6 @@ use Illuminate\Database\Eloquent\Model;
class
Pemesanan
extends
Model
{
protected
$table
=
'pemesanan'
;
protected
$fillable
=
[
'id'
,
'tujuan'
,
'jumlah'
,
'alasan'
,
'berangkat'
,
'kembali'
,
'client_username'
,
'plat_bus'
];
protected
$fillable
=
[
'id'
,
'tujuan'
,
'jumlah'
,
'alasan'
,
'berangkat'
,
'kembali'
,
'client_username'
,
'plat_bus'
,
'status'
];
//
}
\ No newline at end of file
pemesanan_bus.sql
View file @
f99148e8
This diff is collapsed.
Click to expand it.
resources/views/admin/history/index.blade.php
0 → 100644
View file @
f99148e8
@
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>Riwayat 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
:
150
px
;
">
<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>Alasan Pembatalan</th>
<th>Status</th>
</tr></thead>
<tbody>
@foreach(
$batal
as
$bata
)
<tr>
<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>
@endforeach
@foreach(
$pemesanan
as
$pesan
)
<tr>
<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>
@endforeach
</tbody>
</table>
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
</div>
</div>
</section>
<!-- /.content -->
</div>
</div>
</body>
@endif
\ No newline at end of file
resources/views/admin/pemesanan/detail.blade.php
View file @
f99148e8
...
...
@@ -33,7 +33,7 @@
</div>
<!-- /.box-footer -->
<div class="
box
-
footer
">
<form action="
" method="
post
">
<form action="
{{
url
(
'/admin/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>
...
...
@@ -63,6 +63,12 @@
<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 class="
col
-
md
-
4
control
-
label
">Status</label>
<input type="
text
" value="
diproses
" class="
form
-
control
" name="
status
" 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>
...
...
resources/views/admin/pemesanan/index.blade.php
View file @
f99148e8
...
...
@@ -49,7 +49,7 @@
<td>
{
{$pesan->client_username}
}
</td>
<td>
{
{$pesan->tujuan}
}
</td>
<td>
{
{$pesan->berangkat}
}
</td>
<td><span class="
label
label
-
info
">
Request
</span></td>
<td><span class="
label
label
-
info
">
{
{$pesan->status}
}
</span></td>
<td colspan="
3
">
<a href="
{{
url
(
'admin/pemesanan/detail'
,
$pesan
->
id
)}}
" class="
btn
btn
-
danger
">Detail</a>
</td>
...
...
resources/views/klien/history/index.blade.php
View file @
f99148e8
...
...
@@ -29,8 +29,7 @@
<thead><tr>
<th>Nama Pemesan</th>
<th>Tujuan</th>
<th>Berangkat</th>
<th>Alasan Pembatalan</th>
<th>Tanggal Berangkat</th>
<th>Status</th>
</tr></thead>
<tbody>
...
...
@@ -39,11 +38,17 @@
<td>
{
{$his->client_username}
}
</td>
<td>
{
{$his->tujuan}
}
</td>
<td>
{
{$his->berangkat}
}
</td>
<td>
{
{$his->alasan_batal}
}
</td>
<td><span class="
label
label
-
danger
">Dibatalkan</span>
</tr>
</form>
@endforeach
@foreach(
$status
as
$stat
)
<tr>
<td>
{
{$stat->client_username}
}
</td>
<td>
{
{$stat->tujuan}
}
</td>
<td>
{
{$stat->berangkat}
}
</td>
<td><span class="
label
label
-
info
">Request</span>
@endforeach
</tbody>
</table>
</div>
...
...
resources/views/klien/pesan/pilih_bus.blade.php
View file @
f99148e8
...
...
@@ -84,6 +84,11 @@
</div>
<div class="
form
-
group
">
<label>Status</label>
<input type="
text
" value="
request
" class="
form
-
control
" name="
status
" readonly>
</div>
<div class="
form
-
group
">
</div>
<!-- /.form-group -->
...
...
resources/views/klien/pesan/status.blade.php
View file @
f99148e8
...
...
@@ -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>
<button class="
label
label
-
danger
">Batalkan</button></td>
</tr>
</form>
...
...
resources/views/klien/status/batal.blade.php
View file @
f99148e8
...
...
@@ -49,7 +49,7 @@
<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
">Alas
an</label>
<label class="
col
-
md
-
6
control
-
label
">Keperluan Pemesan
an</label>
<textarea class="
form
-
control
" placeholder="
Berikan
deskripsi
disini
" rows="
3
" name="
alasan
" readonly>
{
{$pemesanan->alasan}
}
</textarea>
</div>
<div class="
form
-
group
has
-
feedback
">
...
...
resources/views/layouts/header.blade.php
View file @
f99148e8
...
...
@@ -3,9 +3,9 @@
<!-- Logo -->
<a href="
index2
.
html
" class="
logo
">
<!-- mini logo for sidebar mini 50x50 pixels -->
<span class="
logo
-
mini
"><b>
SI</b>PB
</span>
<span class="
logo
-
mini
"><b>
BoD</b>IS
</span>
<!-- logo for regular state and mobile devices -->
<span class="
logo
-
lg
">
<b>SI</b>Pemesanan_Bus
</span>
<span class="
logo
-
lg
">
Booking Driver<b>IS</b>
</span>
</a>
<!-- Header Navbar: style can be found in header.less -->
<nav class="
navbar
navbar
-
static
-
top
" role="
navigation
">
...
...
resources/views/layouts/sidebar.blade.php
View file @
f99148e8
...
...
@@ -59,6 +59,13 @@
</a>
</li>
<li class="
{{
Request
::
segment
(
2
)
==
'riwayat'
?
'active'
:
''
}}
">
<a href="
{{
url
(
'admin/history'
)}}
">
<i class="
fa
fa
-
group
"></i>
<span>Riwayat</span>
</a>
</li>
</ul>
@elseif(Auth::user()->role == 'k_supir')
...
...
routes/web.php
View file @
f99148e8
...
...
@@ -3,6 +3,7 @@ Use App\Models\Bus;
Use
App\Models\Supir
;
Use
App\Models\Users
;
Use
App\Models\Pemesanan
;
Use
App\Models\Batal
;
/*
|--------------------------------------------------------------------------
| Web Routes
...
...
@@ -24,7 +25,7 @@ Route::group(['namespace' => 'auth'],function(){
Auth
::
logout
();
return
redirect
(
'/'
);
})
->
name
(
'logout'
);
Route
::
pos
t
(
'/register'
,
'RegisterController@store'
);
Route
::
ge
t
(
'/register'
,
'RegisterController@store'
);
});
...
...
@@ -57,8 +58,12 @@ Route::group(['prefix' => 'admin','middleware' => 'admin'], function() {
Route
::
get
(
'/profil'
,
'AdminController@profil'
);
Route
::
get
(
'/history'
,
'AdminController@history'
);
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
::
group
([
'prefix'
=>
'k_supir'
,
'middleware'
=>
'k_supir'
],
function
()
{
...
...
@@ -83,4 +88,6 @@ Route::group(['prefix' => 'klien','middleware' => 'klien'], function() {
Route
::
get
(
'/status'
,
'KlienController@status'
);
Route
::
get
(
'/pemesanan/batal/{id}'
,
'KlienController@batal'
);
Route
::
get
(
'/pesan/pilih_bus/{id}'
,
'KlienController@pilih_bus'
);
Route
::
get
(
'/status/batal/{id}'
,
'KlienController@batal'
);
Route
::
post
(
'/kirim_pembatalan'
,
'KlienController@kirim_pembatalan'
);
});
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment