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
fafd808f
Commit
fafd808f
authored
May 20, 2017
by
Juliper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
all have been done without sms gateway
parent
5252f4d5
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
103 additions
and
5 deletions
+103
-5
CustomerController.php
app/Http/Controllers/CustomerController.php
+36
-3
OwnerController.php
app/Http/Controllers/OwnerController.php
+18
-0
Account.blade.php
resources/views/vendor/adminlte/errors/Account.blade.php
+19
-0
History.blade.php
...views/vendor/adminlte/layouts/customers/History.blade.php
+7
-0
listPesanan.blade.php
...views/vendor/adminlte/layouts/owner/listPesanan.blade.php
+22
-2
web.php
routes/web.php
+1
-0
No files found.
app/Http/Controllers/CustomerController.php
View file @
fafd808f
...
...
@@ -171,7 +171,7 @@ class CustomerController extends Controller
public
function
booking
(
Request
$request
){
if
(
Auth
::
guest
()){
dd
(
"you must have account"
);
return
view
(
'adminlte::errors.Account'
);
}
$lb
=
new
ListBook
();
...
...
@@ -211,7 +211,7 @@ class CustomerController extends Controller
dd
(
'nggak boleh'
);
}
}
else
{
dd
(
'masuk aja gan'
);
//
dd('masuk aja gan');
}
}
...
...
@@ -227,9 +227,41 @@ class CustomerController extends Controller
//dd($dataHomestay,$dataPelanggan);
$time
=
explode
(
'-'
,
$request
[
'tanggal'
]);
$time
[
2
]
+=
$request
[
'jumlah_hari'
];
//dd($time[1]+2);
if
(
$time
[
1
]
==
2
){
$time
[
2
]
+=
$request
[
'jumlah_hari'
];
if
(
$time
[
2
]
>
28
){
$time
[
2
]
=
0
;
$time
[
2
]
+=
$request
[
'jumlah_hari'
];
$time
[
2
]
-=
1
;
$time
[
1
]
+=
1
;
if
(
$time
[
1
]
>
12
){
$time
[
1
]
=
1
;
}
}
}
else
{
if
(
$time
[
1
]
%
2
==
1
){
$time
[
2
]
+=
$request
[
'jumlah_hari'
];
if
(
$time
[
2
]
>
31
){
$time
[
2
]
=
0
;
$time
[
2
]
+=
$request
[
'jumlah_hari'
];
$time
[
1
]
+=
1
;
}
$time
[
2
]
-=
1
;
}
else
{
$time
[
2
]
+=
$request
[
'jumlah_hari'
];
if
(
$time
[
2
]
>
30
){
$time
[
2
]
=
0
;
$time
[
2
]
+=
$request
[
'jumlah_hari'
];
$time
[
1
]
+=
1
;
}
$time
[
2
]
-=
1
;
}
}
$baru
=
join
(
'-'
,
$time
);
//dd($request['tanggal'],$baru,$request['jumlah_hari']);
//Insert Table Transaksi
$trans
=
new
Transaksi
();
...
...
@@ -240,6 +272,7 @@ class CustomerController extends Controller
$trans
->
jumlah_kamar
=
$request
[
'jumlah_kamar'
];
$trans
->
lama_menginap
=
$request
[
'jumlah_hari'
];
$trans
->
total_pembayaran
=
$request
[
'jumlah_kamar'
]
*
$dataHomestay
[
0
]
->
harga
;
$trans
->
status
=
0
;
//Insert Table Daftar Booking
$lb
->
homestay
=
$request
[
'id'
];
...
...
app/Http/Controllers/OwnerController.php
View file @
fafd808f
...
...
@@ -6,6 +6,7 @@ use App\ListBook;
use
App\RequestFasilitas
;
use
App\RequestHomestay
;
use
App\Room
;
use
App\Transaksi
;
use
Illuminate\Http\Request
;
use
App\User
;
use
App\Owner
;
...
...
@@ -21,6 +22,23 @@ class OwnerController extends Controller
}
public
function
konfirmasiPemesanan
(
Request
$request
,
$id
){
$data
=
Transaksi
::
find
(
$id
);
if
(
$request
[
'konfirmasi'
]
==
1
){
$data
->
status
=
$request
[
'konfirmasi'
];
}
else
{
DB
::
table
(
'daftar_book'
)
->
where
(
'tanggal_mulai'
,
'='
,
$data
->
tanggal_mulai
)
->
delete
();
$data
->
status
=
$request
[
'konfirmasi'
];
}
$data
->
update
();
return
redirect
(
'pesanan'
);
}
public
function
listOfBook
(){
...
...
resources/views/vendor/adminlte/errors/Account.blade.php
0 → 100644
View file @
fafd808f
@
extends
(
'adminlte::layouts.errors'
)
@
section
(
'htmlheader_title'
)
{{
trans
(
'adminlte_lang::message.serviceunavailable'
)
}}
@
endsection
@
section
(
'main-content'
)
<
div
class
="
error
-
page
">
<h2 class="
headline
text
-
red
"><i class="
fa
fa
-
warning
text
-
red
"></i></h2>
<div class="
error
-
content
">
<h3> Oops! Kamu HARUS Punya Akun</h3>
<p>
Jika Kamu ingin melakukan pembookingan kamu terlebih dahulu harus LOGIN!! di sitem kami
<a href="
{{
url
(
'login'
)}}
">Login </a> <a href="
{{
url
(
''
)}}
">Kembali</a>
</p>
</div>
</div><!-- /.error-page -->
@endsection
resources/views/vendor/adminlte/layouts/customers/History.blade.php
View file @
fafd808f
...
...
@@ -10,6 +10,7 @@
<th> Atas Nama </th>
<th> Total Pembayaran </th>
<th> Bukti Pembayaran </th>
<th> Status Pemesanan</th>
<th> Unggah Pembayaran </th>
</tr>
</thead>
...
...
@@ -27,6 +28,12 @@
@endif
</td>
<td>
@if(
$a->status
==0) Belum Dikonfirmasi
@elseif(
$a->status
==1) Di Terima
@elseif(
$a->status
==2) Di Tolak
@endif
</td>
<td>
<a href="
{{
url
(
'buktipembayaran/'
.
$a
->
id
)}}
">Upload Bukti</a>
</td>
</tr>
...
...
resources/views/vendor/adminlte/layouts/owner/listPesanan.blade.php
View file @
fafd808f
...
...
@@ -48,7 +48,7 @@
<th>Lama Menginap</th>
<th>Jumlah Kamar</th>
<th>Bukti Pembayaran</th>
<th>Status</th>
<th
colspan="
3
" style="
position
:
center
;
"
>Status</th>
</tr>
@foreach(
$data
as
$a
)
<tr>
...
...
@@ -60,7 +60,27 @@
<td>
{
{$a->lama_menginap}
}
Hari</td>
<td>
{
{$a->jumlah_kamar}
}
</td>
<td><img src="
/
img
/
{{
$a
->
bukti_pembayaran
}}
" style="
width
:
100
px
" alt="
User
Image
" /></td>
<td>{{"
belum
bang
"}}</td>
<td>
@if(
$a->status
==0)
<td>
<form action="
{{
url
(
'konfirmasiPemesanan/'
.
$a
->
id
)}}
" method="
post
">
{
{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>
</form>
<td>
<form action="
{{
url
(
'konfirmasiPemesanan/'
.
$a
->
id
)}}
" method="
post
">
{
{csrf_field()}
}
<input type="
hidden
" name="
_method
" value="
PUT
">
<input type="
hidden
" name="
konfirmasi
" value="
2
">
<button type="
submit
" class="
btn
btn
-
danger
"><i class="
glyphicon
glyphicon
-
trash
"> Tolak</i></button>
</form>
</td>
@elseif(
$a->status
==1) Diterima
@elseif(
$a->status
==2) Ditolak
@endif
</td>
</tr>
@endforeach
</table>
...
...
routes/web.php
View file @
fafd808f
...
...
@@ -59,6 +59,7 @@ Route::get('listPemesanan','AdminController@listPesanan');
Route
::
put
(
'editRoom/{id}'
,
'OwnerController@updateRoom'
);
Route
::
post
(
'addManual'
,
'OwnerController@addBookManual'
);
Route
::
put
(
'konfirmasiPemesanan/{id}'
,
'OwnerController@konfirmasiPemesanan'
);
Route
::
get
(
'editRoom/{id}'
,
'OwnerController@editRoom'
)
;
Route
::
get
(
'daftarBooking'
,
'OwnerController@listOfBook'
);
Route
::
get
(
'daftarKamar'
,
'OwnerController@daftarKamar'
);
...
...
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