Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Kunto
/
backoffice
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit f4ce41d3
authored
Jan 29, 2020
by
musthofads
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
history transaksi
1 parent
8692bacf
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
296 additions
and
0 deletions
src/agratek/api/merchant/scripts/data/routes.csv
src/agratek/api/merchant/views/history_transaksi.py
src/agratek/api/merchant/views/templates/base.pt
src/agratek/api/merchant/views/templates/history_transaksi/list.pt
src/agratek/api/merchant/views/templates/history_transaksi/view.pt
src/agratek/api/merchant/scripts/data/routes.csv
View file @
f4ce41d
...
@@ -93,3 +93,7 @@ pay-info,/pay_info/{pay_token}/{state}/,Informasi Pembayaran,1,0
...
@@ -93,3 +93,7 @@ pay-info,/pay_info/{pay_token}/{state}/,Informasi Pembayaran,1,0
pay-request,/pay_request,Pembayaran,1,0
pay-request,/pay_request,Pembayaran,1,0
pay-request-resp,/pay_request_resp,Respon Request Pembayaran,1,0
pay-request-resp,/pay_request_resp,Respon Request Pembayaran,1,0
tangkap-response,/tangkap_response,tes_dong,1,0
tangkap-response,/tangkap_response,tes_dong,1,0
history-transaksi-list,/history/transaksi/list,List History Transaksi,1,0
history-transaksi-act,/history/transaksi/{act}/act,Act History Transaksi,1,0
history-transaksi-view,/history/transaksi/{id}/view,View History Transaksi,1,0
\ No newline at end of file
\ No newline at end of file
src/agratek/api/merchant/views/history_transaksi.py
0 → 100644
View file @
f4ce41d
This diff is collapsed.
Click to expand it.
src/agratek/api/merchant/views/templates/base.pt
View file @
f4ce41d
...
@@ -67,5 +67,11 @@
...
@@ -67,5 +67,11 @@
</a>
</a>
</li>
</li>
<li>
<a
href=
"${request._host}/history/transaksi/list"
>
<i
class=
"fa fa-lg fa-fw fa-list"
></i>
<span
class=
"menu-item-parent"
>
History Transaksi
</span>
</a>
</li>
</ul>
</ul>
</html>
</html>
src/agratek/api/merchant/views/templates/history_transaksi/list.pt
0 → 100644
View file @
f4ce41d
<html>
<div
metal:use-macro=
"load: ../base.pt"
>
<!-- content -->
<div
metal:fill-slot=
"content"
>
<style
type=
"text/css"
>
#content-payment-view
{
height
:
100%
;
overflow-y
:
auto
;
}
</style>
<div
id=
"tmp-toolbar"
style=
"display: inline-block;"
>
<span
tal:repeat=
"f params.form"
tal:omit-tag=
""
>
<label
for=
"${f.oid}"
class=
"control-label"
>
${f.title}
</label>
${structure:f.serialize()}
</span>
</div>
<div
class=
"jarviswidget"
style=
"border-top:1px solid #ccc!important"
>
<div
role=
"content"
>
<table
id=
"table1"
class=
"table table-bordered table-hover table-condensed nowrap"
>
<thead>
<tr>
<th
tal:repeat=
"f params.columns"
>
${f.title}
</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
<!-- Modal -->
<div
id=
"payment-view"
class=
"modal fade"
role=
"dialog"
>
<div
class=
"modal-dialog modal-lg"
>
<!-- Modal content-->
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
>
×
</button>
<h4
class=
"modal-title"
>
View Detail
<span
style=
"margin-left: 10px"
id=
"payment-view-title"
></span>
</h4>
</div>
<div
class=
"modal-body"
id=
"content-payment-view"
>
&nbps;
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
OK
</button>
</div>
</div>
</div>
</div>
</div>
<!-- end content -->
<script
type=
"text/javascript"
metal:fill-slot=
"scripts"
>
var
mID
;
var
oTable
;
var
oTableUri
=
"${request._host}${params.route}"
var
oTableUrl
=
oTableUri
+
"/grid/act"
;
function
getDataUrl
()
{
var
opt
=
$
(
'select#status'
).
val
();
var
param
=
''
;
var
awalControl
=
$
(
'#awal'
);
var
akhirControl
=
$
(
'#akhir'
);
var
awal
=
awalControl
.
val
();
var
akhir
=
akhirControl
.
val
();
var
tgl
=
new
Date
();
var
tgl_indo
=
tgl
.
getDate
()
+
'-'
+
(
tgl
.
getMonth
()
+
1
)
+
'-'
+
tgl
.
getFullYear
();
if
(
awal
==
''
||
awal
==
undefined
){
awalControl
.
val
(
tgl_indo
)
}
if
(
akhir
==
''
||
akhir
==
undefined
){
akhirControl
.
val
(
tgl_indo
)
}
if
(
awal
!=
''
&&
awal
!=
undefined
)
{
param
+=
'&awal='
+
awal
;
}
if
(
akhir
!=
''
&&
akhir
!=
undefined
)
{
param
+=
'&akhir='
+
akhir
;
}
return
oTableUrl
+
'?status='
+
opt
.
toString
()
+
param
;
}
function
getViewUrl
(
vid
)
{
return
oTableUri
+
"/"
+
vid
.
toString
()
+
"/view"
;
}
$
(
document
).
ready
(
function
()
{
oTable
=
$
(
'#table1'
).
DataTable
({
dom
:
'<"row"<"col-md-8"<"toolbar">l><"col-md-4"f>>rtip'
,
processing
:
true
,
serverSide
:
true
,
ajax
:
getDataUrl
(),
stateSave
:
true
,
//scrollCollapse: true,
//sort: true,
//info: false,
scrollX
:
true
,
filter
:
true
,
autoWidth
:
false
,
paginate
:
true
,
paginationType
:
"full_numbers"
,
lengthMenu
:
[
[
10
,
25
,
50
,
100
],
[
10
,
25
,
50
,
100
]
],
columns
:
[
{
'data'
:
'id'
,
'width'
:
'0px'
},
{
'data'
:
'nomor'
,
'width'
:
'150px'
},
{
'data'
:
'created'
,
'width'
:
'60px'
},
{
'data'
:
'id_pel'
,
'width'
:
'150px'
},
{
'data'
:
'customer'
,
'width'
:
'80px'
},
{
'data'
:
'vendor'
,
'width'
:
'80px'
},
{
'data'
:
'produk'
,
'width'
:
'150px'
},
{
'data'
:
'harga_beli'
,
'width'
:
'70px'
},
{
'data'
:
'harga'
,
'width'
:
'70px'
},
{
'data'
:
'status'
,
'width'
:
'70px'
,
'render'
:
function
(
data
,
type
,
full
,
meta
)
{
var
st
=
$
{
params
.
status_purchase
};
return
st
[
data
];
}
}
],
//columns: ${params.column_data},
columnDefs
:
[{
searchable
:
false
,
visible
:
false
,
targets
:
[
0
]
}],
"language"
:
{
"search"
:
"Cari : "
,
"paginate"
:
{
"first"
:
"Pertama "
,
"last"
:
"Akhir "
,
"previous"
:
""
,
"next"
:
""
,
},
"lengthMenu"
:
"Tampil _MENU_ baris "
},
});
var
buttons
=
$
{
params
.
buttons
};
var
tb_array
=
[];
tb_array
.
push
(
'<div class="btn-group pull-left">'
);
for
(
i
=
0
;
i
<
buttons
.
length
;
i
++
){
tb_array
.
push
(
'<button id="'
+
buttons
[
i
].
id
+
'" class="'
+
buttons
[
i
].
cls
+
'" type="button">'
+
buttons
[
i
].
title
+
'</button>'
)
}
tb_array
.
push
(
' '
);
tb_array
.
push
(
'</div>'
);
var
tb
=
tb_array
.
join
(
' '
);
$
(
"div.toolbar"
).
html
(
tb
)
.
attr
(
'style'
,
'display:block; float: left; margin-bottom:6px; line-height:16px;'
);
$
(
'#tmp-toolbar'
).
appendTo
(
$
(
"div.toolbar"
));
//events
$
(
'#table1 tbody'
).
on
(
'click'
,
'tr'
,
function
()
{
if
(
$
(
this
).
hasClass
(
'selected'
))
{
$
(
this
).
removeClass
(
'selected'
);
}
else
{
var
aData
=
oTable
.
row
(
this
).
data
();
oTable
.
$
(
'tr.selected'
).
removeClass
(
'selected'
);
$
(
this
).
addClass
(
'selected'
);
mID
=
aData
.
id
;
// console.log(mID);
oTable
.
$
(
'tr.row_selected'
).
removeClass
(
'row_selected'
);
$
(
this
).
addClass
(
'row_selected'
);
}
});
$
{
params
.
scripts
}
$
(
'#btn_view'
).
click
(
function
()
{
if
(
mID
)
{
$
(
'#payment-view'
).
modal
(
'show'
);
}
else
{
$
.
SmartMessageBox
({
title
:
"View"
,
content
:
"Pilih Baris yang akan di lihat..."
,
buttons
:
'[Oke]'
});
}
});
$
(
"#payment-view"
).
on
(
'show.bs.modal'
,
function
(){
var
content
=
''
;
var
view_container
=
$
(
'#content-payment-view'
);
view_container
.
empty
();
if
(
mID
)
{
var
vUrl
=
getViewUrl
(
mID
);
view_container
.
load
(
vUrl
,
function
()
{
$
(
'.readonly'
).
attr
(
'readonly'
,
true
);
});
}
});
$
(
'select#status'
).
on
(
'change'
,
function
()
{
mID
=
0
;
oTable
.
ajax
.
url
(
getDataUrl
()).
load
();
});
$
(
'#awal,#akhir'
).
datepicker
({
format
:
'dd-mm-yyyy'
,
autoclose
:
true
});
$
(
'#awal,#akhir'
).
on
(
'changeDate'
,
function
(
e
)
{
oTable
.
ajax
.
url
(
getDataUrl
()).
load
();
});
$
(
'#awal, #akhir'
).
css
(
'width'
,
'98px'
);
var
el
=
$
(
'#table1_length'
).
parent
();
el
.
addClass
(
'col-md-9'
);
el
.
removeClass
(
'col-md-8'
);
var
el
=
$
(
'#table1_filter'
).
parent
();
el
.
addClass
(
'col-md-3'
);
el
.
removeClass
(
'col-md-4'
);
function
getCSV_url
(){
var
csvUrl
=
oTableUri
+
"/csv/act"
;
var
opt
=
$
(
'select#status'
).
val
();
var
param
=
''
;
var
awalControl
=
$
(
'#awal'
);
var
akhirControl
=
$
(
'#akhir'
);
var
awal
=
awalControl
.
val
();
var
akhir
=
akhirControl
.
val
();
var
tgl
=
new
Date
();
var
tgl_indo
=
tgl
.
getDate
()
+
'-'
+
(
tgl
.
getMonth
()
+
1
)
+
'-'
+
tgl
.
getFullYear
();
if
(
awal
==
''
||
awal
==
undefined
){
awalControl
.
val
(
tgl_indo
)
}
if
(
akhir
==
''
||
akhir
==
undefined
){
akhirControl
.
val
(
tgl_indo
)
}
if
(
awal
!=
''
&&
awal
!=
undefined
)
{
param
+=
'&awal='
+
awal
;
}
if
(
akhir
!=
''
&&
akhir
!=
undefined
)
{
param
+=
'&akhir='
+
akhir
;
}
return
csvUrl
+
'?status='
+
opt
.
toString
()
+
param
;
}
$
(
'#btn_csv'
).
click
(
function
()
{
console
.
log
(
getCSV_url
());
window
.
open
(
getCSV_url
());
});
});
</script>
</div>
</html>
\ No newline at end of file
\ No newline at end of file
src/agratek/api/merchant/views/templates/history_transaksi/view.pt
0 → 100644
View file @
f4ce41d
<div tal:condition="params.form" tal:omit-tag="">
<div class="form-horizontal">
<div tal:repeat="f params.form" class="row">
<div class="form-group">
<label for="${f.oid}" class="control-label col-md-3" id="req-${f.oid}">
${f.title}
</label>
<div class="col-md-9">
${structure:f.serialize()}
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
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 post a comment