This commit is contained in:
2023-08-15 17:50:11 +03:00
parent 31c51d6c0e
commit e8e9d6af41

View File

@@ -93,9 +93,15 @@ chatSocket.onmessage = function (e) {
if (document.querySelector(".list_linked_tickets") !== null || document.querySelector(".list_unlinked_tickets") !== null) {
document.querySelector(".list_unlinked_tickets").innerHTML = data.tickets_wo_manager_html
if (el_tab !== null) {
document.querySelector(".tab_user_messanger.select").classList.remove("select")
document.querySelector(`[data-cur-receiver-item="${old_item_tab_user}"]`).classList.add("select")
document.querySelector(`[data-cur-receiver-item="${old_item_tab_user}"]`).scrollIntoView({behavior: "smooth"});
let select_tab = document.querySelector(".tab_user_messanger.select")
if (select_tab) {
select_tab.classList.remove("select")
}
let old_insert_tab = document.querySelector(`[data-cur-receiver-item="${old_item_tab_user}"]`)
if (old_insert_tab) {
old_insert_tab.classList.add("select")
old_insert_tab.scrollIntoView({behavior: "smooth"});
}
}
}
@@ -105,8 +111,11 @@ chatSocket.onmessage = function (e) {
document.querySelector(".list_linked_tickets").innerHTML = data.tickets_w_manager_html
if (el_tab !== null){
document.querySelector(".tab_user_messanger.select").classList.remove("select")
document.querySelector(`[data-cur-receiver-item="${old_item_tab_user}"]` ).classList.add("select")
document.querySelector(`[data-cur-receiver-item="${old_item_tab_user}"]` ).scrollIntoView({behavior: "smooth"});
let old_insert_tab = document.querySelector(`[data-cur-receiver-item="${old_item_tab_user}"]`)
if (old_insert_tab) {
old_insert_tab.classList.add("select")
old_insert_tab.scrollIntoView({behavior: "smooth"});
}
}
}