staff members,senderid, documents,bug fixes, etc
This commit is contained in:
81
public/assets/js/clientshow.js
vendored
81
public/assets/js/clientshow.js
vendored
@@ -43,7 +43,6 @@
|
||||
tve.preventDefault();
|
||||
//var theIDD = $("input[name=payment_entry_id]").val();
|
||||
var theIDD = $(this).siblings('.paymentEntryRowId').val();
|
||||
console.log(theIDD);
|
||||
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
@@ -78,6 +77,48 @@
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
$('.notesEditBtn').click(function(tve){
|
||||
tve.preventDefault();
|
||||
//var theIDD = $("input[name=payment_entry_id]").val();
|
||||
var theIDD = $(this).siblings('.notesRowId').val();
|
||||
console.log(theIDD);
|
||||
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: base_url + '/clients/get_note/' + theIDD,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
async: false,
|
||||
success: function (data){
|
||||
if (data.code === 1) {
|
||||
console.log(theIDD);
|
||||
$('#noteIdEdit').val(theIDD);
|
||||
$('#notesServicesEdit').val(data.services_arr).change();
|
||||
$('#notesBodyEdit').val(data.result.notes_body);
|
||||
$('#invoiceStatusEdit').val(data.result.invoice_status).change();
|
||||
$('#remarksEdit').val(data.result.remarks);
|
||||
$('#editNotesFormModal').modal('show');
|
||||
}
|
||||
else if (data.code > 1) {
|
||||
$.alert({
|
||||
title: 'Alert!',
|
||||
content: data.msg,
|
||||
});
|
||||
}
|
||||
else {
|
||||
$.alert({
|
||||
title: 'Alert!',
|
||||
content: 'Your request could not be handled. Try again !',
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -207,6 +248,44 @@
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#editNotesForm').submit(function(evt){
|
||||
evt.preventDefault();
|
||||
console.log($(this).length);
|
||||
var formData = new FormData($(this)[0]);
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: base_url + '/clients/notes_update',
|
||||
data : formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
async: false,
|
||||
success: function (data){
|
||||
if (data.code === 1) {
|
||||
$.alert({
|
||||
title: 'Alert!',
|
||||
content: 'Notes Details successfully updated',
|
||||
});
|
||||
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 !',
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#shortCodeForm').submit(function(evt){
|
||||
evt.preventDefault();
|
||||
|
||||
113
public/assets/js/dashboard.js
vendored
Normal file
113
public/assets/js/dashboard.js
vendored
Normal file
@@ -0,0 +1,113 @@
|
||||
$(document).ready(function(){
|
||||
|
||||
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: base_url + '/dashboard/get_events',
|
||||
// data : formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
async: false,
|
||||
success: function (data){
|
||||
init_calendar(data);
|
||||
},
|
||||
error: function(error){
|
||||
var output = $.parseJSON(error.responseText);
|
||||
console.log(output.errors);
|
||||
$('#ipNotifyArea').removeClass('hidden');
|
||||
$('#ipNotifyArea').addClass('alert alert-danger');
|
||||
$.each(output.errors, function (key, value) {
|
||||
console.log(value[0]);
|
||||
$('#ipNotifyArea').text(value[0]);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
function init_calendar(theData) {
|
||||
console.log(theData);
|
||||
$.each(theData, function (key, value) {
|
||||
console.log(value);
|
||||
});
|
||||
if( typeof ($.fn.fullCalendar) === 'undefined'){ return; }
|
||||
// console.log('init_calendar');
|
||||
|
||||
var date = new Date(),
|
||||
d = date.getDate(),
|
||||
m = date.getMonth(),
|
||||
y = date.getFullYear(),
|
||||
started,
|
||||
categoryClass;
|
||||
|
||||
var calendar = $('#calendar').fullCalendar({
|
||||
header: {
|
||||
left: 'prev,next today',
|
||||
center: 'title',
|
||||
right: 'month,agendaWeek,agendaDay,listMonth'
|
||||
},
|
||||
selectable: true,
|
||||
selectHelper: true,
|
||||
select: function(start, end, allDay) {
|
||||
$('#fc_create').click();
|
||||
|
||||
started = start;
|
||||
ended = end;
|
||||
|
||||
$(".antosubmit").on("click", function() {
|
||||
var title = $("#title").val();
|
||||
if (end) {
|
||||
ended = end;
|
||||
}
|
||||
|
||||
categoryClass = $("#event_type").val();
|
||||
|
||||
if (title) {
|
||||
calendar.fullCalendar('renderEvent', {
|
||||
title: title,
|
||||
start: started,
|
||||
end: end,
|
||||
allDay: allDay
|
||||
},
|
||||
true // make the event "stick"
|
||||
);
|
||||
}
|
||||
|
||||
$('#title').val('');
|
||||
|
||||
calendar.fullCalendar('unselect');
|
||||
|
||||
$('.antoclose').click();
|
||||
|
||||
return false;
|
||||
});
|
||||
},
|
||||
eventClick: function(calEvent, jsEvent, view) {
|
||||
$('#fc_edit').click();
|
||||
$('#title2').val(calEvent.title);
|
||||
|
||||
categoryClass = $("#event_type").val();
|
||||
|
||||
$(".antosubmit2").on("click", function() {
|
||||
calEvent.title = $("#title2").val();
|
||||
|
||||
calendar.fullCalendar('updateEvent', calEvent);
|
||||
$('.antoclose2').click();
|
||||
});
|
||||
|
||||
calendar.fullCalendar('unselect');
|
||||
},
|
||||
editable: true,
|
||||
events: [
|
||||
{
|
||||
title: 'All Day Event',
|
||||
start: new Date(y, m, 1)
|
||||
}
|
||||
]
|
||||
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
|
||||
});
|
||||
129
public/assets/js/mnos.js
vendored
129
public/assets/js/mnos.js
vendored
@@ -1,11 +1,13 @@
|
||||
$('#addIpBtn').click(function(evt){
|
||||
|
||||
evt.preventDefault();
|
||||
console.log('heere');
|
||||
|
||||
$('#newIpModal').modal('show');
|
||||
});
|
||||
|
||||
$('#createNotesBtn').click(function(evt){
|
||||
evt.preventDefault();
|
||||
console.log('foo bar');
|
||||
$('#newNotesForm').modal('show');
|
||||
});
|
||||
|
||||
$('#newIpForm').submit(function(evt){
|
||||
evt.preventDefault();
|
||||
@@ -53,4 +55,123 @@ $('#newIpForm').submit(function(evt){
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
$('.notesEditBtn').click(function(tve){
|
||||
tve.preventDefault();
|
||||
//var theIDD = $("input[name=payment_entry_id]").val();
|
||||
var theIDD = $(this).siblings('.notesRowId').val();
|
||||
console.log(theIDD);
|
||||
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: base_url + '/clients/get_note/' + theIDD,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
async: false,
|
||||
success: function (data){
|
||||
if (data.code === 1) {
|
||||
console.log(theIDD);
|
||||
$('#noteIdEdit').val(theIDD);
|
||||
$('#notesServicesEdit').val(data.services_arr).change();
|
||||
$('#notesBodyEdit').val(data.result.notes_body);
|
||||
$('#invoiceStatusEdit').val(data.result.invoice_status).change();
|
||||
$('#remarksEdit').val(data.result.remarks);
|
||||
$('#editNotesFormModal').modal('show');
|
||||
}
|
||||
else if (data.code > 1) {
|
||||
$.alert({
|
||||
title: 'Alert!',
|
||||
content: data.msg,
|
||||
});
|
||||
}
|
||||
else {
|
||||
$.alert({
|
||||
title: 'Alert!',
|
||||
content: 'Your request could not be handled. Try again !',
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
$('#newNotesFormForm').submit(function(evt){
|
||||
evt.preventDefault();
|
||||
var formData = new FormData($(this)[0]);
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: base_url + '/mnos/notes_store',
|
||||
data : formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
async: false,
|
||||
success: function (data){
|
||||
if (data.code === 1) {
|
||||
$("#newNotesFormForm")[0].reset();
|
||||
$.alert({
|
||||
title: 'Alert!',
|
||||
content: 'Notes added successfully',
|
||||
});
|
||||
setTimeout(function(){
|
||||
location.reload();
|
||||
}, 8000);
|
||||
}
|
||||
else if (data.code > 5) {
|
||||
$.alert({
|
||||
title: 'Alert!',
|
||||
content: data.msg,
|
||||
});
|
||||
}
|
||||
else {
|
||||
$.alert({
|
||||
title: 'Alert!',
|
||||
content: 'Your request could not be handled. Try again !',
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$('#editNotesForm').submit(function(evt){
|
||||
evt.preventDefault();
|
||||
console.log($(this).length);
|
||||
var formData = new FormData($(this)[0]);
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: base_url + '/clients/notes_update',
|
||||
data : formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
async: false,
|
||||
success: function (data){
|
||||
if (data.code === 1) {
|
||||
$.alert({
|
||||
title: 'Alert!',
|
||||
content: 'Notes Details successfully updated',
|
||||
});
|
||||
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 !',
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user