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
7 years ago
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
...
@@ -171,7 +171,7 @@ class CustomerController extends Controller
public
function
booking
(
Request
$request
){
public
function
booking
(
Request
$request
){
if
(
Auth
::
guest
()){
if
(
Auth
::
guest
()){
dd
(
"you must have account"
);
return
view
(
'adminlte::errors.Account'
);
}
}
$lb
=
new
ListBook
();
$lb
=
new
ListBook
();
...
@@ -211,7 +211,7 @@ class CustomerController extends Controller
...
@@ -211,7 +211,7 @@ class CustomerController extends Controller
dd
(
'nggak boleh'
);
dd
(
'nggak boleh'
);
}
}
}
else
{
}
else
{
dd
(
'masuk aja gan'
);
//
dd('masuk aja gan');
}
}
}
}
...
@@ -227,9 +227,41 @@ class CustomerController extends Controller
...
@@ -227,9 +227,41 @@ class CustomerController extends Controller
//dd($dataHomestay,$dataPelanggan);
//dd($dataHomestay,$dataPelanggan);
$time
=
explode
(
'-'
,
$request
[
'tanggal'
]);
$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
);
$baru
=
join
(
'-'
,
$time
);
//dd($request['tanggal'],$baru,$request['jumlah_hari']);
//Insert Table Transaksi
//Insert Table Transaksi
$trans
=
new
Transaksi
();
$trans
=
new
Transaksi
();
...
@@ -240,6 +272,7 @@ class CustomerController extends Controller
...
@@ -240,6 +272,7 @@ class CustomerController extends Controller
$trans
->
jumlah_kamar
=
$request
[
'jumlah_kamar'
];
$trans
->
jumlah_kamar
=
$request
[
'jumlah_kamar'
];
$trans
->
lama_menginap
=
$request
[
'jumlah_hari'
];
$trans
->
lama_menginap
=
$request
[
'jumlah_hari'
];
$trans
->
total_pembayaran
=
$request
[
'jumlah_kamar'
]
*
$dataHomestay
[
0
]
->
harga
;
$trans
->
total_pembayaran
=
$request
[
'jumlah_kamar'
]
*
$dataHomestay
[
0
]
->
harga
;
$trans
->
status
=
0
;
//Insert Table Daftar Booking
//Insert Table Daftar Booking
$lb
->
homestay
=
$request
[
'id'
];
$lb
->
homestay
=
$request
[
'id'
];
...
...
This diff is collapsed.
Click to expand it.
app/Http/Controllers/OwnerController.php
View file @
fafd808f
...
@@ -6,6 +6,7 @@ use App\ListBook;
...
@@ -6,6 +6,7 @@ use App\ListBook;
use
App\RequestFasilitas
;
use
App\RequestFasilitas
;
use
App\RequestHomestay
;
use
App\RequestHomestay
;
use
App\Room
;
use
App\Room
;
use
App\Transaksi
;
use
Illuminate\Http\Request
;
use
Illuminate\Http\Request
;
use
App\User
;
use
App\User
;
use
App\Owner
;
use
App\Owner
;
...
@@ -21,6 +22,23 @@ class OwnerController extends Controller
...
@@ -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
(){
public
function
listOfBook
(){
...
...
This diff is collapsed.
Click to expand it.
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
This diff is collapsed.
Click to expand it.
resources/views/vendor/adminlte/layouts/customers/History.blade.php
View file @
fafd808f
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
<th> Atas Nama </th>
<th> Atas Nama </th>
<th> Total Pembayaran </th>
<th> Total Pembayaran </th>
<th> Bukti Pembayaran </th>
<th> Bukti Pembayaran </th>
<th> Status Pemesanan</th>
<th> Unggah Pembayaran </th>
<th> Unggah Pembayaran </th>
</tr>
</tr>
</thead>
</thead>
...
@@ -27,6 +28,12 @@
...
@@ -27,6 +28,12 @@
@endif
@endif
</td>
</td>
<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>
<a href="
{{
url
(
'buktipembayaran/'
.
$a
->
id
)}}
">Upload Bukti</a>
</td>
</td>
</tr>
</tr>
...
...
This diff is collapsed.
Click to expand it.
resources/views/vendor/adminlte/layouts/owner/listPesanan.blade.php
View file @
fafd808f
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
<th>Lama Menginap</th>
<th>Lama Menginap</th>
<th>Jumlah Kamar</th>
<th>Jumlah Kamar</th>
<th>Bukti Pembayaran</th>
<th>Bukti Pembayaran</th>
<th>Status</th>
<th
colspan="
3
" style="
position
:
center
;
"
>Status</th>
</tr>
</tr>
@foreach(
$data
as
$a
)
@foreach(
$data
as
$a
)
<tr>
<tr>
...
@@ -60,7 +60,27 @@
...
@@ -60,7 +60,27 @@
<td>
{
{$a->lama_menginap}
}
Hari</td>
<td>
{
{$a->lama_menginap}
}
Hari</td>
<td>
{
{$a->jumlah_kamar}
}
</td>
<td>
{
{$a->jumlah_kamar}
}
</td>
<td><img src="
/
img
/
{{
$a
->
bukti_pembayaran
}}
" style="
width
:
100
px
" alt="
User
Image
" /></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>
</tr>
@endforeach
@endforeach
</table>
</table>
...
...
This diff is collapsed.
Click to expand it.
routes/web.php
View file @
fafd808f
...
@@ -59,6 +59,7 @@ Route::get('listPemesanan','AdminController@listPesanan');
...
@@ -59,6 +59,7 @@ Route::get('listPemesanan','AdminController@listPesanan');
Route
::
put
(
'editRoom/{id}'
,
'OwnerController@updateRoom'
);
Route
::
put
(
'editRoom/{id}'
,
'OwnerController@updateRoom'
);
Route
::
post
(
'addManual'
,
'OwnerController@addBookManual'
);
Route
::
post
(
'addManual'
,
'OwnerController@addBookManual'
);
Route
::
put
(
'konfirmasiPemesanan/{id}'
,
'OwnerController@konfirmasiPemesanan'
);
Route
::
get
(
'editRoom/{id}'
,
'OwnerController@editRoom'
)
;
Route
::
get
(
'editRoom/{id}'
,
'OwnerController@editRoom'
)
;
Route
::
get
(
'daftarBooking'
,
'OwnerController@listOfBook'
);
Route
::
get
(
'daftarBooking'
,
'OwnerController@listOfBook'
);
Route
::
get
(
'daftarKamar'
,
'OwnerController@daftarKamar'
);
Route
::
get
(
'daftarKamar'
,
'OwnerController@daftarKamar'
);
...
...
This diff is collapsed.
Click to expand it.
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