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
56651a82
Commit
56651a82
authored
Jun 20, 2017
by
Juliper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
final
parent
e7605eba
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
283 additions
and
59 deletions
+283
-59
AdminController.php
app/Http/Controllers/AdminController.php
+6
-10
GuestController.php
app/Http/Controllers/GuestController.php
+2
-2
OwnerController.php
app/Http/Controllers/OwnerController.php
+66
-6
Transaksi.php
app/Transaksi.php
+1
-1
rincianHistory.blade.php
resources/views/pdf/rincianHistory.blade.php
+1
-1
dataPemesanan.blade.php
...ews/vendor/adminlte/layouts/admin/dataPemesanan.blade.php
+2
-0
listRequestFasilitas.blade.php
...dor/adminlte/layouts/admin/listRequestFasilitas.blade.php
+18
-2
resultlistpesanan.blade.php
...vendor/adminlte/layouts/admin/resultlistpesanan.blade.php
+39
-3
History.blade.php
...views/vendor/adminlte/layouts/customers/History.blade.php
+1
-1
rincianpemesanan.blade.php
...dor/adminlte/layouts/customers/rincianpemesanan.blade.php
+7
-2
ListPengajuanFasilitas.blade.php
...r/adminlte/layouts/owner/ListPengajuanFasilitas.blade.php
+19
-1
Report.blade.php
...rces/views/vendor/adminlte/layouts/owner/Report.blade.php
+24
-3
detailpesanan.blade.php
...ews/vendor/adminlte/layouts/owner/detailpesanan.blade.php
+67
-2
listPesanan.blade.php
...views/vendor/adminlte/layouts/owner/listPesanan.blade.php
+27
-24
web.php
routes/web.php
+3
-1
No files found.
app/Http/Controllers/AdminController.php
View file @
56651a82
...
...
@@ -64,13 +64,9 @@ class AdminController extends Controller
}
public
function
cariPesanan
(
Request
$request
){
$dataHomestay
=
Homestay
::
where
(
'nama_homestay'
,
$request
[
'nama_homestay'
])
->
get
();
// $asd = Transaksi::all()->where('status',1);
//dd($asd);
//dd($request['bulan']);
$homestay
=
DB
::
table
(
'homestay'
)
->
get
();
//dd($homestay);
if
(
$request
[
'bulan'
]
==
null
){
$dataHos
=
DB
::
table
(
'daftar_book'
)
->
join
(
'transaksi'
,
'daftar_book.id_transaksi'
,
'='
,
'transaksi.id'
)
...
...
@@ -85,7 +81,7 @@ class AdminController extends Controller
->
where
(
'daftar_book.id_transaksi'
,
'='
,
null
)
->
select
(
'homestay.nama_homestay'
,
'homestay.owner'
,
'daftar_book.*'
)
->
get
();
//dd('masuk');
$penghasilan
=
0
;
foreach
(
$dataHos
as
$a
){
$penghasilan
+=
$a
->
total_pembayaran
;
...
...
@@ -99,7 +95,7 @@ class AdminController extends Controller
return
view
(
'adminlte::layouts.admin.resultlistpesanan'
)
->
with
(
'data'
,
$dataHos
)
->
with
(
'data2'
,
$dataHos2
)
->
with
(
'penghasilan'
,
$penghasilan
);
->
with
(
'penghasilan'
,
$penghasilan
)
->
with
(
'homestay'
,
$homestay
)
;
}
else
{
$data
=
DB
::
table
(
'daftar_book'
)
...
...
@@ -131,10 +127,10 @@ class AdminController extends Controller
}
//dd($data,$data2,$penghasilan);
//dd($homestay);
//dd($data2);
return
view
(
'adminlte::layouts.admin.resultlistpesanan'
)
->
with
(
'data'
,
$data
)
->
with
(
'data2'
,
$data2
)
->
with
(
'penghasilan'
,
$penghasilan
);
->
with
(
'penghasilan'
,
$penghasilan
)
->
with
(
'homestay'
,
$homestay
)
;
}
}
...
...
app/Http/Controllers/GuestController.php
View file @
56651a82
...
...
@@ -122,7 +122,7 @@ class GuestController extends Controller
public
function
rincianpemesanan
(
Request
$request
,
$id
){
if
(
Auth
::
guest
()){
return
redirect
(
'login'
)
->
with
(
'message'
,
'Anda Harus Login dulu
!!
'
);
return
redirect
(
'login'
)
->
with
(
'message'
,
'Anda Harus Login dulu'
);
}
else
{
$dataUser
=
DB
::
table
(
'pelanggan'
)
->
where
(
'pelanggan.id_Akun'
,
'='
,
Auth
::
user
()
->
id
)
...
...
@@ -140,7 +140,7 @@ class GuestController extends Controller
public
function
sendFeedback
(
Request
$request
,
$id
){
if
(
Auth
::
guest
()){
return
redirect
()
->
action
(
'GuestController@detailhomestay'
,
[
'id'
=>
$id
])
->
with
(
'message'
,
'Anda Harus Login Dulu
!!
'
);
return
redirect
()
->
action
(
'GuestController@detailhomestay'
,
[
'id'
=>
$id
])
->
with
(
'message'
,
'Anda Harus Login Dulu'
);
//dd("maaf nggak bisa bang");
}
...
...
app/Http/Controllers/OwnerController.php
View file @
56651a82
...
...
@@ -19,25 +19,73 @@ use PDF;
class
OwnerController
extends
Controller
{
public
function
__construct
(){
$this
->
middleware
(
'auth'
);
$this
->
middleware
(
'owner'
);
}
public
function
batalkan
(
Request
$request
){
//dd('masuk');
$data
=
Transaksi
::
find
(
$request
[
'requestID'
]);
DB
::
table
(
'daftar_book'
)
->
where
(
'tanggal_mulai'
,
'='
,
$data
->
tanggal_mulai
)
->
delete
();
$data
->
pesan
=
$request
[
'pesan'
];
$data
->
status
=
2
;
$data
->
update
();
}
public
function
Report
(
Request
$request
){
//dd('masuk');
return
redirect
()
->
action
(
'OwnerController@findReport'
,
[
'id'
=>
$request
[
'bulan'
]]);
//dd('masuk',$request['tahun']);
if
(
$request
[
'tahun'
]
==
null
){
return
redirect
()
->
action
(
'OwnerController@dfindReport'
,
[
'id'
=>
$request
[
'bulan'
]]);
}
else
{
return
redirect
()
->
action
(
'OwnerController@findReport'
,[
'id'
=>
$request
[
'bulan'
]
,
'tahun'
=>
$request
[
'tahun'
]]);
}
//return redirect()->action('OwnerController@findReport', ['id' => $request['bulan']]);
//return redirect('report/{id}',$request['bulan']);
//dd($dataHomestay,$request['bulan'],$dataPesanan,$penghasilan);
}
public
function
findReport
(
$id
,
$tahun
){
//dd('masuk');
$dataHomestay
=
DB
::
table
(
'homestay'
)
->
join
(
'pemilikhomestay'
,
'homestay.id_pemilik'
,
'='
,
'pemilikhomestay.id'
)
->
where
(
'pemilikhomestay.id_akun'
,
'='
,
Auth
::
user
()
->
id
)
->
select
(
'homestay.id'
)
->
get
();
$dataPesanan
=
DB
::
table
(
'daftar_book'
)
->
where
(
'daftar_book.homestay'
,
'='
,
$dataHomestay
[
0
]
->
id
)
->
whereMonth
(
'daftar_book.tanggal_mulai'
,
'='
,
$id
)
->
whereYear
(
'daftar_book.tanggal_mulai'
,
$tahun
)
->
get
();
$penghasilan
=
0
;
$jumlah_tamu
=
0
;
foreach
(
$dataPesanan
as
$a
){
$penghasilan
+=
$a
->
total_harga
;
$jumlah_tamu
+=
$a
->
jumlah_tamu
;
}
return
view
(
'adminlte::layouts.owner.Report'
)
->
with
(
'data'
,
$dataPesanan
)
->
with
(
'penghasilan'
,
$penghasilan
)
->
with
(
'jumlahTamu'
,
$jumlah_tamu
);
}
public
function
printReport
(
Request
$request
){
//
dd('masuk',$request['bulan']);
dd
(
'masuk'
,
$request
[
'bulan'
]);
$dataHomestay
=
DB
::
table
(
'homestay'
)
->
join
(
'pemilikhomestay'
,
'homestay.id_pemilik'
,
'='
,
'pemilikhomestay.id'
)
...
...
@@ -62,7 +110,8 @@ class OwnerController extends Controller
$pdf
->
stream
(
'reportOwner.pdf'
);
}
public
function
findReport
(
$id
){
public
function
dfindReport
(
$id
){
//dd('disini aja');
$dataHomestay
=
DB
::
table
(
'homestay'
)
->
join
(
'pemilikhomestay'
,
'homestay.id_pemilik'
,
'='
,
'pemilikhomestay.id'
)
->
where
(
'pemilikhomestay.id_akun'
,
'='
,
Auth
::
user
()
->
id
)
...
...
@@ -89,7 +138,7 @@ class OwnerController extends Controller
//$//path = window.location.pathname;
//dd($request['bulan']);
//dd($request['bulan']
,$request['tahun']
);
$dataHomestay
=
DB
::
table
(
'homestay'
)
->
join
(
'pemilikhomestay'
,
'homestay.id_pemilik'
,
'='
,
'pemilikhomestay.id'
)
...
...
@@ -97,10 +146,20 @@ class OwnerController extends Controller
->
select
(
'homestay.id'
,
'homestay.nama_homestay'
)
->
get
();
//dd($dataHomestay[0]->nama_homestay);
if
(
$request
[
'tahun'
==
null
]){
$dataPesanan
=
DB
::
table
(
'daftar_book'
)
->
where
(
'daftar_book.homestay'
,
'='
,
$dataHomestay
[
0
]
->
id
)
->
whereMonth
(
'daftar_book.tanggal_mulai'
,
'='
,
$request
[
'bulan'
])
->
get
();
}
else
{
$dataPesanan
=
DB
::
table
(
'daftar_book'
)
->
where
(
'daftar_book.homestay'
,
'='
,
$dataHomestay
[
0
]
->
id
)
->
whereMonth
(
'daftar_book.tanggal_mulai'
,
'='
,
$request
[
'bulan'
])
->
whereYear
(
'daftar_book.tanggal_mulai'
,
'='
,
$request
[
'bulan'
])
->
get
();
}
$penghasilan
=
0
;
$jumlah_tamu
=
0
;
...
...
@@ -154,7 +213,7 @@ class OwnerController extends Controller
$dataTrans
=
DB
::
table
(
'transaksi'
)
->
join
(
'pelanggan'
,
'transaksi.id_pelanggan'
,
'='
,
'pelanggan.id'
)
->
select
(
'transaksi.total_pembayaran'
,
'transaksi.bukti_pembayaran'
,
'transaksi.tanggal_mulai'
,
'transaksi.id'
,
'transaksi.tanggal_berakhir'
,
'transaksi.jumlah_kamar'
,
'transaksi.lama_menginap'
,
'pelanggan.nama'
,
'pelanggan.no_telepon'
)
->
select
(
'transaksi.
status'
,
'transaksi.
total_pembayaran'
,
'transaksi.bukti_pembayaran'
,
'transaksi.tanggal_mulai'
,
'transaksi.id'
,
'transaksi.tanggal_berakhir'
,
'transaksi.jumlah_kamar'
,
'transaksi.lama_menginap'
,
'pelanggan.nama'
,
'pelanggan.no_telepon'
)
->
where
(
'transaksi.id'
,
'='
,
$id
)
->
get
();
...
...
@@ -363,6 +422,7 @@ class OwnerController extends Controller
DB
::
table
(
'daftar_book'
)
->
where
(
'tanggal_mulai'
,
'='
,
$data
->
tanggal_mulai
)
->
delete
();
$data
->
status
=
$request
[
'konfirmasi'
];
$data
->
pesan
=
$request
[
'pesan'
];
}
$data
->
update
();
...
...
app/Transaksi.php
View file @
56651a82
...
...
@@ -9,7 +9,7 @@ class Transaksi extends Model
protected
$table
=
"transaksi"
;
protected
$fillable
=
[
'extrabed'
,
'tanggal_konfirmasi'
,
'jumlah_tamu'
,
'permintaan_khusus'
,
'id_pelanggan'
,
'tanggal_mulai'
,
'tanggal_berakhir'
,
'lama_menginap'
,
'total_pembayaran'
,
'tanggal_konfirmasi'
,
'status'
,
'
pesan'
,
'
extrabed'
,
'tanggal_konfirmasi'
,
'jumlah_tamu'
,
'permintaan_khusus'
,
'id_pelanggan'
,
'tanggal_mulai'
,
'tanggal_berakhir'
,
'lama_menginap'
,
'total_pembayaran'
,
'tanggal_konfirmasi'
,
'status'
,
];
public
$timestamps
=
false
;
...
...
resources/views/pdf/rincianHistory.blade.php
View file @
56651a82
...
...
@@ -41,7 +41,7 @@
<tr>
<th>
Total Pembayaran
</th>
<td>
:
</td>
<td>
{{$data->total_pembayaran
}}
</td>
<td>
Rp {{number_format($data->total_pembayaran)
}}
</td>
</tr>
<tr>
<th>
Bukti pembayaran
</th>
...
...
resources/views/vendor/adminlte/layouts/admin/dataPemesanan.blade.php
View file @
56651a82
...
...
@@ -24,6 +24,8 @@
<div class="
form
-
group
" align="
left
">
<label>Bulan</label>
<input type="
number
" min="
1
" max="
12
" name="
bulan
">
<label>Tahun</label>
<input type="
number
" min="
1
" max="
12
" name="
bulan
">
<label>Nama Homestay</label>
<!-- <input type="
text
" name="
nama_homestay
"> -->
<select class="" name="
nama_homestay
">
...
...
resources/views/vendor/adminlte/layouts/admin/listRequestFasilitas.blade.php
View file @
56651a82
...
...
@@ -21,7 +21,8 @@
</div>
<div class="
box
-
body
">
<table class="
table
table
-
striped
">
<table id="
example2
" class="
table
table
-
bordered
table
-
hover
">
<thead>
<tr>
<th>Pengaju</th>
<th>Nama Request Fasilitas</th>
...
...
@@ -29,6 +30,8 @@
<th>Status</th>
<th>Lihat</th>
</tr>
</thead>
<tbody>
@foreach(
$data
as
$a
)
<tr>
<td>
{
{$a->nama}
}
</td>
...
...
@@ -50,13 +53,26 @@
</td>
</tr>
@endforeach
</tbody>
</table>
{!!
$data->render
() !!}
</div>
</div>
<script>
$(function () {
$("
#example1").DataTable();
$
(
'#example2'
)
.
DataTable
({
"paging"
:
true
,
"lengthChange"
:
false
,
"searching"
:
false
,
"ordering"
:
true
,
"info"
:
true
,
"autoWidth"
:
false
});
});
</
script
>
@
endsection
resources/views/vendor/adminlte/layouts/admin/resultlistpesanan.blade.php
View file @
56651a82
...
...
@@ -7,7 +7,26 @@
@
section
(
'main-content'
)
<
div
class
="
box
box
-
warning
">
<div class="
box
-
header
with
-
border
">
<h3 class="
box
-
title
"> DATA PEMESANAN </h3>
<form action="
{{
url
(
'caripesanan'
)}}
">
<div class="
form
-
group
" align="
left
">
<label>Bulan</label>
<input type="
number
" min="
1
" max="
12
" name="
bulan
">
<label>Tahun</label>
<input type="
number
" min="
1
" max="
12
" name="
bulan
">
<label>Nama Homestay</label>
<!-- <input type="
text
" name="
nama_homestay
"> -->
<select class="" name="
nama_homestay
">
@foreach(
$homestay
as
$h
)
<option value="
{{
$h
->
nama_homestay
}}
">
{
{$h->nama_homestay}
}
</option>
@endforeach
</select>
<input type="
submit
" class="
btn
btn
-
warning
" value="
Cari
" >
</div>
</form>
@if (count(
$errors
) > 0)
<div class="
alert
alert
-
danger
">
<strong>Whoops!</strong> {{ trans('adminlte_lang::message.someproblems') }}<br><br>
...
...
@@ -26,7 +45,8 @@
</div>
</form> -->
<table class="
table
table
-
striped
">
<table id="
example2
" class="
table
table
-
bordered
table
-
hover
">
<thead>
<tr>
<th>Nama Homestay</th>
<th>Nama Pemilik Homestay</th>
...
...
@@ -36,6 +56,8 @@
<th>Jumlah Kamar yang dipesan</th>
<th>Total Harga</th>
</tr>
</thead>
<tbody>
@foreach(
$data
as
$a
)
<tr>
<td>
{
{$a->nama_homestay}
}
</td>
...
...
@@ -47,6 +69,8 @@
<td>
{
{$a->total_harga}
}
</td>
</tr>
@endforeach
</tbody>
<tbody>
@foreach(
$data2
as
$c
)
<tr>
<td>
{
{$c->nama_homestay}
}
</td>
...
...
@@ -58,7 +82,7 @@
<td>
{
{$c->total_harga}
}
</td>
</tr>
@endforeach
</tbody>
<tr>
<td>Total</td>
<td></td>
...
...
@@ -75,5 +99,17 @@
</div>
</div>
<script>
$(function () {
$("
#example1").DataTable();
$
(
'#example2'
)
.
DataTable
({
"paging"
:
true
,
"lengthChange"
:
false
,
"searching"
:
false
,
"ordering"
:
true
,
"info"
:
true
,
"autoWidth"
:
false
});
});
</
script
>
@
endsection
resources/views/vendor/adminlte/layouts/customers/History.blade.php
View file @
56651a82
...
...
@@ -23,7 +23,7 @@
<tr>
<td>
{
{$a->no_rekening}
}
</td>
<td>
{
{$a->nama}
}
</td>
<td>
{
{$a->total_pembayaran
}
}
</td>
<td>
Rp
{
{number_format($a->total_pembayaran)
}
}
</td>
<td>
{
{$a->tanggal_mulai}
}
</td>
<td>
{
{$a->tanggal_berakhir}
}
</td>
<td>
...
...
resources/views/vendor/adminlte/layouts/customers/rincianpemesanan.blade.php
View file @
56651a82
...
...
@@ -110,12 +110,17 @@
<
tr
>
<
td
>
Harga
Kamar
</
td
>
<
td
>:</
td
>
<
td
>
{{
$data
->
harga
}}
</
td
>
<
td
>
Rp
{{
number_format
(
$data
->
harga
)}}
</
td
>
</
tr
>
<
tr
>
<
td
>
Harga
extra
bed
</
td
>
<
td
>:</
td
>
<
td
>
Rp
{{
number_format
(
30000
)}}
</
td
>
</
tr
>
<
tr
>
<
td
>
Total
Bayar
</
td
>
<
td
>:</
td
>
<
td
><
input
type
=
"text"
id
=
"tot_har"
name
=
"total_harga"
value
=
"
{
{$totalHarga
}
}
"
disabled
></
td
>
<
td
><
input
type
=
"text"
id
=
"tot_har"
name
=
"total_harga"
value
=
"
Rp
{
{number_format($totalHarga)
}
}
"
disabled
></
td
>
</
tr
>
</
table
>
<
br
>
...
...
resources/views/vendor/adminlte/layouts/owner/ListPengajuanFasilitas.blade.php
View file @
56651a82
...
...
@@ -23,7 +23,8 @@
<!-- <div class="
col
-
md
-
4
col
-
sm
-
6
col
-
xs
-
12
">
</div> -->
<table class="
table
table
-
striped
">
<table id="
example2
" class="
table
table
-
bordered
table
-
hover
">
<thead>
<tr>
<th>Judul</th>
<th >Keterangan</th>
...
...
@@ -32,6 +33,8 @@
<th>Alasan</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach(
$data
as
$a
)
<tr>
<td>
{
{$a->nama_request_fasilitas}
}
</td>
...
...
@@ -65,8 +68,23 @@
</td>
</tr>
@endforeach
</tbody>
</table>
{!!
$data->render
() !!}
</div>
</div>
<script>
$(function () {
$("
#example1").DataTable();
$
(
'#example2'
)
.
DataTable
({
"paging"
:
true
,
"lengthChange"
:
false
,
"searching"
:
false
,
"ordering"
:
true
,
"info"
:
true
,
"autoWidth"
:
false
});
});
</
script
>
@
endsection
resources/views/vendor/adminlte/layouts/owner/Report.blade.php
View file @
56651a82
...
...
@@ -13,7 +13,9 @@
<div class="
box
-
body
">
<form action="
{{
url
(
'report'
)}}
">
<label>Bulan</label>
<input type="
number
" min="
1
" onchange="
updateVal
(
this
)
" max="
12
" name="
bulan
" required >
<input type="
number
" min="
1
" onchange="
updateVal
(
this
)
" max="
12
" name="
bulan
" required>
<label>Tahun</label>
<input type="
number
" min="
2010
" onchange="
updateVal
(
this
)
" name="
tahun
" required>
<input type="
submit
" value="
Cari
" class="
btn
-
btn
info
">
</form>
...
...
@@ -22,6 +24,7 @@
<form action="
{{
url
(
'printReportOwner'
)}}
" enctype="
multipart
/
form
-
data
" style="
float
:
right
;
">
<div class="
form
-
group
" align="
right
">
<input type="
number
" hidden value="
{{
Request
::
segment
(
2
)}}
" min="
1
" max="
12
" name="
bulan
" display="
none
" required >
<input type="
number
" hidden value="
{{
Request
::
segment
(
3
)}}
" min="
2010
" name="
tahun
" display="
none
" required >
<input type="
submit
" class="
btn
btn
-
warning
" value="
Print
">
</div>
</form>
...
...
@@ -32,9 +35,10 @@
<H2>Data Tidak Ada</H2>
@else
<table class="
table
">
<table id="
example2
" class="
table
table
-
bordered
table
-
hover
">
<thead>
<tr>
<t
d></td
>
<t
h></th
>
<th>Nama Pemesan</th>
<th>Jumlah Kamar</th>
<th>Jumlah Tamu</th>
...
...
@@ -44,6 +48,8 @@
<th>Tanggal Berakhir</th>
<th>Total Harga</th>
</tr>
</thead>
<tbody>
@foreach(
$data
as
$a
)
<tr>
<td></td>
...
...
@@ -57,6 +63,7 @@
<td><Rp></Rp>
{
{number_format($a->total_harga,0)}
}
</td>
</tr>
@endforeach
</tbody>
<tr>
<td>Total</td>
<td></td>
...
...
@@ -83,6 +90,20 @@
{
{--</script>--}
}
<script>
$(function () {
$("
#example1").DataTable();
$
(
'#example2'
)
.
DataTable
({
"paging"
:
true
,
"lengthChange"
:
false
,
"searching"
:
false
,
"ordering"
:
true
,
"info"
:
true
,
"autoWidth"
:
false
});
});
</
script
>
<
script
>
function
cancelRequest
()
{
$
.
ajax
({
data
:
{
...
...
resources/views/vendor/adminlte/layouts/owner/detailpesanan.blade.php
View file @
56651a82
...
...
@@ -24,7 +24,7 @@
</div>
@endif
</div>
<div class="
col
-
md
-
1
0
box
-
body
">
<div class="
col
-
md
-
1
1
box
-
body
">
<table class="
table
table
-
user
-
information
">
<tr>
<th>Nama Pemesan</th>
...
...
@@ -59,7 +59,44 @@
<tr>
<th>Bukti Pembayaran</th>
<td>: </td>
<td><a href="
/
img
/
{{
$data
->
bukti_pembayaran
}}
" alt="
Bukti
Pembayaran
" data-lightbox="
roadtrip
"><img src="
/
img
/
{{
$data
->
bukti_pembayaran
}}
" style="
max
-
width
:
200
px
;
" ></a></td>
<td>
@if(
$data->bukti_pembayaran
==null)
Bukti pembayaran tidak ada
@else
<a href="
/
img
/
{{
$data
->
bukti_pembayaran
}}
" alt="
Bukti
Pembayaran
" data-lightbox="
roadtrip
"><img src="
/
img
/
{{
$data
->
bukti_pembayaran
}}
" style="
max
-
height
:
150
px
;
width
:
200
px
;
"></a>
@endif
</td>
</tr>
<tr>
<th>Pesan</th>
<td>:</td>
<td><textarea class="
form
-
control
" placeholder="
Pesan
harap
diisi
" id="
pesan
" style="
height
:
200
px
;
" name="
deskripsi
"> </textarea></td>
</tr>
<tr>
<th>Status</th>
<td> : </td>
<td> @if(
$data->status
==0)
<td>
<form action="
{{
url
(
'konfirmasiPemesanan/'
.
$data
->
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="
fa
fa
-
check
"> Terima</i></button>
</form>
</td>
<td>
{{--<form action="
{{
url
(
'konfirmasiPemesanan/'
.
$data
->
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>--}
}
<a class="
btn
btn
-
danger
" onclick="
cancelRequest
()
"> <i class="
fa
fa
-
close
"></i>Tolak </a>
</td>
@elseif(
$data->status
==1) Diterima
@elseif(
$data->status
==2) Ditolak
@endif
</td>
</tr>
</table>
...
...
@@ -74,4 +111,32 @@
</div>
<script>
function cancelRequest() {
var check = confirm("
Apakah
anda
yakin
untuk
menolak
nya
??
");
var fiedl = document.getElementById('pesan');
if(fiedl.value == ' ' || fiedl.value == null || fiedl.value == ' '){
alert('Pesan Harus di isi');
}else {
if(check) {
$.ajax({
data: {
pesan : fiedl.value,
requestID: '
{
{$data->id}
}
',
_token: '{{ csrf_token() }}',
},
url: '{{ url('batalkan') }}',
type: 'POST',
success: function (data) {
window.location.reload(true);
}
});
}
}
}
</script>
@endsection
resources/views/vendor/adminlte/layouts/owner/listPesanan.blade.php
View file @
56651a82
...
...
@@ -32,17 +32,19 @@
<!-- /.info-box -->
</div>
<table class="
table
table
-
striped
">
<table id="
example2
" class="
table
table
-
bordered
table
-
hover
">
<thead>
<tr>
<th>Nama Pelanggan</th>
<th>Tanggal Check-in</th>
<th>Tanggal Check-out</th>
<th>Bukti Pembayaran</th>
<th>Lihat Detail</th>
<th>Download Bukti Pembayaran</th>
<th style="
position
:
center
;
">Status</th>
<th
colspan="
2
">
</th>
<th
>Lihat Detail
</th>
</tr>
</thead>
<tbody>
@foreach(
$data
as
$a
)
<tr>
<td>
{
{$a->nama}
}
</td>
...
...
@@ -55,12 +57,7 @@
<a href="
/
img
/
{{
$a
->
bukti_pembayaran
}}
" alt="
Bukti
Pembayaran
" data-lightbox="
roadtrip
"><img src="
/
img
/
{{
$a
->
bukti_pembayaran
}}
" style="
max
-
height
:
150
px
;
width
:
200
px
;
"></a>
@endif
</td>
<td>
@if(
$a->bukti_pembayaran
==null)
@else
<a href="
{{
url
(
'detailpesanan/'
.
$a
->
id
)}}
" class="
btn
btn
-
primary
"><i class="
fa
fa
-
eye
"></i> </a>
@endif
</td>
<td>
@if(
$a->bukti_pembayaran
==null)
Bukti pembayaran tidak ada
...
...
@@ -71,28 +68,20 @@
</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="
fa
fa
-
check
"> 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>
Menunggu Konfirmasi
@elseif(
$a->status
==1) Diterima
@elseif(
$a->status
==2) Ditolak
@endif
</td>
<td>
<a href="
{{
url
(
'detailpesanan/'
.
$a
->
id
)}}
" class="
btn
btn
-
primary
"><i class="
fa
fa
-
eye
"></i> </a>
</td>
</td>
</tr>
@endforeach
</tbody>
</table>
{!!
$data->render
() !!}
</div>
...
...
@@ -102,4 +91,18 @@
<script type="
text
/
javascript
">
document.getElementById("
download
").setAttribute("
download
", "
bukti
pembayarans
.
jpg
")
</script>
<script>
$(function () {
$("
#example1").DataTable();
$
(
'#example2'
)
.
DataTable
({
"paging"
:
true
,
"lengthChange"
:
false
,
"searching"
:
false
,
"ordering"
:
true
,
"info"
:
true
,
"autoWidth"
:
false
});
});
</
script
>
@
endsection
routes/web.php
View file @
56651a82
...
...
@@ -64,11 +64,13 @@ Route::get('DataPemesanan', function(){
});
Route
::
group
([
'middleware'
=>
'owner'
],
function
()
{
Route
::
post
(
'batalkan'
,
'OwnerController@batalkan'
);
Route
::
post
(
'printreport'
,
'OwnerController@printReport'
);
Route
::
put
(
'asread/{id}'
,
'OwnerController@Asread'
);
Route
::
get
(
'record'
,
'OwnerController@Record'
);
Route
::
get
(
'report'
,
'OwnerController@Report'
);
Route
::
get
(
'report/{id}'
,
'OwnerController@findReport'
);
Route
::
get
(
'report/{id}/{tahun}'
,
'OwnerController@findReport'
);
Route
::
get
(
'report/{id}'
,
'OwnerController@dfindReport'
);
Route
::
put
(
'check/{id}'
,
'OwnerController@Check'
);
Route
::
put
(
'editRoom/{id}'
,
'OwnerController@updateRoom'
);
Route
::
post
(
'addManual'
,
'OwnerController@addBookManual'
);
...
...
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