mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Merge branch 'main' into 'mod/plantillas_cliente'
Main See merge request jjimenez/safekat!425
This commit is contained in:
@ -265,7 +265,7 @@ class Users extends \App\Controllers\GoBaseController
|
|||||||
foreach ($chatDepartments as $chatDepartment) {
|
foreach ($chatDepartments as $chatDepartment) {
|
||||||
$this->chat_department_user_model->insert([
|
$this->chat_department_user_model->insert([
|
||||||
"user_id" => $id,
|
"user_id" => $id,
|
||||||
"chat_department_id" => $this->chat_department_model->where("name", $chatDepartment)->first()["id"]
|
"chat_department_id" => $this->chat_department_model->where("name", $chatDepartment)->first()->id
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
$id = $user->id ?? $id;
|
$id = $user->id ?? $id;
|
||||||
|
|||||||
@ -28,5 +28,6 @@ return [
|
|||||||
"add_notification" => "Notificación",
|
"add_notification" => "Notificación",
|
||||||
"check_as_unviewed" => "Marcar como no leídos",
|
"check_as_unviewed" => "Marcar como no leídos",
|
||||||
"add_notification_message" => "Envía a los usuarios añadidos una notificación con los mensajes presentes en el chat.",
|
"add_notification_message" => "Envía a los usuarios añadidos una notificación con los mensajes presentes en el chat.",
|
||||||
"chat_title_presupuesto" => 'Presupuesto[{title,string,0}][{id}]'
|
"chat_title_presupuesto" => 'Presupuesto[{title,string,0}][{id}]',
|
||||||
|
"no_messages_notification" => 'No hay mensajes que revisar por el momento'
|
||||||
];
|
];
|
||||||
@ -136,6 +136,7 @@ $picture = "/assets/img/default-user.png";
|
|||||||
<div class="container-m-nx m-2">
|
<div class="container-m-nx m-2">
|
||||||
<div class="sidebar-body">
|
<div class="sidebar-body">
|
||||||
<!-- Contacts -->
|
<!-- Contacts -->
|
||||||
|
<h6 id="chat-message-notification-title"><?= lang("Chat.no_messages_notification") ?> </h6>
|
||||||
<ul class="list-unstyled chat-contact-list mb-0" id="chat-notification-list">
|
<ul class="list-unstyled chat-contact-list mb-0" id="chat-notification-list">
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@ -722,9 +722,11 @@ export const showNotificationMessages = (dom) => {
|
|||||||
dom.empty()
|
dom.empty()
|
||||||
$("#chat-notification-number")
|
$("#chat-notification-number")
|
||||||
if (data.totalMessages > 0) {
|
if (data.totalMessages > 0) {
|
||||||
|
$("#chat-message-notification-title").addClass("d-none")
|
||||||
$("#chat-notification-number").removeClass("d-none")
|
$("#chat-notification-number").removeClass("d-none")
|
||||||
$("#chat-notification-number").text(data.totalMessages ?? 0)
|
$("#chat-notification-number").text(data.totalMessages ?? 0)
|
||||||
} else {
|
} else {
|
||||||
|
$("#chat-message-notification-title").removeClass("d-none")
|
||||||
$("#chat-notification-number").addClass("d-none")
|
$("#chat-notification-number").addClass("d-none")
|
||||||
$("#chat-notification-number").text(0)
|
$("#chat-notification-number").text(0)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,7 +14,7 @@ class MessagePage {
|
|||||||
this.formNewDirectMessage = this.modalNewMessage.item.find("#formNewDirectMessage")
|
this.formNewDirectMessage = this.modalNewMessage.item.find("#formNewDirectMessage")
|
||||||
this.alert = new Alert($("#alertDirectMessage"))
|
this.alert = new Alert($("#alertDirectMessage"))
|
||||||
this.selectUsers = $("#select-users")
|
this.selectUsers = $("#select-users")
|
||||||
this.selectUsers = $("#select-departments")
|
this.selectDepartments = $("#select-departments")
|
||||||
|
|
||||||
this.selectPlaceholder = {
|
this.selectPlaceholder = {
|
||||||
id: '0',
|
id: '0',
|
||||||
@ -25,7 +25,7 @@ class MessagePage {
|
|||||||
text: "Seleccione un departamento"
|
text: "Seleccione un departamento"
|
||||||
}
|
}
|
||||||
this.selectMessageUsers = new ClassSelect(this.selectUsers, '/chat/users/all', this.selectPlaceholder, true)
|
this.selectMessageUsers = new ClassSelect(this.selectUsers, '/chat/users/all', this.selectPlaceholder, true)
|
||||||
this.selectChatDepartment = new ClassSelect(this.selectUsers, '/chat/department/select', this.selectDepartmentPlaceholder, true)
|
this.selectChatDepartment = new ClassSelect(this.selectDepartments, '/chat/department/select', this.selectDepartmentPlaceholder, true)
|
||||||
|
|
||||||
}
|
}
|
||||||
init() {
|
init() {
|
||||||
|
|||||||
Reference in New Issue
Block a user