diff --git a/ci4/app/Models/Chat/ChatModel.php b/ci4/app/Models/Chat/ChatModel.php index 161b8115..7405f3b9 100644 --- a/ci4/app/Models/Chat/ChatModel.php +++ b/ci4/app/Models/Chat/ChatModel.php @@ -210,6 +210,7 @@ class ChatModel extends Model ->join("chat_departments","chat_departments.id = chats.chat_department_id","left") ->join("pedidos","pedidos.id = chats.pedido_id","left") ->whereIn("pedidos.id",$pedidos) + ->where("chats.chat_department_id is NOT NULL",NULL,FALSE) ->get()->getResultObject(); $chatMessageModel = model(ChatMessageModel::class); $count = 0; @@ -237,6 +238,7 @@ class ChatModel extends Model ->join("chat_departments","chat_departments.id = chats.chat_department_id","left") ->join("facturas","facturas.id = chats.factura_id","left") ->whereIn("facturas.id",$facturas) + ->where("chats.chat_department_id is NOT NULL",NULL,FALSE) ->get()->getResultObject(); $chatMessageModel = model(ChatMessageModel::class); $count = 0; @@ -264,6 +266,7 @@ class ChatModel extends Model ->join("chat_departments","chat_departments.id = chats.chat_department_id","left") ->join("presupuestos","presupuestos.id = chats.presupuesto_id","left") ->whereIn("presupuestos.id",$presupuestos) + ->where("chats.chat_department_id is NOT NULL",NULL,FALSE) ->get()->getResultObject(); $chatMessageModel = model(ChatMessageModel::class); $count = 0; diff --git a/ci4/app/Views/themes/vuexy/components/chat_internal_factura.php b/ci4/app/Views/themes/vuexy/components/chat_internal_factura.php index 210be798..8b6ec719 100644 --- a/ci4/app/Views/themes/vuexy/components/chat_internal_factura.php +++ b/ci4/app/Views/themes/vuexy/components/chat_internal_factura.php @@ -15,17 +15,21 @@ + user()->inGroup('admin') || auth()->user()->inGroup('beta')) { ?> +
+ user()->inGroup('admin') || auth()->user()->inGroup('beta')) { ?> +
diff --git a/ci4/app/Views/themes/vuexy/components/chat_internal_pedido.php b/ci4/app/Views/themes/vuexy/components/chat_internal_pedido.php index 800229f2..bc6f8813 100644 --- a/ci4/app/Views/themes/vuexy/components/chat_internal_pedido.php +++ b/ci4/app/Views/themes/vuexy/components/chat_internal_pedido.php @@ -15,17 +15,21 @@ + user()->inGroup('admin') || auth()->user()->inGroup('beta')) { ?> +
- + user()->inGroup('admin') || auth()->user()->inGroup('beta')) { ?> + +
diff --git a/ci4/app/Views/themes/vuexy/components/chat_internal_presupuesto.php b/ci4/app/Views/themes/vuexy/components/chat_internal_presupuesto.php index e8775dde..d8509da1 100644 --- a/ci4/app/Views/themes/vuexy/components/chat_internal_presupuesto.php +++ b/ci4/app/Views/themes/vuexy/components/chat_internal_presupuesto.php @@ -15,17 +15,21 @@ + user()->inGroup('admin') || auth()->user()->inGroup('beta')) { ?> +
- + user()->inGroup('admin') || auth()->user()->inGroup('beta')) { ?> + +
diff --git a/ci4/app/Views/themes/vuexy/components/chat_pedido.php b/ci4/app/Views/themes/vuexy/components/chat_pedido.php index 44e17de6..03768365 100644 --- a/ci4/app/Views/themes/vuexy/components/chat_pedido.php +++ b/ci4/app/Views/themes/vuexy/components/chat_pedido.php @@ -37,16 +37,6 @@ - - diff --git a/ci4/app/Views/themes/vuexy/components/chat_presupuesto.php b/ci4/app/Views/themes/vuexy/components/chat_presupuesto.php index cf791d27..5a9bb075 100644 --- a/ci4/app/Views/themes/vuexy/components/chat_presupuesto.php +++ b/ci4/app/Views/themes/vuexy/components/chat_presupuesto.php @@ -1,4 +1,4 @@ -
+
diff --git a/httpdocs/assets/js/safekat/components/chat.js b/httpdocs/assets/js/safekat/components/chat.js index 0eddb850..c5f38afa 100644 --- a/httpdocs/assets/js/safekat/components/chat.js +++ b/httpdocs/assets/js/safekat/components/chat.js @@ -54,14 +54,15 @@ class Chat { if (this.chatContactsBody[0]) { this.scrollbarContacts = new PerfectScrollbar(this.chatContactsBody[0], { wheelPropagation: false, - suppressScrollX: true + suppressScrollX: true, }); } if (this.chatHistoryBody[0]) { this.scrollbarChatHistory = new PerfectScrollbar(this.chatHistoryBody[0], { wheelPropagation: false, - suppressScrollX: true + suppressScrollX: true, + }); } } diff --git a/httpdocs/assets/js/safekat/pages/chatFactura.js b/httpdocs/assets/js/safekat/pages/chatFactura.js index bfeacc7e..a70088e2 100644 --- a/httpdocs/assets/js/safekat/pages/chatFactura.js +++ b/httpdocs/assets/js/safekat/pages/chatFactura.js @@ -5,7 +5,9 @@ $(document).ready(() => { let chat = new Chat($("#chat-factura")) chat.init() chat.initFactura() + if($("#internal_messages_chat").length > 0){ let internalMessages = new InternalMessages($("#internal_messages_chat")) internalMessages.init() + } }) \ No newline at end of file diff --git a/httpdocs/assets/js/safekat/pages/chatPedido.js b/httpdocs/assets/js/safekat/pages/chatPedido.js index 681f25df..f987780c 100644 --- a/httpdocs/assets/js/safekat/pages/chatPedido.js +++ b/httpdocs/assets/js/safekat/pages/chatPedido.js @@ -5,7 +5,9 @@ $(document).ready(() => { let chat = new Chat($("#chat-pedido")) chat.init() chat.initPedido() - let internalMessages = new InternalMessages($("#internal_messages_chat")) - internalMessages.init() + if($("#internal_messages_chat").length > 0){ + let internalMessages = new InternalMessages($("#internal_messages_chat")) + internalMessages.init() + } }) \ No newline at end of file diff --git a/httpdocs/assets/js/safekat/pages/chatPresupuesto.js b/httpdocs/assets/js/safekat/pages/chatPresupuesto.js index c8f8e2d8..8a6ee177 100644 --- a/httpdocs/assets/js/safekat/pages/chatPresupuesto.js +++ b/httpdocs/assets/js/safekat/pages/chatPresupuesto.js @@ -5,7 +5,9 @@ $(document).ready(() => { let chat = new Chat($("#chat-presupuesto")) chat.init() chat.initPresupuesto() + if($("#internal_messages_chat").length > 0){ let internalMessages = new InternalMessages($("#internal_messages_chat")) internalMessages.init() + } }) \ No newline at end of file diff --git a/httpdocs/themes/vuexy/vendor/css/pages/app-chat.css b/httpdocs/themes/vuexy/vendor/css/pages/app-chat.css index a5b4d535..e1d82c36 100755 --- a/httpdocs/themes/vuexy/vendor/css/pages/app-chat.css +++ b/httpdocs/themes/vuexy/vendor/css/pages/app-chat.css @@ -7,7 +7,7 @@ a.send-msg-btn { } @media (min-width: 1200px) { .layout-horizontal .app-chat { - height: calc(100vh - 11.5rem - 2.2rem) !important; + height: calc(100vh - 20rem - 2.2rem) !important; } } @media (max-width: 992px) { @@ -35,7 +35,7 @@ a.send-msg-btn { } @media (min-width: 1200px) { .layout-horizontal .app-chat .app-chat-contacts { - height: calc(100vh - 11.5rem - 2.2rem); + height: calc(100vh - 20rem - 2.2rem); } } @media (min-width: 992px) { @@ -97,7 +97,7 @@ a.send-msg-btn { } @media (min-width: 1200px) { .layout-horizontal .app-chat .app-chat-sidebar-left { - height: calc(100vh - 11.5rem - 2.2rem); + height: calc(100vh - 20rem - 2.2rem); } } .app-chat .app-chat-sidebar-left.show { @@ -119,7 +119,7 @@ a.send-msg-btn { } @media (min-width: 1200px) { .layout-horizontal .app-chat .app-chat-history { - height: calc(100vh - 11.5rem - 2.2rem); + height: calc(100vh - 20rem - 2.2rem); } } .app-chat .app-chat-history .chat-history-header { @@ -182,7 +182,7 @@ a.send-msg-btn { } @media (min-width: 1200px) { .layout-horizontal .app-chat .app-chat-sidebar-right { - height: calc(100vh - 11.5rem - 2.2rem); + height: calc(100vh - 20rem - 2.2rem); } } .app-chat .app-chat-sidebar-right.show {