after a series of bug fixes plus Non MNO logic for Sender IDs, unfinished leave management and holiday modules

This commit is contained in:
Kwesi Banson Jnr
2025-03-19 10:33:04 +00:00
parent 6cede6d980
commit cf39ff2682
112 changed files with 26812 additions and 496 deletions

View File

@@ -14,6 +14,34 @@
$('#textbox1').val(this.checked);
});
*/
function matchCustom(params, data) {
// If there are no search terms, return all of the data
if ($.trim(params.term) === '') {
return data;
}
// Do not display the item if there is no 'text' property
if (typeof data.text === 'undefined') {
return null;
}
// `params.term` should be the term that is used for searching
// `data.text` is the text that is displayed for the data object
if (data.text.indexOf(params.term) > -1) {
var modifiedData = $.extend({}, data, true);
modifiedData.text += ' (matched)';
// You can return modified objects from here
// This includes matching the `children` how you want in nested data sets
return modifiedData;
}
// Return `null` if the term should not be displayed
return null;
}
$('#shortCodeCountry').select2({
matcher: matchCustom
});
$('.progressIndicatorCheckbox').on('change', function() {
// From the other examples
// console.log('finker');
@@ -23,8 +51,45 @@
$('#textbox1').val(sure.toString());
}
});
$("select#shortCodeCountry").change(function(){
var shortCodeCountry = $(this).val();
var theToken = "{{ csrf_token }}";
$.ajax({
type: "POST",
url: base_url + '/mnos/getCountryNetworks',
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
data: {"country" : shortCodeCountry },
cache: false,
beforeSend: function () {
console.log('loader here');
//show a loader here
//$('#district').html('<img src="../../img/loading.gif" alt="" width="24" height="24">');
},
success: function(data) {
console.log(data.mnos);
// var jason = JSON.parse(data);
if (data.code === 1) {
var actionPoint = $('#networks').empty();
console.log(actionPoint);
$.each(data.mnos, function(key, value) {
console.log(id);
console.log(row);
//$('#networks').append($("<option />").val(row.id).text(row.name));
});
}
else {
console.log(data);
$.alert(data.msg);
}
},
fail : function(errordata){
console.log(errordata);å
}
});
});
$('select').select2();
$('#myDatepicker2').datetimepicker({
format: 'YYYY-MM-DD',
@@ -68,7 +133,6 @@
});
$('#createSenderIdBtn').click(function(evt){
evt.preventDefault();
console.log('Heere at the wall');
$('#newSenderIdFormModal').modal('show');
});
@@ -92,6 +156,7 @@
contentType: false,
async: false,
success: function (data){
console.log(data);
if (data.code === 1) {
// console.log(theIDD);
$('#paymentIdEdit').val(theIDD);
@@ -99,6 +164,7 @@
$('#invoiceNumberEdit').val(data.result.invoice_number);
$('#invoiceAmountEdit').val(data.result.invoice_amount);
$('#invoiceDateEdit').val(data.result.invoice_date);
$('#financeShortCodeEdit').val(data.result.short_code);
$('#invoiceStatusEdit').val(data.result.invoice_status).change();
$('#remarksEdit').val(data.result.remarks);
$('#financePaymentsEditForm').modal('show');
@@ -141,6 +207,7 @@
$('#shortCodeTypeEdit').val(data.result.code_type);
$('#shortCodeEdit').val(data.result.shortcode);
$('#tollFreeEdit').val(data.result.toll_free).change();
$('#monthlyFeeEdit').val(data.result.monthly_fee);
$('#launchDateEdit').val(data.result.launch_date);
$('#expiryDateEdit').val(data.result.expiry_date);
$('#codeStatusEdit').val(data.result.status).change();