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
7d621d2e
Commit
7d621d2e
authored
May 15, 2017
by
Palti Sinaga
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://gitlab.del.ac.id/juliper19/pa2d4ti06
parents
b580b3fd
ee014bec
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
49 deletions
+45
-49
CustomerController.php
app/Http/Controllers/CustomerController.php
+21
-17
ListBook.php
app/ListBook.php
+1
-1
Homestay.blade.php
...es/views/vendor/adminlte/layouts/pages/Homestay.blade.php
+20
-29
scripts.blade.php
...iews/vendor/adminlte/layouts/partialweb/scripts.blade.php
+2
-2
web.php
routes/web.php
+1
-0
No files found.
app/Http/Controllers/CustomerController.php
View file @
7d621d2e
...
@@ -18,6 +18,12 @@ use Psy\Command\ListCommand\ConstantEnumerator;
...
@@ -18,6 +18,12 @@ use Psy\Command\ListCommand\ConstantEnumerator;
class
CustomerController
extends
Controller
class
CustomerController
extends
Controller
{
{
public
function
hitory
(
$id
){
return
view
(
'adminlte::layouts.customers.History'
);
}
public
function
profile
(){
public
function
profile
(){
//dd("masuk agan");
//dd("masuk agan");
//dd(Auth::user()->id);
//dd(Auth::user()->id);
...
@@ -79,7 +85,13 @@ class CustomerController extends Controller
...
@@ -79,7 +85,13 @@ class CustomerController extends Controller
->
where
(
'homestay.id'
,
'='
,
$id
)
->
where
(
'homestay.id'
,
'='
,
$id
)
->
get
();
->
get
();
//dd($data);
//dd($data);
return
view
(
'adminlte::layouts.pages.Homestay'
)
->
with
(
'data'
,
$data
[
0
]);
$daftarBook
=
DB
::
table
(
'daftar_book'
)
->
select
(
'daftar_book.*'
)
->
where
(
'daftar_book.homestay'
,
'='
,
$id
)
->
get
();
return
view
(
'adminlte::layouts.pages.Homestay'
)
->
with
(
'data'
,
$data
[
0
])
->
with
(
'daftarBook'
,
$daftarBook
);
}
}
public
function
updateProfile
(
Request
$request
,
$id
){
public
function
updateProfile
(
Request
$request
,
$id
){
...
@@ -140,27 +152,19 @@ class CustomerController extends Controller
...
@@ -140,27 +152,19 @@ class CustomerController extends Controller
$trans
->
lama_menginap
=
$request
[
'jumlah_hari'
];
$trans
->
lama_menginap
=
$request
[
'jumlah_hari'
];
$trans
->
total_pembayaran
=
$request
[
'jumlah_kamar'
]
*
$data
[
0
]
->
harga
;
$trans
->
total_pembayaran
=
$request
[
'jumlah_kamar'
]
*
$data
[
0
]
->
harga
;
$lb
->
homestay
=
$request
[
'id'
];
$lb
->
nama_pemesan
=
$data2
[
0
]
->
nama
;
$lb
->
tanggal_mulai
=
$request
[
'tanggal'
]
;
$lb
->
tanggal_berakhir
=
$baru
;
$trans
->
save
();
$trans
->
save
();
$lb
->
save
();
return
redirect
()
->
action
(
'CustomerController@detailhomestay'
,
[
'id'
=>
$request
[
'id'
]]
);
// $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
);
}
}
}
}
app/ListBook.php
View file @
7d621d2e
...
@@ -9,7 +9,7 @@ class ListBook extends Model
...
@@ -9,7 +9,7 @@ class ListBook extends Model
protected
$table
=
"daftar_book"
;
protected
$table
=
"daftar_book"
;
protected
$fillable
=
[
protected
$fillable
=
[
'nama_pemesan'
,
'tanggal_mulai'
,
'tanggal_berakhir'
'nama_pemesan'
,
'tanggal_mulai'
,
'tanggal_berakhir'
,
'homestay'
];
];
public
$timestamps
=
false
;
public
$timestamps
=
false
;
...
...
resources/views/vendor/adminlte/layouts/pages/Homestay.blade.php
View file @
7d621d2e
@
extends
(
'adminlte::layouts.master'
)
@
extends
(
'adminlte::layouts.master'
)
@
section
(
'main-content'
)
@
section
(
'main-content'
)
<!--
Banner
-->
<!--
Banner
-->
<
div
class
="
banner
agileits
w3layouts
">
<
div
class
="
banner
agileits
w3layouts
">
...
@@ -18,13 +19,8 @@
...
@@ -18,13 +19,8 @@
<input type="
hidden
" name="
id
" value="
{{
$data
->
id
}}
">
<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
">
<div class="
col
-
md
-
3
col
-
sm
-
3
agileits
w3layouts
contact
-
grid
contact
-
grid
-
2
wow
slideInLeft
">
<input class="
date
agileits
w3layouts
" id="
datepicker1
" type="
text
" value="
Tanggal
Check
in
" onfocus="
this
.
value
=
''
;
" onblur="
if
(
this
.
value
==
''
)
{
this
.
value
=
''
;}
" required="">
<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>
<div class="
col
-
md
-
3
col
-
sm
-
3
agileits
w3layouts
contact
-
grid
contact
-
grid
-
2
wow
slideInLeft
">
<input class="
date
agileits
w3layouts
" id="
datepicker2
" type="
text
" value="
Tanggal
out
" onfocus="
this
.
value
=
''
;
" onblur="
if
(
this
.
value
==
''
)
{
this
.
value
=
''
;}
" required="">
</div>
<div class="
col
-
md
-
2
col
-
sm
-
2
agileits
w3layouts
contact
-
grid
contact
-
grid
-
2
wow
slideInLeft
">
<div class="
col
-
md
-
2
col
-
sm
-
2
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
">
<input type="
text
" class="
text
wow
agileits
w3layouts
slideInLeft
" name="
jumlah_hari
" placeholder="
Lama
Menginap
" required="" style="
background
-
color
:
white
;
color
:
black
">
</div>
</div>
...
@@ -32,13 +28,9 @@
...
@@ -32,13 +28,9 @@
<input type="
text
" class="
text
wow
agileits
w3layouts
slideInLeft
" name="
jumlah_kamar
" placeholder="
Jumlah
Kamar
" required="" style="
background
-
color
:
white
;
color
:
black
">
<input type="
text
" class="
text
wow
agileits
w3layouts
slideInLeft
" name="
jumlah_kamar
" placeholder="
Jumlah
Kamar
" required="" style="
background
-
color
:
white
;
color
:
black
">
</div>
</div>
<div class="
col
-
md
-
2
col
-
sm
-
2
agileits
w3layouts
contact
-
grid
contact
-
grid
-
2
wow
slideInLeft
">
<input type="
submit
" class="
more_btn
wow
agileits
w3layouts
slideInLeft
" value="
Book
Now
">
<a href="" id="
book
" >
<input type="
button
" class="
more_btn
wow
agileits
w3layouts
slideInLeft
" value="
Book
Now
">
</a>
</div>
</form>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -47,42 +39,35 @@
...
@@ -47,42 +39,35 @@
<br><br>
<br><br>
<div class="
details
agilets
w3layouts
"
>
<div class="
details
agilets
w3layouts
">
<h2 style="
margin
-
bottom
:
10
px
;
"> Daftar Booking </h2>
<h2 style="
margin
-
bottom
:
10
px
;
"> Daftar Booking </h2>
<div class="
container
">
<div class="
container
">
<div class="
cuisines
agileits
w3layouts
">
<div class="
cuisines
agileits
w3layouts
">
<div class="
container
">
<div class="
container
">
<table class="
table
table
-
striped
">
<table class="
table
table
-
striped
">
<thead>
<thead>
<tr>
<tr>
<th> No. </th>
<th> Nama Pemesan </th>
<th> No. Rekening </th>
<th> Tanggal Mulai </th>
<th> Atas Nama </th>
<th> Tanggal Berakhir </th>
<th> Total Pembayaran </th>
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
@foreach(
$daftarBook
as
$a
)
<tr>
<tr>
<td>1</td>
<td>
{
{$a->nama_pemesan}
}
</td>
<td>456141923</td>
<td>
{
{$a->tanggal_mulai}
}
</td>
<td>Palti Sinaga</td>
<td>
{
{$a->tanggal_berakhir}
}
</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>
</tr>
@endforeach
</tbody>
</tbody>
</table>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Informations -->
<!-- Informations -->
<div class="
cuisines
agileits
w3layouts
">
<div class="
cuisines
agileits
w3layouts
">
<div class="
container
">
<div class="
container
">
...
@@ -148,12 +133,16 @@
...
@@ -148,12 +133,16 @@
<div class="
col
-
md
-
6
col
-
sm
-
6
agileits
w3layouts
contact
-
grid
contact
-
grid
-
2
wow
slideInLeft
">
<div class="
col
-
md
-
6
col
-
sm
-
6
agileits
w3layouts
contact
-
grid
contact
-
grid
-
2
wow
slideInLeft
">
<h2 style="
margin
-
bottom
:
10
px
;
"> Kritik dan Saran</h2>
<h2 style="
margin
-
bottom
:
10
px
;
"> Kritik dan Saran</h2>
<form action="
#" method="post" style="margin-bottom: 25px;"></form>
<form action="
#" method="post" style="margin-bottom: 25px;"></form>
<
input
type
=
"text"
class
="
text
wow
agileits
w3layouts
slideInLeft
" name="
Name
" placeholder="
Name
" required="">
<
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="">
<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>
<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
">
<input type="
submit
" class="
more_btn
wow
agileits
w3layouts
slideInLeft
" value="
Send
Message
">
</button>
</button>
</form>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -209,4 +198,6 @@
...
@@ -209,4 +198,6 @@
</div>
</div>
</div>
</div>
</div>
@endsection
@endsection
resources/views/vendor/adminlte/layouts/partialweb/scripts.blade.php
View file @
7d621d2e
...
@@ -81,11 +81,11 @@
...
@@ -81,11 +81,11 @@
<script
src=
"{{asset('js/jquery-ui.js')}}"
></script>
<script
src=
"{{asset('js/jquery-ui.js')}}"
></script>
<script>
<script>
$
(
'#datepicker2'
).
datepicker
({
$
(
'#datepicker2'
).
datepicker
({
dateFormat
:
"
dd-M-yy"
dateFormat
:
"
yy-mm-dd"
});
});
$
(
"#datepicker1"
).
datepicker
({
$
(
"#datepicker1"
).
datepicker
({
dateFormat
:
"
dd-M-yy"
,
dateFormat
:
"
yy-mm-dd"
,
minDate
:
0
,
minDate
:
0
,
onSelect
:
function
(
date
){
onSelect
:
function
(
date
){
var
date1
=
$
(
'#datepicker1'
).
datepicker
(
'getDate'
);
var
date1
=
$
(
'#datepicker1'
).
datepicker
(
'getDate'
);
...
...
routes/web.php
View file @
7d621d2e
...
@@ -46,6 +46,7 @@ Route::group(['middleware' => 'auth'], function () {
...
@@ -46,6 +46,7 @@ Route::group(['middleware' => 'auth'], function () {
#adminlte_routes
#adminlte_routes
});
});
Route
::
get
(
'detailhomestay/{id}'
,
'CustomerController@detailhomestay'
);
Route
::
get
(
'detailhomestay/{id}'
,
'CustomerController@detailhomestay'
);
Route
::
get
(
'history/{id}'
,
'CustomerController@hitory'
);
Route
::
get
(
'daftar'
,
'CustomerController@register'
);
Route
::
get
(
'daftar'
,
'CustomerController@register'
);
Route
::
post
(
'daftar'
,
'CustomerController@registerStore'
);
Route
::
post
(
'daftar'
,
'CustomerController@registerStore'
);
Route
::
post
(
'book'
,
'CustomerController@booking'
);
Route
::
post
(
'book'
,
'CustomerController@booking'
);
...
...
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