This commit is contained in:
2023-08-08 16:26:18 +03:00
parent 014ccf8f45
commit 8f3773cda4
3 changed files with 17 additions and 6 deletions

View File

@@ -29,7 +29,7 @@ function check_new_messages_timeout(){
check_new_messages(window,it)
}
},
10000)
60000)
}
var data = null

View File

@@ -143,13 +143,24 @@ function createTicket (el) {
}
function selectedUserMessenger (el,ticket_id){
let data = {
'ticket_id': ticket_id
function selectedUserMessenger (ticket_id=null,user_id=null){
let data = null
let url = null
if (ticket_id !== null){
data = {
'ticket_id': ticket_id
}
url = 'support_show_chat_by_ticket/'
} else if (user_id !== null){
data = {
'user_id': user_id
}
url = 'show_chat_w_user/'
}
$.ajax({
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
url: '/ru/messages/support_show_chat_by_ticket/',
url: '/ru/messages/' + url,
type: "POST",
// async: true,
cache: false,

View File

@@ -69,7 +69,7 @@
<div class="block-list-of-users">
<span class="title-list-of-users">Чаты:</span>
<div class="insert_users">
{% for receiver in receivers %}
{% for item in receivers %}
{% include "widgets/w_chat_right_panel_tickets.html" %}
{% endfor %}
</div>