Initial commit
This commit is contained in:
128
resources/views/organisation/mytopups.blade.php
Normal file
128
resources/views/organisation/mytopups.blade.php
Normal file
@@ -0,0 +1,128 @@
|
||||
@extends('dealer_layouts.dealer_master')
|
||||
@section('page-title')
|
||||
Dealer | Transactions
|
||||
@endsection
|
||||
@section('page-css')
|
||||
<link href="{!! url('public/theme_assets/vendor/tabulator/css/bootstrap/tabulator_bootstrap.css') !!}" type="text/css" rel="stylesheet">
|
||||
@endsection
|
||||
@section('page-content')
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="hpanel hblue">
|
||||
<div class="panel-heading hbuilt">Purchases from Super Venders</div>
|
||||
<div class="panel-body">
|
||||
<div class="" style="padding-bottom: 10px;">
|
||||
<button id="transactions-download-xlsx" class="btn btn-success btn-sm"><i class="fa fa-file-excel-o"></i> Download XLSX</button>
|
||||
<button id="transactions-download-pdf" class="btn btn-danger btn-sm"><i class="fa fa-file-pdf-o"></i> Download PDF</button>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<form method="GET" action="{!! url('organisation/mytopups') !!}">
|
||||
<div class="col-md-12 form-group pull-right top_search" style="background: cornflowerblue;">
|
||||
<div class="input-group">
|
||||
<input type="text" name="keyword" class="form-control" id="keywordField" placeholder="Keyword here.. ">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div id="transactionsTable"></div>
|
||||
</div>
|
||||
<div class="panel-footer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@endsection
|
||||
@section('page-js')
|
||||
<script src="{!! url('public/theme_assets/vendor/tabulator/js/tabulator.js') !!}"></script>
|
||||
<script src="{!! url('public/theme_assets/vendor/tabulator/js/xlsx.full.min.js') !!}"></script>
|
||||
<script src="{!! url('public/theme_assets/vendor/tabulator/js/jspdf.min.js') !!}"></script>
|
||||
<script src="{!! url('public/theme_assets/vendor/tabulator/js/jspdf.plugin.autotable.js') !!}"></script>
|
||||
|
||||
|
||||
<script>
|
||||
function statusDesign (cell, formatterParams){
|
||||
var value = cell.getValue();
|
||||
// if(value === 'Approved'){
|
||||
if(value.includes('Success')){
|
||||
return "<span style='color:#3FB449; font-weight:bold;'>" + value + "</span>";
|
||||
}
|
||||
else if(value.includes('Failed')){
|
||||
return "<span style='color:#3FB449; font-weight:bold;'>" + value + "</span>";
|
||||
}
|
||||
else{
|
||||
return "<span style='color:#E4A11B;'>" + value + "</span>";
|
||||
}
|
||||
}
|
||||
var table = new Tabulator("#transactionsTable", {
|
||||
ajaxURL: "mytopups/all",
|
||||
paginationSize: 15,
|
||||
layout: "fitColumns",
|
||||
pagination: "remote",
|
||||
selectable: false,
|
||||
printAsHtml: true,
|
||||
ajaxLoaderLoading: $('#logo_spinner').html(),
|
||||
columns: [
|
||||
|
||||
{
|
||||
title: "Vendor Name",
|
||||
field: "name",
|
||||
sorter: "string",
|
||||
// formatter: cellDesign,
|
||||
// formatter:link,
|
||||
},
|
||||
{
|
||||
title: "Amount",
|
||||
field: "amount",
|
||||
sorter: "number",
|
||||
},
|
||||
{
|
||||
title: "Payment Method",
|
||||
field: "payment_method",
|
||||
sorter: "string",
|
||||
},
|
||||
|
||||
{
|
||||
title: "Status",
|
||||
field: "status",
|
||||
sorter: "string",
|
||||
formatter: statusDesign,
|
||||
},
|
||||
|
||||
{
|
||||
title: "Date",
|
||||
field: "created_at",
|
||||
sorter: "string",
|
||||
},
|
||||
],
|
||||
|
||||
rowClick:function(e, row){
|
||||
var userID = row.getData().id;
|
||||
console.log(userID);
|
||||
//$('#modalHere').modal('show');
|
||||
},
|
||||
});
|
||||
document.getElementById("transactions-download-xlsx").addEventListener("click", function(){
|
||||
table.download("xlsx", "transactions-list.xlsx", {sheetName:"Sheet 1"});
|
||||
});
|
||||
//trigger download of data.pdf file
|
||||
document.getElementById("transactions-download-pdf").addEventListener("click", function(){
|
||||
table.download("pdf", "transactions-list.pdf", {
|
||||
orientation:"portrait", //set page orientation to portrait
|
||||
title:"Click Mobile - Sender ID", //add title to report
|
||||
});
|
||||
});
|
||||
$('#keywordField').on('keyup', function(){
|
||||
console.log('up');
|
||||
var keyword = $(this).val();
|
||||
table.setData("mytopups/all?keyword=" + keyword);
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@endsection
|
||||
Reference in New Issue
Block a user