add messages to ot

This commit is contained in:
amazuecos
2025-04-15 00:42:24 +02:00
parent 14c5cf493c
commit 9f46569b01
17 changed files with 445 additions and 14 deletions

View File

@ -136,6 +136,7 @@ class ChatDeparmentModel extends Model
->where('chat_department_users.presupuesto_id',null)
->where('chat_department_users.pedido_id',null)
->where('chat_department_users.factura_id',null)
->where('chat_department_users.orden_trabajo_id',null)
->get();
return $result->getResultObject() ?: [];
@ -161,6 +162,13 @@ class ChatDeparmentModel extends Model
->get()->getResultObject();
return $result;
}
public function getChatDeparmentOrdenTrabajoUsers(int $chat_deparment_id, int $orden_trabajo_id)
{
$result = $this->getChatDeparmentUserQuery($chat_deparment_id)
->where('chat_department_users.orden_trabajo_id', $orden_trabajo_id)
->get()->getResultObject();
return $result;
}
public function getDisplay(int $chat_deparment_id): string
{
return $this->find($chat_deparment_id)->display;