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
78444b0d
Commit
78444b0d
authored
7 years ago
by
Palti Sinaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qweqwe
parent
e98ea325
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
111 additions
and
62 deletions
+111
-62
AdminController.php
app/Http/Controllers/AdminController.php
+14
-4
PDFController.php
app/Http/Controllers/PDFController.php
+14
-0
p2d4ti06_test.sql
p2d4ti06_test.sql
+0
-0
keramik_pecah.jpg
public/img/keramik_pecah.jpg
+0
-0
adminfasilitas.blade.php
resources/views/pdf/adminfasilitas.blade.php
+50
-0
detailreqFasilitas.blade.php
...endor/adminlte/layouts/admin/detailreqFasilitas.blade.php
+20
-30
listRequestFasilitas.blade.php
...dor/adminlte/layouts/admin/listRequestFasilitas.blade.php
+8
-25
ListPengajuanFasilitas.blade.php
...r/adminlte/layouts/owner/ListPengajuanFasilitas.blade.php
+4
-3
web.php
routes/web.php
+1
-0
No files found.
app/Http/Controllers/AdminController.php
View file @
78444b0d
...
...
@@ -17,6 +17,7 @@ use App\Owner;
use
Illuminate\Support\Facades\DB
;
use
App\RequestFasilitas
;
use
Illuminate\Support\Facades\Auth
;
use
PDF
;
class
AdminController
extends
Controller
{
...
...
@@ -65,7 +66,7 @@ class AdminController extends Controller
return
view
(
'adminlte::layouts.admin.listhomestay'
)
->
with
(
'data'
,
$data
);
}
public
function
cariPesanan
(
Request
$request
){
...
...
@@ -115,9 +116,6 @@ class AdminController extends Controller
}
public
function
resultlistpesanan
(){
}
public
function
Allfeedback
(){
$data
=
DB
::
table
(
'homestay'
)
...
...
@@ -352,6 +350,18 @@ class AdminController extends Controller
return
view
(
'adminlte::layouts.admin.detailreqFasilitas'
)
->
with
(
'data'
,
$data
[
0
])
->
with
(
'count'
,
$count
);
}
public
function
printFasilitas
(
$id
){
$data
=
DB
::
table
(
'pemilikhomestay'
)
->
join
(
'requestfasilitas'
,
'pemilikhomestay.id'
,
'='
,
'requestfasilitas.id_pemilik_homestay'
)
->
join
(
'homestay'
,
'pemilikhomestay.id'
,
'='
,
'homestay.id_pemilik'
)
->
select
(
'pemilikhomestay.nama'
,
'pemilikhomestay.no_telepon'
,
'requestfasilitas.*'
,
'homestay.*'
)
->
where
(
'requestfasilitas.id'
,
'='
,
$id
)
->
get
();
$pdf
=
PDF
::
loadView
(
'pdf.adminfasilitas'
,[
'data'
=>
$data
[
0
]]);
return
$pdf
->
stream
(
'adminfasilitas.pdf'
);
}
//Menolak pengajuan homestay
...
...
This diff is collapsed.
Click to expand it.
app/Http/Controllers/PDFController.php
View file @
78444b0d
...
...
@@ -25,4 +25,18 @@ class PDFController extends Controller
return
$pdf
->
stream
(
'detailpesanan.pdf'
);
//return $pdf->download('detailpesanan.pdf');
}
public
function
printFasilitas
(
$id
){
$dataFasilitas
=
DB
::
table
(
'pemilikhomestay'
)
->
join
(
'requestfasilitas'
,
'pemilikhomestay.id'
,
'='
,
'requestfasilitas.id_pemilik_homestay'
)
->
join
(
'homestay'
,
'pemilikhomestay.id'
,
'='
,
'homestay.id_pemilik'
)
->
select
(
'pemilikhomestay.nama'
,
'pemilikhomestay.no_telepon'
,
'requestfasilitas.*'
,
'homestay.nama_homestay'
)
->
where
(
'requestfasilitas.id'
,
'='
,
$id
)
->
get
();
$pdf
=
PDF
::
loadView
(
'pdf.adminfasilitas'
,[
'data'
=>
$dataFasilitas
[
0
]]);
return
$pdf
->
stream
(
'adminfasilitas.pdf'
);
}
}
This diff is collapsed.
Click to expand it.
p2d4ti06_test.sql
View file @
78444b0d
This diff is collapsed.
Click to expand it.
public/img/keramik_pecah.jpg
0 → 100644
View file @
78444b0d
735 KB
This diff is collapsed.
Click to expand it.
resources/views/pdf/adminfasilitas.blade.php
0 → 100644
View file @
78444b0d
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
>
<title></title>
</head>
<body>
<p
style=
"float:right;"
><b>
Tanggal :
</b>
<?php
echo
date
(
"Y/m/d"
)
;
?>
</p>
<br>
<br>
<br>
<center><h1>
Permintan Fasilitas
</h1></center>
<table
class=
"table table-user-information"
>
<tr>
<th>
Judul Pengajuan
</th>
<td>
:
</td>
<td>
{{$data->nama_request_fasilitas}}
</td>
</tr>
<tr>
<th>
Nama Pengaju
</th>
<td>
:
</td>
<td>
{{$data->nama}}
</td>
</tr>
<tr>
<th>
Nama Homestay
</th>
<td>
:
</td>
<td>
{{$data->nama_homestay}}
</td>
</tr>
<tr>
<th>
Alamat
</th>
<td>
:
</td>
<td>
{{$data->alamat}}
</td>
</tr>
<tr>
<th>
No Telepon
</th>
<td>
:
</td>
<td>
{{$data->no_telepon}}
</td>
</tr>
<tr>
<th>
Keterangan
</th>
<td>
:
</td>
<td>
{{$data->deskripsi}}
</td>
</tr>
</table>
</body>
</html>
This diff is collapsed.
Click to expand it.
resources/views/vendor/adminlte/layouts/admin/detailreqFasilitas.blade.php
View file @
78444b0d
...
...
@@ -57,54 +57,44 @@
<td>: </td>
<td> <a href="
/
img
/
{{
$data
->
gambar
}}
" alt="
Bukti
Pembayaran
" data-lightbox="
roadtrip
"><img src="
/
img
/
{{
$data
->
gambar
}}
" style="
max
-
height
:
200
px
;
"></a></td>
</tr>
<tr>
<th>
Aksi
</th>
<th>
Kirim Pesan
</th>
<td>: </td>
<td>
@if(
$data->status
==1)
<td> <form class="" action="
index
.
html
" method="
post
">
<div class="
form
-
group
">
<div class="
input
-
group
">
<div class="
input
-
group
-
addon
">
<i class="
fa
fa
-
newspaper
-
o
"></i>
</div>
<textarea class="
form
-
control
" placeholder="
Deskripsi
" style="
height
:
200
px
;
" name="
deskripsi
"> </textarea>
</div>
<span id="
errfn2
" style="
color
:
red
"></span>
</div>
</form>
</tr>
<tr>
<th>Aksi</th>
<td> </td>
@if(
$data->status
==1)
@elseif(
$data->status
==2)
@elseif(
$data->status
==0)
<td>
<form action="
{{
url
(
'requestFasilitas/'
.
$data
->
id
)}}
" method="
post
">
{
{csrf_field()}
}
<input type="
hidden
" name="
_method
" value="
PUT
">
<button type="
submit
" class="
btn
btn
-
info
"><i class="
fa
fa
-
check
"> Terima</i></button>
<button type="
submit
" class="
btn
btn
-
danger
"><i class="
fa
fa
-
close
"> Tolak</i></button>
</form>
</td>
<td>
<form action="
{{
url
(
'requestFasilitass/'
.
$data
->
id
)}}
" method="
post
">
{
{csrf_field()}
}
<input type="
hidden
" name="
_method
" value="
PUT
">
<button type="
submit
" class="
btn
btn
-
danger
"><i class="
fa
fa
-
close
"> Tolak</i></button>
</form>
</td>
@endif
</td>
</tr>
</table><br>
<form class="" action="
index
.
html
" method="
post
">
<div class="
form
-
group
">
<label> <b>Kirim Pesan : </b> </label>
<div class="
input
-
group
">
<div class="
input
-
group
-
addon
">
<i class="
fa
fa
-
newspaper
-
o
"></i>
</div>
<textarea class="
form
-
control
" placeholder="
Deskripsi
" style="
height
:
200
px
;
" name="
deskripsi
"> </textarea>
</div>
<span id="
errfn2
" style="
color
:
red
"></span>
</div>
</form>
</div>
<div class="
box
-
footer
">
<form action="
{{
url
(
'p
esanan
/'
.
$data
->
id
)}}
" enctype="
multipart
/
form
-
data
">
<form action="
{{
url
(
'p
rintFasilitas
/'
.
$data
->
id
)}}
" enctype="
multipart
/
form
-
data
">
<div class="
form
-
group
" align="
right
">
<input type="
submit
" class="
btn
btn
-
warning
" value="
Print
">
</div>
...
...
This diff is collapsed.
Click to expand it.
resources/views/vendor/adminlte/layouts/admin/listRequestFasilitas.blade.php
View file @
78444b0d
...
...
@@ -25,45 +25,28 @@
<tr>
<th>Pengaju</th>
<th>Nama Request Fasilitas</th>
<th>Lihat</th>
<th>Gambar</th>
<th
colspan="
2
">Action
</th>
<th
>Lihat
</th>
</tr>
@foreach(
$data
as
$a
)
<tr>
<td>
{
{$a->nama}
}
</td>
<td>
{
{$a->nama_request_fasilitas}
}
</td>
<td><a href="
{{
url
(
'detailreqFasilitas/'
.
$a
->
id
)}}
" class="
btn
btn
-
primary
"><i class="
fa
fa
-
eye
"></i> </a></td>
<td>@if(
$a->gambar
==null)
Tidak ada gambar
@else
Tidak ada gambar
@else
<a href="
img
/
{{
$a
->
gambar
}}
" alt="
Bukti
Pembayaran
" data-lightbox="
roadtrip
"><img src="
img
/
{{
$a
->
gambar
}}
" style="
width
:
250
px
;
height
:
120
px
"></a>
@endif
@endif
</td>
@if(
$a->status
==1)
<td>Di Terima</td>
@elseif(
$a->status
==2)
<td>Ditolak</td>
@elseif(
$a->status
==0)
<td>
<form action="
{{
url
(
'requestFasilitas/'
.
$a
->
id
)}}
" method="
post
">
{
{csrf_field()}
}
<input type="
hidden
" name="
_method
" value="
PUT
">
<button type="
submit
" class="
btn
btn
-
info
"><i class="
glyphicon
glyphicon
-
apple
"> Terima</i></button>
</form>
<td>
<form action="
{{
url
(
'requestFasilitass/'
.
$a
->
id
)}}
" method="
post
">
{
{csrf_field()}
}
<input type="
hidden
" name="
_method
" value="
PUT
">
<button type="
submit
" class="
btn
btn
-
danger
"><i class="
glyphicon
glyphicon
-
trash
"> Tolak</i></button>
</form>
</td>
@endif
<a href="
{{
url
(
'detailreqFasilitas/'
.
$a
->
id
)}}
" class="
btn
btn
-
primary
"><i class="
fa
fa
-
eye
"></i> </a></td>
</td>
</tr>
@endforeach
</table>
{!!
$data->render
() !!}
</div>
</div>
</div>
@endsection
This diff is collapsed.
Click to expand it.
resources/views/vendor/adminlte/layouts/owner/ListPengajuanFasilitas.blade.php
View file @
78444b0d
...
...
@@ -26,19 +26,20 @@
<table class="
table
table
-
striped
">
<tr>
<th>Judul</th>
<th>Keterangan</th>
<th
>Keterangan</th>
<th>Gambar</th>
<th>Status</th>
</tr>
@foreach(
$data
as
$a
)
<tr>
<td>
{
{$a->nama_request_fasilitas}
}
</td>
<td>
{
{$a->deskripsi}
}
</td>
<td
style="
max
-
width
:
200
px
;
"
>
{
{$a->deskripsi}
}
</td>
<td>
@if(
$a->gambar
==null)
Tidak ada gambar
@else
<img alt="
User
Pic
" src="
img
/
{{
$a
->
gambar
}}
" style="
width
:
250
px
;
height
:
120
px
" >
<a href="
img
/
{{
$a
->
gambar
}}
" alt="
Bukti
Pembayaran
" data-lightbox="
roadtrip
"><img src="
img
/
{{
$a
->
gambar
}}
" style="
width
:
250
px
;
height
:
120
px
"></a>
@endif
</td>
<td>@if(
$a->status
==0) Sedang Menunggu
...
...
This diff is collapsed.
Click to expand it.
routes/web.php
View file @
78444b0d
...
...
@@ -140,4 +140,5 @@ Route::group(['middleware' => 'dinaspariwisata'], function () {
Route
::
get
(
'detailreqFasilitas/{id}'
,
'AdminController@detailreqFasilitas'
);
Route
::
get
(
'listhomestay'
,
'AdminController@listhomestay'
);
Route
::
get
(
'resultlistpesanan'
,
'AdminController@listhomestay'
);
Route
::
get
(
'printFasilitas/{id}'
,
'AdminController@printFasilitas'
);
});
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