From 41783f5b25cd7a374020fa718d49b2065b1493e6 Mon Sep 17 00:00:00 2001 From: amazuecos Date: Mon, 10 Feb 2025 07:56:48 +0100 Subject: [PATCH] fix message cliente direct from model js --- ci4/app/Models/Chat/ChatModel.php | 4 ++-- httpdocs/assets/js/safekat/pages/chatFactura.js | 2 +- httpdocs/assets/js/safekat/pages/chatPedido.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ci4/app/Models/Chat/ChatModel.php b/ci4/app/Models/Chat/ChatModel.php index 0b14e266..e73fed8e 100644 --- a/ci4/app/Models/Chat/ChatModel.php +++ b/ci4/app/Models/Chat/ChatModel.php @@ -239,7 +239,7 @@ class ChatModel extends Model $count++; } } - $row->uri = "/chat/pedido/" . $row->chatId; + $row->uri = "/pedidos/edit/" . $row->pedidoId; $row->unreadMessages = $count; } return $results; @@ -359,7 +359,7 @@ class ChatModel extends Model $rows_new[] = $row; } elseif ($row->pedidoId) { $row->model = $pedidoModel->find($row->pedidoId); - $row->uri = "/chat/pedido/" . $row->chatId; + $row->uri = "/pedidos/edit/" . $row->chatId . "#accordionChatPedido"; $row->title = $row->pedidoId; if($row->chatDepartmentId){ $row->chatDisplay .= "[INTERNAL]"; diff --git a/httpdocs/assets/js/safekat/pages/chatFactura.js b/httpdocs/assets/js/safekat/pages/chatFactura.js index 8465e69b..7009f2da 100644 --- a/httpdocs/assets/js/safekat/pages/chatFactura.js +++ b/httpdocs/assets/js/safekat/pages/chatFactura.js @@ -12,7 +12,7 @@ $(() => { } if ($("#modalNewDirectMessageClient").length > 0) { - let modalDirectMessageClient = new ModalDirectMessageClient("presupuesto", $("#modalNewDirectMessageClient")) + let modalDirectMessageClient = new ModalDirectMessageClient("factura", $("#modalNewDirectMessageClient")) modalDirectMessageClient.init() $("#direct-message-cliente").on("click", () => { modalDirectMessageClient.modal.show() diff --git a/httpdocs/assets/js/safekat/pages/chatPedido.js b/httpdocs/assets/js/safekat/pages/chatPedido.js index f6592a32..735417c8 100644 --- a/httpdocs/assets/js/safekat/pages/chatPedido.js +++ b/httpdocs/assets/js/safekat/pages/chatPedido.js @@ -12,7 +12,7 @@ $(() => { } if ($("#modalNewDirectMessageClient").length > 0) { - let modalDirectMessageClient = new ModalDirectMessageClient("presupuesto", $("#modalNewDirectMessageClient")) + let modalDirectMessageClient = new ModalDirectMessageClient("pedido", $("#modalNewDirectMessageClient")) modalDirectMessageClient.init() $("#direct-message-cliente").on("click", () => { modalDirectMessageClient.modal.show()