|
|
@ -47,9 +47,9 @@ $(document).ready(function() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if ($('#create-form input[name="create-ticket-date"]').val() != '') {
|
|
|
|
if ($('#create-form input[name="create-ticket-date"]').val() != '') {
|
|
|
|
createTicketDate = moment($('#create-form input[name="create-ticket-date"]')).format('YYYY-MM-DD');
|
|
|
|
createTicketDate = moment($('#create-form input[name="create-ticket-date"]').val()).format('YYYY-MM-DD');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (allDay) {
|
|
|
|
if (!allDay) {
|
|
|
|
start += ' ' + $('#create-form input[name="start-time"]').val();
|
|
|
|
start += ' ' + $('#create-form input[name="start-time"]').val();
|
|
|
|
end += ' ' + $('#create-form input[name="end-time"]').val();
|
|
|
|
end += ' ' + $('#create-form input[name="end-time"]').val();
|
|
|
|
dateFormat = 'YYYY-MM-DD HH:mm:ss';
|
|
|
|
dateFormat = 'YYYY-MM-DD HH:mm:ss';
|
|
|
@ -61,12 +61,14 @@ $(document).ready(function() {
|
|
|
|
startTime: moment(start).format(dateFormat),
|
|
|
|
startTime: moment(start).format(dateFormat),
|
|
|
|
endTime: moment(end).format(dateFormat),
|
|
|
|
endTime: moment(end).format(dateFormat),
|
|
|
|
allDay: allDay,
|
|
|
|
allDay: allDay,
|
|
|
|
comments: $('#create-form input[name="comments"]').val(),
|
|
|
|
comments: $('#create-form textarea[name="comments"]').val(),
|
|
|
|
createTicketDate: createTicketDate,
|
|
|
|
createTicketDate: createTicketDate,
|
|
|
|
assignTo: assignTo,
|
|
|
|
assignTo: assignTo,
|
|
|
|
action: 'create'
|
|
|
|
action: 'create'
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log(data);
|
|
|
|
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
$.ajax({
|
|
|
|
method: 'POST',
|
|
|
|
method: 'POST',
|
|
|
|
url: getHelpdeskUrl() + '/internal-api/admin/calendar',
|
|
|
|
url: getHelpdeskUrl() + '/internal-api/admin/calendar',
|
|
|
@ -77,7 +79,7 @@ $(document).ready(function() {
|
|
|
|
failure: function(data) {
|
|
|
|
failure: function(data) {
|
|
|
|
console.log(data);
|
|
|
|
console.log(data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|