bug fixes, AM change feature, refactoring
This commit is contained in:
49
public/assets/js/clientshow.js
vendored
49
public/assets/js/clientshow.js
vendored
@@ -144,6 +144,12 @@ $(document).ready(function(){
|
||||
evt.preventDefault();
|
||||
$('#supportFeesFormModal').modal('show');
|
||||
});
|
||||
|
||||
$('#changeAmTrigBtn').click(function(evt){
|
||||
evt.preventDefault();
|
||||
$('#changeAmModal').modal('show');
|
||||
});
|
||||
|
||||
$('.paymentEntryEditBtn').click(function(tve){
|
||||
tve.preventDefault();
|
||||
//var theIDD = $("input[name=payment_entry_id]").val();
|
||||
@@ -593,6 +599,49 @@ $(document).ready(function(){
|
||||
}
|
||||
});
|
||||
});
|
||||
$('#changeAmForm').submit(function(evt){
|
||||
evt.preventDefault();
|
||||
var formData = new FormData($(this)[0]);
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: base_url + '/clients/changeam',
|
||||
data : formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
async: false,
|
||||
success: function (data){
|
||||
if (data.code === 1) {
|
||||
$.alert({
|
||||
title: 'Alert!',
|
||||
content: 'Account Manager successfully changed',
|
||||
});
|
||||
setTimeout(function(){
|
||||
location.reload();
|
||||
}, 8000);
|
||||
}
|
||||
else if (data.code > 1) {
|
||||
$.alert({
|
||||
title: 'Alert!',
|
||||
content: data.msg,
|
||||
});
|
||||
}
|
||||
else {
|
||||
$.alert({
|
||||
title: 'Alert!',
|
||||
content: 'Your request could not be handled. Try again !',
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
error: function (data) {
|
||||
var output = $.parseJSON(data.responseText);
|
||||
console.log(output);
|
||||
},
|
||||
fail : function(errordata){
|
||||
console.log(errordata);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#newSenderIdForm').submit(function(evt){
|
||||
evt.preventDefault();
|
||||
|
||||
Reference in New Issue
Block a user