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
5252f4d5
Commit
5252f4d5
authored
7 years ago
by
Juliper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
repair something in role owner adn customer
parent
311fce17
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
130 additions
and
25 deletions
+130
-25
OwnerController.php
app/Http/Controllers/OwnerController.php
+48
-8
Agar-Keramik-Tidak-Meledak.jpg
public/img/Agar-Keramik-Tidak-Meledak.jpg
+0
-0
bootstrap-datepicker.js
public/js/bootstrap-datepicker.js
+1
-1
listRequestFasilitas.blade.php
...dor/adminlte/layouts/admin/listRequestFasilitas.blade.php
+1
-1
AddBookManual.blade.php
...ews/vendor/adminlte/layouts/owner/AddBookManual.blade.php
+1
-1
ListBooking.blade.php
...views/vendor/adminlte/layouts/owner/ListBooking.blade.php
+61
-0
ListPengajuanFasilitas.blade.php
...r/adminlte/layouts/owner/ListPengajuanFasilitas.blade.php
+1
-1
RequestFasilitas.blade.php
.../vendor/adminlte/layouts/owner/RequestFasilitas.blade.php
+8
-8
listPesanan.blade.php
...views/vendor/adminlte/layouts/owner/listPesanan.blade.php
+2
-2
editprofiles.blade.php
...iews/vendor/adminlte/layouts/pages/editprofiles.blade.php
+4
-2
sidebar.blade.php
.../views/vendor/adminlte/layouts/partials/sidebar.blade.php
+1
-0
mainheader.blade.php
...s/vendor/adminlte/layouts/partialweb/mainheader.blade.php
+1
-1
web.php
routes/web.php
+1
-0
No files found.
app/Http/Controllers/OwnerController.php
View file @
5252f4d5
...
...
@@ -21,6 +21,31 @@ class OwnerController extends Controller
}
public
function
listOfBook
(){
$dataPemilik
=
DB
::
table
(
'pemilikhomestay'
)
->
select
(
'pemilikhomestay.id'
)
->
where
(
'pemilikhomestay.id_Akun'
,
'='
,
Auth
::
user
()
->
id
)
->
get
();
$dataHomestay
=
DB
::
table
(
'homestay'
)
->
join
(
'pemilikhomestay'
,
'homestay.idPemilik'
,
'pemilikhomestay.id'
)
->
select
(
'homestay.id'
)
->
where
(
'pemilikhomestay.id'
,
'='
,
$dataPemilik
[
0
]
->
id
)
->
get
();
$dataListOfBook
=
DB
::
table
(
'daftar_book'
)
->
select
(
'daftar_book.*'
)
->
where
(
'daftar_book.homestay'
,
'='
,
$dataHomestay
[
0
]
->
id
)
->
get
();
//dd('mas',$dataPemilik,$dataHomestay);
//dd('sampai disini dulu');
return
view
(
'adminlte::layouts.owner.ListBooking'
)
->
with
(
'data'
,
$dataListOfBook
)
->
with
(
'count'
,
$dataListOfBook
->
count
());
}
public
function
addBookManual
(
Request
$request
){
$lb
=
new
ListBook
();
...
...
@@ -35,13 +60,19 @@ class OwnerController extends Controller
->
select
(
'homestay.id'
)
->
where
(
'homestay.idPemilik'
,
'='
,
$dataPemilik
[
0
]
->
id
)
->
get
();
dd
(
$dataHomestay
);
$lb
->
homestay
;
$lb
->
nama_pemesan
;
$lb
->
jumlah_kamar
;
$lb
->
tanggal_mulai
;
dd
(
'ooke gan'
);
$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'
);
}
...
...
@@ -117,8 +148,6 @@ class OwnerController extends Controller
->
select
(
'pemilikhomestay.id'
)
->
where
(
'users.id'
,
'='
,
Auth
::
user
()
->
id
)
->
get
();
$data
=
new
RequestFasilitas
();
$data
->
id_pemilik_homestay
=
$idPemilik
[
0
]
->
id
;
...
...
@@ -127,8 +156,19 @@ class OwnerController extends Controller
$data
->
deskripsi
=
$request
[
'deskripsi'
];
$data
->
jumlah
=
$request
[
'jumlah'
];
if
(
$request
->
file
(
'gambar'
)
==
null
){
$data
->
gambar
=
$data
->
gambar
;
}
else
{
$file
=
$request
->
file
(
'gambar'
);
$fileName
=
$file
->
getClientOriginalName
();
$request
->
file
(
'gambar'
)
->
move
(
"img/"
,
$fileName
);
$data
->
gambar
=
$fileName
;
}
$data
->
save
();
return
redirect
(
'listPengajuanFasilitas'
);
}
public
function
pengajuan
(){
...
...
This diff is collapsed.
Click to expand it.
public/img/Agar-Keramik-Tidak-Meledak.jpg
0 → 100644
View file @
5252f4d5
39.4 KB
This diff is collapsed.
Click to expand it.
public/js/bootstrap-datepicker.js
View file @
5252f4d5
...
...
@@ -1396,7 +1396,7 @@
daysOfWeekDisabled
:
[],
endDate
:
Infinity
,
forceParse
:
true
,
format
:
'yy
/mm/
dd'
,
format
:
'yy
-mm-
dd'
,
keyboardNavigation
:
true
,
language
:
'en'
,
minViewMode
:
0
,
...
...
This diff is collapsed.
Click to expand it.
resources/views/vendor/adminlte/layouts/admin/listRequestFasilitas.blade.php
View file @
5252f4d5
...
...
@@ -50,7 +50,7 @@
<td>@if(
$a->gambar
==null)
<img alt="
Gambar
Tidak
Ada
" class="
img
-
circle
img
-
responsive
">
@else
<img alt="
User
Pic
" src="
img
/
{{
$
data
->
gambar
}}
" class="
img
-
circle
img
-
responsive
">
<img alt="
User
Pic
" src="
img
/
{{
$
a
->
gambar
}}
" style="
width
:
250
px
;
height
:
120
px
">
@endif
</td>
@if(
$a->status
==1)
...
...
This diff is collapsed.
Click to expand it.
resources/views/vendor/adminlte/layouts/owner/AddBookManual.blade.php
View file @
5252f4d5
...
...
@@ -49,7 +49,7 @@
<div class="
input
-
group
-
addon
">
<i class="
fa
fa
-
calendar
"></i>
</div>
<input type="
text
" class="
form
-
control
datepicker
" id="
datepicker
">
<input type="
text
"
name="
tanggal_mulai
"
class="
form
-
control
datepicker
" id="
datepicker
">
</div>
<!-- /.input group -->
</div>
...
...
This diff is collapsed.
Click to expand it.
resources/views/vendor/adminlte/layouts/owner/ListBooking.blade.php
0 → 100644
View file @
5252f4d5
@
extends
(
'adminlte::layouts.app'
)
@
section
(
'htmlheader_title'
)
{{
trans
(
'adminlte_lang::message.home'
)
}}
@
endsection
@
section
(
'main-content'
)
<
div
class
="
box
box
-
warning
">
<div class="
box
-
header
with
-
border
">
<h3 class="
box
-
title
"> Daftar Booked </h3>
@if(Session::has('alert-success'))
<div class="
alert
alert
-
success
">
{{ Session::get('alert-success') }}
</div>
@endif
@if (count(
$errors
) > 0)
<div class="
alert
alert
-
danger
">
<ul>
@foreach (
$errors->all
() as
$error
)
<li>{{
$error
}}</li>
@endforeach
</ul>
</div>
@endif
</div>
<div class="
box
-
body
">
<div class="
col
-
md
-
4
col
-
sm
-
6
col
-
xs
-
12
">
<div class="
info
-
box
bg
-
yellow
">
<span class="
info
-
box
-
icon
"><i class="
glyphicon
glyphicon
glyphicon
-
list
-
alt
"></i></span>
<div class="
info
-
box
-
content
">
<span class="
info
-
box
-
text
">Daftar Booked</span>
<span class="
info
-
box
-
number
">
{
{$count}
}
</span>
</div>
<!-- /.info-box-content -->
</div>
<!-- /.info-box -->
</div>
<br>
<table class="
table
table
-
striped
">
<tr>
<th>Nama Pelanggan</th>
<th>Tanggal Mulai</th>
<th>Tanggal Berakhir</th>
<th>Jumlah Kamar</th>
</tr>
@foreach(
$data
as
$a
)
<tr>
<td>
{
{$a->nama_pemesan}
}
</td>
<td>
{
{$a->tanggal_mulai}
}
</td>
<td>
{
{$a->tanggal_berakhir}
}
</td>
<td>
{
{$a->jumlah_kamar}
}
</td>
</tr>
@endforeach
</table>
</div>
</div>
@endsection
This diff is collapsed.
Click to expand it.
resources/views/vendor/adminlte/layouts/owner/ListPengajuanFasilitas.blade.php
View file @
5252f4d5
...
...
@@ -53,7 +53,7 @@
@if(
$a->gambar
==null)
<img alt="
Gambar
Tidak
Ada
" class="
img
-
circle
img
-
responsive
">
@else
<img alt="
User
Pic
" src="
img
/
{{
$
data
->
gambar
}}
" class="
img
-
circle
img
-
responsive
"
>
<img alt="
User
Pic
" src="
img
/
{{
$
a
->
gambar
}}
" style="
width
:
250
px
;
height
:
120
px
"
>
@endif
</td>
<td>@if(
$a->status
==0) Sedang Menunggu
...
...
This diff is collapsed.
Click to expand it.
resources/views/vendor/adminlte/layouts/owner/RequestFasilitas.blade.php
View file @
5252f4d5
...
...
@@ -27,9 +27,8 @@
@endif
</div>
<div class="
box
-
body
">
<form action="
{{
url
(
'reqFasilitas'
)
}}
" method="
post
">
<form action="
{{
url
(
'reqFasilitas'
)
}}
" method="
post
"
enctype="
multipart
/
form
-
data
"
>
<input type="
hidden
" name="
_token
" value="
{{
csrf_token
()
}}
">
<div class="
form
-
group
">
<label> Judul </label>
<div class="
input
-
group
">
...
...
@@ -74,12 +73,13 @@
</div>
<!-- <select name="
id_kategoriFasiltas
" class="">
<option value=1> Kamar Tidur </option>
<option value=2> Perlatan Kamar Mandi </option>
</select> -->
{{--<input id="
role
" class="
form
-
control
" name="
role
" required>--}}
<br>
<div class="
form
-
group
">
<label>Foto</label>
<div class="
input
-
group
">
<input type="
file
" name="
gambar
" id="
foto
" class="
form
-
corol
"><br>
</div>
</div>
<div class="
form
-
group
" align="
right
" style="
color
:
black
;
">
<button type="
submit
" class="
btn
btn
-
primary
">Ajukan</button>
</div>
...
...
This diff is collapsed.
Click to expand it.
resources/views/vendor/adminlte/layouts/owner/listPesanan.blade.php
View file @
5252f4d5
...
...
@@ -7,7 +7,7 @@
@
section
(
'main-content'
)
<
div
class
="
box
box
-
warning
">
<div class="
box
-
header
with
-
border
">
<h3 class="
box
-
title
">
FASILITAS
</h3>
<h3 class="
box
-
title
">
Daftar Pesanan
</h3>
@if(Session::has('alert-success'))
<div class="
alert
alert
-
success
">
{{ Session::get('alert-success') }}
...
...
@@ -30,7 +30,7 @@
<span class="
info
-
box
-
icon
"><i class="
glyphicon
glyphicon
glyphicon
-
list
-
alt
"></i></span>
<div class="
info
-
box
-
content
">
<span class="
info
-
box
-
text
">DaftarPesanan</span>
<span class="
info
-
box
-
text
">Daftar
Pesanan</span>
<span class="
info
-
box
-
number
">
{
{$count}
}
</span>
</div>
<!-- /.info-box-content -->
...
...
This diff is collapsed.
Click to expand it.
resources/views/vendor/adminlte/layouts/pages/editprofiles.blade.php
View file @
5252f4d5
...
...
@@ -37,13 +37,14 @@
</div>
<div class="
form
-
group
" align="
right
">
<div class="
col
-
sm
-
12
">
<input type="
submit
" class="
btn
btn
-
primary
">
</input>
<input type="
submit
" class="
btn
btn
-
primary
">
</div>
</div>
</div>
</form>
</div>
</div>
</div>
@endsection
\ No newline at end of file
This diff is collapsed.
Click to expand it.
resources/views/vendor/adminlte/layouts/partials/sidebar.blade.php
View file @
5252f4d5
...
...
@@ -60,6 +60,7 @@
<li
class=
"treeview"
><a
href=
"#"
><i
class=
'fa fa-inbox'
></i>
<span>
PESANAN
</span></a>
<ul
class=
"treeview-menu"
style=
"display : none;"
>
<li><a
href=
"{{url('pesanan')}}"
><i
class=
'fa fa-list'
></i>
<span>
Daftar Pesanan
</span></a></li>
<li><a
href=
"{{url('daftarBooking')}}"
><i
class=
'fa fa-list'
></i>
<span>
Daftar Booked
</span></a></li>
<li><a
href=
"{{url('AddBook')}}"
><i
class=
'fa fa-plus'
></i>
<span>
Tambah Pesanan Manual
</span></a></li>
</ul>
</li>
...
...
This diff is collapsed.
Click to expand it.
resources/views/vendor/adminlte/layouts/partialweb/mainheader.blade.php
View file @
5252f4d5
...
...
@@ -25,7 +25,7 @@
<!-- User Account Menu -->
<li
class=
"dropdown user user-menu"
>
<!-- Menu Toggle Button -->
<a
href=
"#"
class=
"dropdown-toggle"
data-toggle=
"dropdown"
>
<!-- The user image in the navbar-->
{{--
<img
src=
"{{ Gravatar::get($user->email) }}"
class=
"user-image"
alt=
"User Image"
/>
--}}
<!-- hidden-xs hides the username on small devices so only the image appears. -->
...
...
This diff is collapsed.
Click to expand it.
routes/web.php
View file @
5252f4d5
...
...
@@ -60,6 +60,7 @@ Route::put('editRoom/{id}','OwnerController@updateRoom');
Route
::
post
(
'addManual'
,
'OwnerController@addBookManual'
);
Route
::
get
(
'editRoom/{id}'
,
'OwnerController@editRoom'
)
;
Route
::
get
(
'daftarBooking'
,
'OwnerController@listOfBook'
);
Route
::
get
(
'daftarKamar'
,
'OwnerController@daftarKamar'
);
Route
::
get
(
'pesanan'
,
'OwnerController@listTransaction'
);
Route
::
put
(
'upload/{id}'
,
'CustomerController@upload'
);
...
...
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