fix : mensaje-internos only users in group admin and beta

This commit is contained in:
amazuecos
2024-10-14 16:20:59 +00:00
parent 2012ada27f
commit 29eeecb905
11 changed files with 38 additions and 26 deletions

View File

@ -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;