Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pa2d4ti06
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
Juliper
pa2d4ti06
Commits
931f9df9
Commit
931f9df9
authored
Jun 11, 2017
by
Palti Sinaga
Browse files
Options
Browse Files
Download
Plain Diff
no message
parents
19d594af
2a4d4206
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
61 additions
and
23 deletions
+61
-23
CustomerController.php
app/Http/Controllers/CustomerController.php
+5
-0
OwnerController.php
app/Http/Controllers/OwnerController.php
+17
-14
History.blade.php
...views/vendor/adminlte/layouts/customers/History.blade.php
+9
-6
UpdatePemesanan.blade.php
...ndor/adminlte/layouts/customers/UpdatePemesanan.blade.php
+21
-0
Upload.blade.php
.../views/vendor/adminlte/layouts/customers/Upload.blade.php
+3
-3
AddBookManual.blade.php
...ews/vendor/adminlte/layouts/owner/AddBookManual.blade.php
+5
-0
web.php
routes/web.php
+1
-0
No files found.
app/Http/Controllers/CustomerController.php
View file @
931f9df9
...
...
@@ -46,6 +46,11 @@ class CustomerController extends Controller
return
redirect
(
'customerHistory'
);
}
//Memperbaharui pesanan
public
function
updatePesanan
(
$id
){
}
//Pemberian/Pengiriman Feedback
public
function
sendFeedback
(
Request
$request
,
$id
){
/* if(Auth::guest()){
...
...
app/Http/Controllers/OwnerController.php
View file @
931f9df9
...
...
@@ -276,23 +276,26 @@ class OwnerController extends Controller
$dataHomestay
=
DB
::
table
(
'homestay'
)
->
join
(
'pemilikhomestay'
,
'homestay.id_pemilik'
,
'pemilikhomestay.id'
)
->
select
(
'homestay.id'
)
->
select
(
'homestay.id'
,
'homestay.jumlah_kamar'
)
->
where
(
'homestay.id_pemilik'
,
'='
,
$dataPemilik
[
0
]
->
id
)
->
get
();
$lb
->
homestay
=
$dataHomestay
[
0
]
->
id
;
$lb
->
nama_pemesan
=
$request
[
'nama'
];
$lb
->
jumlah_kamar
=
$request
[
'jumlah_kamar'
];
$lb
->
tanggal_mulai
=
$request
[
'tanggal_mulai'
];
$time
=
explode
(
'-'
,
$request
[
'tanggal_mulai'
]);
$time
[
2
]
+=
$request
[
'jumlah_hari'
];
$baru
=
join
(
'-'
,
$time
);
$lb
->
tanggal_berakhir
=
$baru
;
$lb
->
save
();
return
redirect
(
'daftarBooking'
);
if
(
$dataHomestay
[
0
]
->
jumlah_kamar
<
$request
[
'jumlah_kamar'
]){
return
redirect
(
'AddBook'
)
->
with
(
'message'
,
'Maaf jumlah kamar tidak mencukupi'
);
}
else
{
$lb
->
homestay
=
$dataHomestay
[
0
]
->
id
;
$lb
->
nama_pemesan
=
$request
[
'nama'
];
$lb
->
jumlah_kamar
=
$request
[
'jumlah_kamar'
];
$lb
->
tanggal_mulai
=
$request
[
'tanggal_mulai'
];
$time
=
explode
(
'-'
,
$request
[
'tanggal_mulai'
]);
$time
[
2
]
+=
$request
[
'jumlah_hari'
];
$baru
=
join
(
'-'
,
$time
);
$lb
->
tanggal_berakhir
=
$baru
;
$lb
->
save
();
return
redirect
(
'daftarBooking'
);
}
}
//Melakukan Update Kamar
...
...
resources/views/vendor/adminlte/layouts/customers/History.blade.php
View file @
931f9df9
...
...
@@ -11,8 +11,9 @@
<th> Total Pembayaran </th>
<th> Bukti Pembayaran </th>
<th> Status Pemesanan</th>
<th> Unggah Pembayaran </th>
<th> Bataklan Pesanan </th>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
...
...
@@ -35,6 +36,9 @@
<a href="
{{
url
(
'buktipembayaran/'
.
$a
->
id
)}}
">Upload Bukti</a>
</td>
<td>
<a href="
{{
url
(
'updatepesanan/'
.
$a
->
id
)}}
">Perbaharui Pesanan</a>
</td>
<td>
<form action="
{{
url
(
'batalkan/'
.
$a
->
id
)}}
" method="
post
">
<input type="
hidden
" name="
_method
" value="
PUT
">
</i><input type="
submit
" value="
batalkan
">
...
...
@@ -42,14 +46,13 @@
</form>
</td>
@elseif(
$a->status
==1)
<td colspan="
3
"><h
3>Di Terima</h3
></td>
<td colspan="
3
"><h
4>Di Terima</h4
></td>
@elseif(
$a->status
==2)
<td colspan="
3
"><h
3>Di Tolak</h3
></td>
<td colspan="
3
"><h
4>Di Tolak</h4
></td>
@elseif(
$a->status
=3)
<td colspan="
3
"><h
3>Telah Dibatalkan</h3
></td>
<td colspan="
3
"><h
4>Telah Dibatalkan</h4
></td>
@endif
</td>
</tr>
@endforeach
</tbody>
...
...
resources/views/vendor/adminlte/layouts/customers/UpdatePemesanan.blade.php
0 → 100644
View file @
931f9df9
@
extends
(
'adminlte::layouts.master'
)
@
section
(
'main-content'
)
<
div
class
="
cuisines
agileits
w3layouts
" style="
padding
-
top
:
50
px
;
margin
-
top
:
80
px
;
margin
-
bottom
:
100
px
;
">
<div class="
container
">
<form class="
form
-
horizontal
" action="
{{
url
(
'upload/'
.
$data
->
id
)}}
" method="
post
" enctype="
multipart
/
form
-
data
">
<input type="
hidden
" name="
_method
" value="
PUT
">
{
{csrf_field()}
}
<label>Tanggal Mulai</label>
<input type="
text
" name="
tanggal_mulai
" value="
{{
$data
->
tanggal_mulai
}}
" id="
noTelepon
" class="
form
-
control
">
<label>Tanggal Berakhir</label>
<input type="
text
" name="
tanggal_berakhir
" value="
{{
$data
->
tanggal_berakhir
}}
" class="
form
-
control
" >
<label>Jumlah Kamar</label>
<input type="
text
" name="
jumlah_kamar
" value="
{{
$data
->
jumlah_kamar
}}
" class="
form
-
control
">
<div class="
form
-
group
" align="
right
">
<input type="
submit
" class="
btn
btn
-
primary
" value="
simpan
">
</div>
</form>
</div>
</div>
@endsection
resources/views/vendor/adminlte/layouts/customers/Upload.blade.php
View file @
931f9df9
...
...
@@ -7,11 +7,11 @@
<input type="
hidden
" name="
_method
" value="
PUT
">
{
{csrf_field()}
}
<label>Tanggal Mulai</label>
<input type="
text
" name="
tanggal_mulai
" value="
{{
$data
->
tanggal_mulai
}}
" id="
noTelepon
" class="
form
-
control
">
<input type="
text
" name="
tanggal_mulai
" value="
{{
$data
->
tanggal_mulai
}}
" id="
noTelepon
" class="
form
-
control
"
disabled
>
<label>Tanggal Berakhir</label>
<input type="
text
" name="
tanggal_berakhir
" value="
{{
$data
->
tanggal_berakhir
}}
" class="
form
-
control
">
<input type="
text
" name="
tanggal_berakhir
" value="
{{
$data
->
tanggal_berakhir
}}
" class="
form
-
control
"
disabled
>
<label>Jumlah Kamar</label>
<input type="
text
" name="
jumlah_kamar
" value="
{{
$data
->
jumlah_kamar
}}
" class="
form
-
control
">
<input type="
text
" name="
jumlah_kamar
" value="
{{
$data
->
jumlah_kamar
}}
" class="
form
-
control
"
disabled
>
<label>Bukti Pembayaran</label>
<input type="
file
" name="
bukti_pembayaran
" id="
foto
" class="
form
-
corol
">nt<br>
<div class="
form
-
group
" align="
right
">
...
...
resources/views/vendor/adminlte/layouts/owner/AddBookManual.blade.php
View file @
931f9df9
...
...
@@ -18,6 +18,11 @@
</ul>
</div>
@endif
@if(session()->has('message'))
<div class="
alert
alert
-
info
">
{
{session()->get('message')}
}
</div>
@endif
</div>
<div class="
box
-
body
">
<form action="
{{
url
(
'addManual'
)}}
" method="
post
">
...
...
routes/web.php
View file @
931f9df9
...
...
@@ -87,6 +87,7 @@ Route::get('daftar','GuestController@register');
Route
::
post
(
'daftar'
,
'GuestController@registerStore'
);
Route
::
group
([
'middleware'
=>
'customer'
],
function
()
{
Route
::
get
(
'updatepesanan/{id}'
,
'CustomerController@updatePesanan'
);
Route
::
put
(
'batalkan/{id}'
,
'CustomerController@cancelPemesanan'
);
Route
::
put
(
'upload/{id}'
,
'CustomerController@upload'
);
Route
::
get
(
'customerHistory'
,
'CustomerController@history'
);
...
...
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