Browse Source

new configs

pull/3/head
Simples IP Desenvolvimento 2 years ago
parent
commit
ce9498642c
  1. 4
      public/js/requests.js
  2. 15
      public/js/util.js

4
public/js/requests.js

@ -122,7 +122,7 @@ const sairPausa = (matricula) => new Promise((resolve) => {
const entrar = (matricula, queue, empresa) => new Promise((resolve) => { const entrar = (matricula, queue, empresa) => new Promise((resolve) => {
$.ajax({ $.ajax({
url: `${server_api}/auth/entrar-supervisor`, url: `${server_api}/auth/conectar-chat`,
type: "POST", type: "POST",
data: JSON.stringify({ data: JSON.stringify({
id_fila: queue, id_fila: queue,
@ -140,7 +140,7 @@ const entrar = (matricula, queue, empresa) => new Promise((resolve) => {
const sair = (matricula) => { const sair = (matricula) => {
$.ajax({ $.ajax({
url: `${server_api}/auth/sair`, url: `${server_api}/auth/desconectar-chat`,
type: "POST", type: "POST",
data: JSON.stringify({ data: JSON.stringify({
matricula matricula

15
public/js/util.js

@ -1,4 +1,4 @@
/** ROLAGEM DO SCROLL ATÉ NO FINAL DO CHAT */ /** ROLAGEM DO SCROLL AT<EFBFBD> NO FINAL DO CHAT */
const scrollDown = () => { const scrollDown = () => {
$(".chat-window").animate({scrollTop: 99999 * $(this).height() }, 1); $(".chat-window").animate({scrollTop: 99999 * $(this).height() }, 1);
} }
@ -64,7 +64,7 @@ const alertModal = (title, message) => {
} }
/** /**
* HABILITA O ENVIO DE ARQUIVO DE IMAGENS E APRESENTA UMA MODAL PARA APRESENTAÇÃO DA IMAGEM SELECIONADA * HABILITA O ENVIO DE ARQUIVO DE IMAGENS E APRESENTA UMA MODAL PARA APRESENTA<EFBFBD><EFBFBD>O DA IMAGEM SELECIONADA
*/ */
const startSendImage = () => { const startSendImage = () => {
modalStart() modalStart()
@ -87,7 +87,7 @@ const startSendImage = () => {
} }
/** /**
* HABILITA O ENVIO DE ARQUIVO DE IMAGENS E APRESENTA UMA MODAL PARA APRESENTAÇÃO DA IMAGEM SELECIONADA * HABILITA O ENVIO DE ARQUIVO DE IMAGENS E APRESENTA UMA MODAL PARA APRESENTA<EFBFBD><EFBFBD>O DA IMAGEM SELECIONADA
*/ */
const openImgModal = (link) => { const openImgModal = (link) => {
modalStart() modalStart()
@ -193,7 +193,7 @@ const startTransfer = () => {
return `<select id="selectranfer">${optAgent}</select>` return `<select id="selectranfer">${optAgent}</select>`
} }
$('#transfersend').hide() $('#transfersend').hide()
return `<h3>Nenhum agente disponível no momento!</h3>` return `<h3>Nenhum agente disponível no momento!</h3>`
}); });
}) })
@ -221,7 +221,6 @@ const exitSystem = () => {
}) })
} }
const startFinalizar = () => { const startFinalizar = () => {
$("#finalizaratendimento").on('click', function(){ $("#finalizaratendimento").on('click', function(){
if(confirm('Deseja realmente finalizar o atendimento?')){ if(confirm('Deseja realmente finalizar o atendimento?')){
@ -231,7 +230,7 @@ const startFinalizar = () => {
} }
/** /**
* FUNÇÃO PARA RECUPERAR O AUDIO DO MICROFONE * FUNCAO PARA RECUPERAR O AUDIO DO MICROFONE
*/ */
function recorderVoice () { function recorderVoice () {
$('#modalselect').show() $('#modalselect').show()
@ -451,7 +450,7 @@ const notifications = (obj = {}) => {
if(el.uniqueid == obj.uniqueid){ if(el.uniqueid == obj.uniqueid){
/** MARCA ATENDIMENTO COMO FINALIZADO */ /** MARCA ATENDIMENTO COMO FINALIZADO */
obj.action == "finish" ? el.status = 0 : null obj.action == "finish" ? el.status = 0 : null
/** REMOVE OS BOTÕES E CAIXA DE TEXTO DEPOIS DA FINALIZACAO */ /** REMOVE OS BOT<EFBFBD>ES E CAIXA DE TEXTO DEPOIS DA FINALIZACAO */
if(el.uniqueid == localStorage.getItem('session_uniqueid')){ if(el.uniqueid == localStorage.getItem('session_uniqueid')){
hideButtons(true) hideButtons(true)
} }
@ -510,7 +509,7 @@ const supervisorAgente = () => {
/** MONITORA AS CONFIGURACOES */ /** MONITORA AS CONFIGURACOES */
setInterval(() => { setInterval(() => {
statusAgente(localStorage.getItem('my_uniqueid')).then((agente) => { statusAgente(localStorage.getItem('my_uniqueid')).then((agente) => {
if (agente.status == 'error' && agente.message == 'Agente não encontrado') { if (agente.status == 'error' && agente.message == 'Agente não encontrado') {
window.close() window.close()
} }
}) })

Loading…
Cancel
Save