[ADD] HELPDESK: Added delete section for the uploaded documents in the tickets and the count of the selected files above the icon in the chat section
This commit is contained in:
@@ -1165,6 +1165,22 @@ def view_ticket_document(request, doc_id):
|
||||
return render(request, "helpdesk/ticket/ticket_document.html", context)
|
||||
|
||||
|
||||
@login_required
|
||||
@hx_request_required
|
||||
def delete_ticket_document(request, doc_id):
|
||||
"""
|
||||
This function used to delete the uploaded document in the modal.
|
||||
Parameters:
|
||||
|
||||
request (HttpRequest): The HTTP request object.
|
||||
id (int): The id of the document.
|
||||
|
||||
"""
|
||||
Attachment.objects.get(id=doc_id).delete()
|
||||
messages.success(request, _("Document has been deleted."))
|
||||
return HttpResponse("<script>window.location.reload()</script>")
|
||||
|
||||
|
||||
@login_required
|
||||
def comment_create(request, ticket_id):
|
||||
""" "
|
||||
|
||||
Reference in New Issue
Block a user