staff, mno, clients, bug fixes
This commit is contained in:
@@ -4,7 +4,9 @@
|
||||
{{ $page_title }}
|
||||
@endif
|
||||
@endsection
|
||||
|
||||
@section('css')
|
||||
<link href="{!! url('public/assets/vendors/tabulator/css/bootstrap/tabulator_bootstrap.css') !!}" type="text/css" rel="stylesheet">
|
||||
@endsection
|
||||
@section('content')
|
||||
<div class="">
|
||||
<div class="page-title">
|
||||
@@ -19,15 +21,14 @@
|
||||
|
||||
<div class="title_right">
|
||||
<div class="row">
|
||||
<form method="GET" action="{!! url('network_ops') !!}">
|
||||
<form method="GET" action="{!! url('mnos') !!}">
|
||||
<div class="col-md-5 col-sm-5 col-xs-12 form-group">
|
||||
<div style="margin-top:1px; margin-right:-90px;" class="top_search">
|
||||
{!! Form::select('filter', $columns, null, ['class' => 'form-control', 'placeholder' => 'Select Filter here']) !!}
|
||||
</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="input-group">
|
||||
<input type="text" name="keyword" class="form-control" placeholder="Keyword here...">
|
||||
<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>
|
||||
@@ -36,11 +37,9 @@
|
||||
</form>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="pull-right">
|
||||
<a href="{!! url('network_ops') !!}" class="btn btn-warning btn-xs"><i class="fa fa-refresh"></i> Reset Filter</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="pull-right"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -53,57 +52,14 @@
|
||||
<div class="x_title">
|
||||
<h2> Network Operators </h2>
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-primary btn-sm" href="{!! url('network_ops/create') !!}"><i class="fa fa-plus-circle"></i> Add Network Operator
|
||||
<a class="btn btn-primary btn-sm" href="{!! url('mnos/create') !!}"><i class="fa fa-plus-circle"></i> Add Network Operator
|
||||
</a>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
|
||||
<div class="x_content">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped ">
|
||||
<thead>
|
||||
<tr class="headings">
|
||||
{{-- <th>#</th> --}}
|
||||
<th class="column-title">Name</th>
|
||||
<th class="column-title">Country</th>
|
||||
<th class="column-title">Account Manager</th>
|
||||
|
||||
<th class="column-title no-link last"><span class="nobr">Action</span>
|
||||
</th>
|
||||
<th class="bulk-actions" colspan="7">
|
||||
<a class="antoo" style="color:#fff; font-weight:500;">Bulk Actions ( <span class="action-cnt"> </span> ) <i class="fa fa-chevron-down"></i></a>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@if ($network_operators->isEmpty())
|
||||
<tr>
|
||||
<td class="" colspan="6">No Records found</td>
|
||||
</tr>
|
||||
@else
|
||||
@foreach ($network_operators as $row)
|
||||
<tr class="even pointer">
|
||||
<td class="mes-td" >{{ $row->name }}</td>
|
||||
<td class="mes-td" >{{ $row->country_info->en_short_name }}</td>
|
||||
<td class="mes-td" >{{ $row->account_manager_info->name }}</td>
|
||||
<td class="last" >
|
||||
<a href="{!! route('network_ops.show', [$row->id]) !!}" class="btn btn-xs btn-info"><i class="fa fa-info-circle"></i></a>
|
||||
<a href="{!! route('network_ops.edit', [$row->id]) !!}" class="btn btn-xs btn-primary"><i class="fa fa-edit"></i></a>
|
||||
<a title="Remove Operator" class="btn btn-xs btn-danger removeOperator"><i class="fa fa-trash"></i></a>
|
||||
<input type="hidden" name="network_operator_id" class="networkOperatorID" value="{{ $row->id }}">
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{ $network_operators->links() }} <br>
|
||||
Page : {{ $network_operators->currentPage() }} of {{ $network_operators->lastPage() }} |
|
||||
Total Records : <span id="totalRecords">{{ $network_operators->total() }}</span>
|
||||
<div id="mnosTable"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -113,50 +69,84 @@
|
||||
@endsection
|
||||
|
||||
@section('javascript')
|
||||
<script src="{!! url('public/assets/vendors/tabulator/js/tabulator.js') !!}"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
//$('select').select2();
|
||||
$(".removeOperator").click(function(evt){
|
||||
var recordsTotal = Number($('#totalRecords').text());
|
||||
var Rrow = $(this).parents('tr');
|
||||
var theUrl = "{!! url('network_ops/destroy') !!}";
|
||||
var networkOperatorID = $(this).siblings('.networkOperatorID').val();
|
||||
var linker = base_url + "/network_ops/" + networkOperatorID;
|
||||
swal({
|
||||
title: "Delete Confirmation",
|
||||
text: "This will remove the Network Operator completely from the system. Do you want to continue",
|
||||
type: "info",
|
||||
showCancelButton: true,
|
||||
confirmButtonClass: "btn-danger conBtn",
|
||||
confirmButtonText: "Yes, remove it!",
|
||||
showLoaderOnConfirm: true,
|
||||
closeOnConfirm: false,
|
||||
closeOnCancel: false
|
||||
function link(cell, formatterParams){
|
||||
var url = cell.getValue();
|
||||
var rowID = cell.getData().id
|
||||
return "<a href='"+ base_url + "/mnos/"+rowID+"/edit' class='btn btn-link'>"+url+"</a>";
|
||||
}
|
||||
var table = new Tabulator("#mnosTable", {
|
||||
ajaxURL: "mnos/all",
|
||||
paginationSize: 15,
|
||||
layout: "fitColumns",
|
||||
rowFormatter:function(row){
|
||||
if(row.getData().connection_status == "active"){
|
||||
//row.getElement().style.backgroundColor = "#1e3b20";
|
||||
row.getElement().style.backgroundColor = "red";
|
||||
}
|
||||
},
|
||||
pagination: "remote",
|
||||
selectable: false,
|
||||
printAsHtml: true,
|
||||
ajaxLoaderLoading: $('#logo_spinner').html(),
|
||||
columns: [
|
||||
{
|
||||
title: "Name",
|
||||
field: "networkName",
|
||||
sorter: "string",
|
||||
formatter:link,
|
||||
},
|
||||
function(isConfirm){
|
||||
if (isConfirm) {
|
||||
$.ajax({
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
},
|
||||
type: "DELETE",
|
||||
data: { id: networkOperatorID },
|
||||
url: base_url + "/network_ops/" + networkOperatorID,
|
||||
success: function(data){
|
||||
if (data.code === 1) {
|
||||
$(Rrow).remove();
|
||||
$('#totalRecords').text(recordsTotal - 1);
|
||||
swal("Deleted!", "Selected Operator has been removed .", "success");
|
||||
}
|
||||
if (data.code === 3) {
|
||||
swal("Not Permitted", "This Operator has transactions! .", "warning");
|
||||
}
|
||||
}
|
||||
});// end of ajax function
|
||||
} else {
|
||||
swal("Cancelled", "You cancelled the operation :)", "error");
|
||||
}
|
||||
});
|
||||
{
|
||||
title: "Country",
|
||||
field: "country",
|
||||
sorter: "string",
|
||||
},
|
||||
{
|
||||
title: "Status",
|
||||
field: "connection_status",
|
||||
sorter: "string",
|
||||
formatter:function(cell, formatterParams){
|
||||
var value = cell.getValue();
|
||||
if(value == 'Active'){
|
||||
return "<span style='color:#3FB449; font-weight:bold;'>" + value + "</span>";
|
||||
}
|
||||
else if(value == 'Pending'){
|
||||
return "<span style='color:#f0ad4e; font-weight:bold;'>" + value + "</span>";
|
||||
}
|
||||
else if(value == null || value == ''){
|
||||
//return "None";
|
||||
return "<span style='color:#d9534f; font-weight:bold;'>Not Specified</span>";
|
||||
}
|
||||
else{
|
||||
return "<span style='color:#d9534f; font-weight:bold;'>" + value + "</span>";
|
||||
}
|
||||
}},
|
||||
{
|
||||
title: "Account Manager",
|
||||
field: "accountManager",
|
||||
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');
|
||||
},
|
||||
});
|
||||
|
||||
$('#keywordField').on('keyup', function(){
|
||||
console.log('up');
|
||||
var keyword = $(this).val();
|
||||
table.setData("mnos/all?keyword=" + keyword);
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user