[RMV] GENERAL: Unwanted codes
This commit is contained in:
@@ -477,15 +477,11 @@
|
||||
</div>
|
||||
<script>
|
||||
function handleSuccess() {
|
||||
alert('----------------------------')
|
||||
|
||||
}
|
||||
function updateStatus(){
|
||||
console.log('-----updateStatus-----')
|
||||
var status = $("[name='status_update']").val()
|
||||
var ticketID = $("[name='ticketId']").attr('id');
|
||||
console.log(ticketID)
|
||||
console.log(status)
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: `/helpdesk/change-ticket-status/${ticketID}/`,
|
||||
@@ -517,20 +513,15 @@
|
||||
}
|
||||
function showTag()
|
||||
function updateTag(event) {
|
||||
console.log('--------updateTag------');
|
||||
var ticketId = $("[name='ticketId']").attr('id');
|
||||
console.log(ticketId)
|
||||
var selectedValues = $("#id_tags option:selected").map(function(){
|
||||
return $(this).val();
|
||||
}).get();
|
||||
console.log(selectedValues)
|
||||
// Check if 'create_new_tag' exists in the list
|
||||
if (selectedValues.includes('create_new_tag')) {
|
||||
console.log("'create_new_tag' is selected. Perform specific action.");
|
||||
$("#editModal").addClass("oh-modal--show");
|
||||
} else {
|
||||
// ajax function for save the tag to ticket
|
||||
console.log("'create_new_tag' is not selected. Perform other action.");
|
||||
$.ajax({
|
||||
type:'GET',
|
||||
url:'/helpdesk/ticket-change-tag',
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
$(document).ready( function(){
|
||||
$('#id_assigning_type').change(function(){
|
||||
var assigning_type = $('#id_assigning_type').val()
|
||||
console.log(assigning_type)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "/helpdesk/get-raised-on",
|
||||
@@ -37,7 +36,6 @@
|
||||
'assigning_type':assigning_type,
|
||||
},
|
||||
success: function (response) {
|
||||
console.log(response.raised_on)
|
||||
var raised_on = response.raised_on
|
||||
// Clear the existing options
|
||||
$('#id_raised_on').empty();
|
||||
@@ -46,7 +44,6 @@
|
||||
$('#id_raised_on').append(options)
|
||||
$.each(raised_on, function (id,obj) {
|
||||
// looping all raised_on
|
||||
console.log(obj.id,obj.name)
|
||||
var options = $(`<option value=" ${obj.id}">`).text(obj.name);
|
||||
$('#id_raised_on').append(options)
|
||||
});
|
||||
|
||||
@@ -1,39 +1,3 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@login_required
|
||||
def comment_edit(request):
|
||||
comment_id = request.POST.get('comment_id')
|
||||
new_comment = request.POST.get('new_comment')
|
||||
print(new_comment)
|
||||
if len(new_comment)>1:
|
||||
comment = Comment.objects.get(id=comment_id)
|
||||
comment.comment = new_comment
|
||||
comment.save()
|
||||
messages.success(request,_('The comment updated successfully.'))
|
||||
|
||||
else:
|
||||
messages.error(request,_('The comment needs to be atleast 2 charactors.'))
|
||||
response= {
|
||||
"errors": 'no_error',
|
||||
}
|
||||
return JsonResponse(response)
|
||||
|
||||
|
||||
@login_required
|
||||
def comment_delete(request,comment_id):
|
||||
comment = Comment.objects.get(id=comment_id)
|
||||
comment.delete()
|
||||
messages.success(request,_('The comment "{}" has been deleted successfully.').format(comment))
|
||||
|
||||
return HttpResponseRedirect(request.META.get("HTTP_REFERER", "/"))
|
||||
Reference in New Issue
Block a user