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
70875f94
Commit
70875f94
authored
7 years ago
by
Juliper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
list book op
parent
1256fecf
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
110 additions
and
94 deletions
+110
-94
CustomerController.php
app/Http/Controllers/CustomerController.php
+21
-18
ListBook.php
app/ListBook.php
+17
-0
Homestay.blade.php
...es/views/vendor/adminlte/layouts/pages/Homestay.blade.php
+71
-72
mainheader.blade.php
...s/vendor/adminlte/layouts/partialweb/mainheader.blade.php
+1
-4
No files found.
app/Http/Controllers/CustomerController.php
View file @
70875f94
...
...
@@ -3,6 +3,7 @@
namespace
App\Http\Controllers
;
use
App\Homestay
;
use
App\ListBook
;
use
App\Room
;
use
App\Transaksi
;
use
Illuminate\Http\Request
;
...
...
@@ -113,8 +114,8 @@ class CustomerController extends Controller
}
public
function
booking
(
Request
$request
){
$lb
=
new
ListBook
();
//dd($data,$room);
$data
=
DB
::
table
(
'homestay'
)
->
join
(
'kamar'
,
'homestay.id'
,
'='
,
'kamar.idHomestay'
)
->
select
(
'kamar.*'
,
'homestay.harga'
)
...
...
@@ -123,12 +124,12 @@ class CustomerController extends Controller
$data2
=
DB
::
table
(
'users'
)
->
join
(
'pelanggan'
,
'users.id'
,
'='
,
'pelanggan.id_Akun'
)
->
select
(
'pelanggan.id'
)
->
select
(
'pelanggan.id'
,
'pelanggan.nama'
)
->
where
(
'users.id'
,
'='
,
Auth
::
user
()
->
id
)
->
get
();
$time
=
explode
(
'-'
,
$request
[
'tanggal'
]);
$time
[
1
]
+=
$request
[
'jumlah_hari'
];
$time
[
2
]
+=
$request
[
'jumlah_hari'
];
$baru
=
join
(
'-'
,
$time
);
...
...
@@ -142,21 +143,23 @@ class CustomerController extends Controller
$trans
->
save
();
$dataTrans
=
DB
::
table
(
'transaksi'
)
->
select
(
'transaksi.*'
)
->
where
(
'transaksi.id_pelanggan'
,
'='
,
$data2
[
0
]
->
id
)
->
get
();
$room
=
Room
::
all
()
->
where
(
'idHomestay'
,
$data
[
0
]
->
idHomestay
);
for
(
$i
=
0
;
$i
<=
$request
[
'jumlah_kamar'
];
$i
++
){
if
(
$room
[
$i
]
->
id_transaksi
==
null
){
$upRoom
=
Room
::
find
(
$room
[
$i
]
->
id
);
$upRoom
->
id_transaksi
=
$dataTrans
[
0
]
->
id
;
$upRoom
->
update
();
}
}
// $dataTrans = DB::table('transaksi')
// ->select('transaksi.*')
// ->where('transaksi.id_pelanggan','=',$data2[0]->id)
// ->get();
//
// $room = Room::all()->where('idHomestay',$data[0]->idHomestay);
//
// for ($i=0;$i<=$request['jumlah_kamar'];$i++){
// if($room[$i]->id_transaksi==null){
// $upRoom = Room::find($room[$i]->id);
// $upRoom->id_transaksi = $dataTrans[0]->id;
// $upRoom->update();
// }
// }
dd
(
"masuk gan"
,
$request
[
'tanggal'
],
$time
,
$baru
,
$request
[
'id'
],
$data2
,
$data
);
}
...
...
This diff is collapsed.
Click to expand it.
app/ListBook.php
0 → 100644
View file @
70875f94
<?php
namespace
App
;
use
Illuminate\Database\Eloquent\Model
;
class
ListBook
extends
Model
{
protected
$table
=
"daftar_book"
;
protected
$fillable
=
[
'nama_pemesan'
,
'tanggal_mulai'
,
'tanggal_berakhir'
];
public
$timestamps
=
false
;
}
This diff is collapsed.
Click to expand it.
resources/views/vendor/adminlte/layouts/pages/Homestay.blade.php
View file @
70875f94
...
...
@@ -13,48 +13,60 @@
<br><br>
<div class="
col
-
md
-
12
col
-
sm
-
12
agileits
w3layouts
contact
-
grid
contact
-
grid
-
2
wow
slideInLeft
">
<form action="
{{
url
(
'book'
)}}
" method="
post
">
<input type="
hidden
" name="
_token
" value="
{{
csrf_token
()
}}
">
<input type="
hidden
" name="
id
" value="
{{
$data
->
id
}}
">
<div class="
col
-
md
-
3
col
-
sm
-
3
agileits
w3layouts
contact
-
grid
contact
-
grid
-
2
wow
slideInLeft
">
<input class="
date
agileits
w3layouts
" id="
datepicker1
" name="
tanggal
" type="
text
" value="
Tanggal
Check
in
" onfocus="
this
.
value
=
''
;
" onblur="
if
(
this
.
value
==
''
)
{
this
.
value
=
''
;}
" required="">
</div>
<div class="
col
-
md
-
3
col
-
sm
-
3
agileits
w3layouts
contact
-
grid
contact
-
grid
-
2
wow
slideInLeft
">
<input type="
text
" class="
text
wow
agileits
w3layouts
slideInLeft
" name="
jumlah_hari
" placeholder="
Lama
Menginap
" required="" style="
background
-
color
:
white
;
color
:
black
">
</div>
<div class="
col
-
md
-
3
col
-
sm
-
3
agileits
w3layouts
contact
-
grid
contact
-
grid
-
2
wow
slideInLeft
">
<input type="
text
" class="
text
wow
agileits
w3layouts
slideInLeft
" name="
jumlah_kamar
" placeholder="
Jumlah
Kamar
" required="" style="
background
-
color
:
white
;
color
:
black
">
</div>
<<<<<<< HEAD
<div class="
col
-
md
-
3
col
-
sm
-
3
agileits
w3layouts
contact
-
grid
contact
-
grid
-
2
wow
slideInLeft
" style="
margin
-
top
:
10
px
;
">
<button class="
btn
btn
-
success
" >BOOK NOW</button>
=======
>>>>>>> 1b1aa66ed77eecba26c79b08a445f59576a1ca97
<div class="
col
-
md
-
3
col
-
sm
-
3
agileits
w3layouts
contact
-
grid
contact
-
grid
-
2
wow
slideInLeft
">
<a href="
{{
url
(
'history'
)}}
" id="
book
" >
<input type="
button
" class="
more_btn
wow
agileits
w3layouts
slideInLeft
" value="
Book
Now
">
</a>
<input type="
submit
" class="
more_btn
wow
agileits
w3layouts
slideInLeft
" value="
Book
Now
">
<<<<<<< HEAD
=======
<<<<<<< HEAD
=======
>>>>>>> f3f2287d7c86a7c8efc0162c242d120bfcaf820a
>>>>>>> 36fc9a9037d0772bcfa4c52323fe8a6c39550bd5
>>>>>>> 0f3eed02f22695fdd7fc61c41b915d902aeca1fc
>>>>>>> 1b1aa66ed77eecba26c79b08a445f59576a1ca97
</div>
</form>
<input type="
hidden
" name="
_token
" value="
{{
csrf_token
()
}}
">
<input type="
hidden
" name="
id
" value="
{{
$data
->
id
}}
">
<div class="
col
-
md
-
3
col
-
sm
-
3
agileits
w3layouts
contact
-
grid
contact
-
grid
-
2
wow
slideInLeft
">
<input class="
date
agileits
w3layouts
" id="
datepicker1
" name="
tanggal
" type="
text
" value="
Tanggal
Check
in
" onfocus="
this
.
value
=
''
;
" onblur="
if
(
this
.
value
==
''
)
{
this
.
value
=
''
;}
" required="">
</div>
<div class="
col
-
md
-
3
col
-
sm
-
3
agileits
w3layouts
contact
-
grid
contact
-
grid
-
2
wow
slideInLeft
">
<input type="
text
" class="
text
wow
agileits
w3layouts
slideInLeft
" name="
jumlah_hari
" placeholder="
Lama
Menginap
" required="" style="
background
-
color
:
white
;
color
:
black
">
</div>
<div class="
col
-
md
-
3
col
-
sm
-
3
agileits
w3layouts
contact
-
grid
contact
-
grid
-
2
wow
slideInLeft
">
<input type="
text
" class="
text
wow
agileits
w3layouts
slideInLeft
" name="
jumlah_kamar
" placeholder="
Jumlah
Kamar
" required="" style="
background
-
color
:
white
;
color
:
black
">
</div>
<div class="
col
-
md
-
3
col
-
sm
-
3
agileits
w3layouts
contact
-
grid
contact
-
grid
-
2
wow
slideInLeft
">
<input type="
submit
" class="
more_btn
wow
agileits
w3layouts
slideInLeft
" value="
Book
Now
">
</div>
</form>
</div>
</div>
</div>
<!-- Booking -->
<div class="
details
agilets
w3layouts
" >
<div class="
container
">
<div class="
cuisines
agileits
w3layouts
">
<div class="
container
">
<table class="
table
table
-
striped
">
<thead>
<tr>
<th> No. </th>
<th> No. Rekening </th>
<th> Atas Nama </th>
<th> Total Pembayaran </th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>456141923</td>
<td>Palti Sinaga</td>
<td>2.400.000</td>
</tr>
<tr class="
success
">
<td>2</td>
<td>09179287213</td>
<td>Lestari Siregar</td>
<td>2.123.091</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- Informations -->
<div class="
cuisines
agileits
w3layouts
">
<div class="
container
">
...
...
@@ -88,10 +100,6 @@
<div class="
details
-
grid
-
image
agileits
w3layouts
">
<img src="
{{
asset
(
'img/project-1.jpg'
)}}
" alt="
Agileits
W3layouts
" data-toggle="
modal
" data-target="
#myModal" style="cursor: pointer;">
</
div
>
<!--
<
div
class
="
details
-
grid
-
info
agileits
w3layouts
">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua ut enim ad minim veniam.</p>
</div> -->
<!-- <button class="
btn
btn
-
primary
wow
agileits
w3layouts
fadeInLeft
" data-toggle="
modal
" data-target="
#myModal">EXPLORE<span class="glyphicon agileits w3layouts glyphicon-arrow-right" aria-hidden="true"></span></button> -->
<
div
class
="
clearfix
"></div>
</div>
</div>
...
...
@@ -123,28 +131,28 @@
<div class="
details
agileits
w3layouts
">
<div class="
container
">
<div class="
col
-
md
-
6
col
-
sm
-
6
agileits
w3layouts
contact
-
grid
contact
-
grid
-
2
wow
slideInLeft
">
<<<<<<< HEAD
<h2 style="
margin
-
bottom
:
10
px
;
"> Kritik dan Saran</h2>
<form action="
#" method="post" style="margin-bottom: 25px;">
<form action="
#" method="post" style="margin-bottom: 25px;">
</form>
<
h2
style
=
"margin-bottom: 10px;"
>
Kritik
dan
Saran
</
h2
>
<
form
action
=
"#"
method
=
"post"
style
=
"margin-bottom: 25px;"
>
<
form
action
=
"#"
method
=
"post"
style
=
"margin-bottom: 25px;"
>
</
form
>
=======
<
h2
style
=
"margin-bottom: 10px;"
>
Kritik
dan
Saran
</
h2
>
<
form
action
=
"#"
method
=
"post"
style
=
"margin-bottom: 25px;"
>
<
h2
style
=
"margin-bottom: 10px;"
>
Kritik
dan
Saran
</
h2
>
<
form
action
=
"#"
method
=
"post"
style
=
"margin-bottom: 25px;"
>
>>>>>>>
1
b1aa66ed77eecba26c79b08a445f59576a1ca97
<
input
type
=
"text"
class
="
text
wow
agileits
w3layouts
slideInLeft
" name="
Name
" placeholder="
Name
" required="">
<input type="
text
" class="
text
wow
agileits
w3layouts
slideInLeft
" name="
Email
" placeholder="
Email
" required="">
<textarea name="
Message
" class="
wow
agileits
w3layouts
slideInLeft
" placeholder="
Message
" required=""></textarea>
<input type="
submit
" class="
more_btn
wow
agileits
w3layouts
slideInLeft
" value="
Send
Message
">
</button>
</form>
</div>
</div>
</
form
>
<
form
action
=
"#"
method
=
"post"
style
=
"margin-bottom: 25px;"
>
<
input
type
=
"text"
class
="
text
wow
agileits
w3layouts
slideInLeft
" name="
Name
" placeholder="
Name
" required="">
<input type="
text
" class="
text
wow
agileits
w3layouts
slideInLeft
" name="
Email
" placeholder="
Email
" required="">
<textarea name="
Message
" class="
wow
agileits
w3layouts
slideInLeft
" placeholder="
Message
" required=""></textarea>
<input type="
submit
" class="
more_btn
wow
agileits
w3layouts
slideInLeft
" value="
Send
Message
">
</button>
</form>
<div>
</div>
</div>
...
...
@@ -157,14 +165,11 @@
document.getElementById('book').onclick = function(){
swal("
Good
job
!
", "
You
clicked
the
button
!
", "
success
");};
</script>
<<<<<<< HEAD
@endsection
</div>
=======
</div>
>>>>>>> 1b1aa66ed77eecba26c79b08a445f59576a1ca97
<script>
...
...
@@ -196,17 +201,11 @@
});
};
<<<<<<< HEAD
</script>
=======
</script>
<<<<<<< HEAD
=======
<<<<<<< HEAD
</div>
</div>
@endsection
=======
>>>>>>> f3f2287d7c86a7c8efc0162c242d120bfcaf820a
>>>>>>> 36fc9a9037d0772bcfa4c52323fe8a6c39550bd5
>>>>>>> 0f3eed02f22695fdd7fc61c41b915d902aeca1fc
>>>>>>> 1b1aa66ed77eecba26c79b08a445f59576a1ca97
This diff is collapsed.
Click to expand it.
resources/views/vendor/adminlte/layouts/partialweb/mainheader.blade.php
View file @
70875f94
...
...
@@ -35,7 +35,6 @@
<li><a
href=
"{{url('home')}}"
>
{{Auth::user()->name}}
</a></li>
@endif
</a>
<
<<<<<<
HEAD
<ul
class=
"dropdown-menu"
>
<!-- The user image in the menu -->
<li
class=
"user-header"
>
...
...
@@ -46,8 +45,6 @@
<!-- <small>{{ trans('adminlte_lang::message.login') }} </small> -->
</p>
</li>
<!-- Menu Body -->
=======
@if(Auth::user()->role=="Customer")
<ul
class=
"dropdown-menu"
>
<!-- The user image in the menu -->
...
...
@@ -60,7 +57,6 @@
</p>
</li>
<!-- Menu Body -->
>>>>>>> 36fc9a9037d0772bcfa4c52323fe8a6c39550bd5
<!-- Menu Footer-->
<li
class=
"user-footer"
>
...
...
@@ -89,6 +85,7 @@
<!-- <li><a href="codes.html">CODES</a></li> -->
<!-- <li><a href="booking.html">BOOKING</a></li> -->
</ul>
</ul>
</div>
</div>
</nav>
...
...
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