multiple bug fixes including sender ID filtering

This commit is contained in:
Kwesi Banson Jnr
2026-04-16 14:22:04 +00:00
parent 72180de8e4
commit 5dbe76dbd4
380 changed files with 175085 additions and 203 deletions

View File

@@ -5,7 +5,9 @@
@endif
@endsection
@section('css')
<link href="{!! url('public/assets/vendors/tabulator/css/bootstrap/tabulator_bootstrap.css') !!}" type="text/css" rel="stylesheet">
<link href="{!! url('public/assets/vendors/tabulator-master/dist/css/tabulator_bootstrap3.min.css') !!}" type="text/css" rel="stylesheet">
<!-- <link href="https://unpkg.com/tabulator-tables@6.4.0/dist/css/tabulator.min.css" rel="stylesheet"> -->
<!-- <link href="/dist/css/tabulator_bootstrap.min.css" rel="stylesheet"> -->
@endsection
@section('content')
<div class="">
@@ -26,14 +28,14 @@
<div style="margin-top:1px; margin-right:-90px;" class="top_search">
</div>
</div>
<div class="col-md-5 col-sm-5 col-xs-12 form-group pull-right top_search" style="margin-top: -2px;">
<!-- <div class="col-md-5 col-sm-5 col-xs-12 form-group pull-right top_search" style="margin-top: -2px;">
<div class="input-group">
<input type="text" name="keyword" class="form-control" id="keywordField" placeholder="Keyword here...">
<span class="input-group-btn">
<button type="submit" class="btn btn-primary" style="color: #fff;" type="button">Go!</button>
</span>
</div>
</div>
</div> -->
</form>
</div>
<div class="row">
@@ -82,7 +84,8 @@
@endsection
@section('javascript')
<script src="{!! url('public/assets/vendors/tabulator/js/tabulator.js') !!}"></script>
<!-- <script src="{!! url('public/assets/vendors/tabulator/js/tabulator.js') !!}"></script> -->
<script type="text/javascript" src="https://unpkg.com/tabulator-tables@6.4.0/dist/js/tabulator.min.js"></script>
<script type="text/javascript" src="{!! url('public/assets/vendors/tabulator/js/xlsx.full.min.js') !!}"></script>
<script type="text/javascript" src="{!! url('public/assets/vendors/tabulator/js/jspdf.min.js') !!}"></script>
<script type="text/javascript" src="{!! url('public/assets/vendors/tabulator/js/jspdf.plugin.autotable.js') !!}"></script>
@@ -115,77 +118,80 @@
}
}
var table = new Tabulator("#senderIdsTable", {
ajaxURL: "senderids/all",
paginationSize: 15,
layout: "fitColumns",
pagination: "remote",
selectable: false,
printAsHtml: true,
ajaxLoaderLoading: $('#logo_spinner').html(),
columns: [
{
title: "Sender ID",
field: "senderid",
sorter: "string",
formatter: cellDesign,
formatter:link,
},
{
title: "Direct MNO",
field: "direct_mno",
sorter: "string",
},
{
title: "Network",
field: "mno_name",
sorter: "string",
},
{
title: "Supplier",
field: "supplier_name",
sorter: "string",
},
{
title: "Status",
field: "status",
sorter: "string",
formatter: statusDesign,
},
{
title: "Remarks",
field: "remarks",
sorter: "string",
formatter: statusDesign,
},
{
title: "Created By",
field: "createdBy",
sorter: "string",
},
// {
// title: "Last Modified By",
// field: "modifiedBy",
// sorter: "string",
// }
],
rowClick:function(e, row){
var userID = row.getData().id;
console.log(userID);
//$('#userEditModal').modal('show');
ajaxURL: "senderids/all",
paginationSize: 15,
layout: "fitColumns",
// --- FIX 1: Correct Pagination Syntax ---
pagination: true,
paginationMode: "remote",
// ----------------------------------------
filterMode: "remote",
selectable: false,
printAsHtml: true,
ajaxLoaderLoading: $('#logo_spinner').html(),
ajaxResponse: function(url, params, response) {
if (response.data) {
return {
"data": response.data,
"last_page": response.last_page
};
}
return response;
},
columns: [
{
title: "Sender ID",
field: "senderid",
sorter: "string",
headerFilter:"input",
formatter: link,
},
});
document.getElementById("senderid-download-xlsx").addEventListener("click", function(){
table.download("xlsx", "senderid-list.xlsx", {sheetName:"Sheet 1"});
});
//trigger download of data.pdf file
document.getElementById("senderid-download-pdf").addEventListener("click", function(){
table.download("pdf", "client-list.pdf", {
orientation:"portrait", //set page orientation to portrait
title:"Click Mobile - Sender ID", //add title to report
});
});
{
title: "Direct MNO",
field: "direct_mno",
sorter: "string",
headerFilter:"input",
headerFilter:"input"
},
{
title: "Network",
field: "mno_name",
sorter: "string",
headerFilter:"input",
},
{
title: "Supplier",
field: "supplier_name",
sorter: "string",
headerFilter:"input",
},
{
title: "Status",
field: "status",
sorter: "string",
headerFilter:"input",
formatter: statusDesign,
},
{
title: "Remarks",
field: "remarks",
sorter: "string",
headerFilter:"input",
formatter: statusDesign,
},
{
title: "Created By",
field: "createdBy",
sorter: "string",
headerFilter:"input",
},
],
});
$('#keywordField').on('keyup', function(){
console.log('up');
var keyword = $(this).val();