terminadas respuesta. falta repasar todo y cabecera datatable y permisos menus y botones

This commit is contained in:
2025-02-17 20:56:32 +01:00
parent 809a705c88
commit 3cdc38b822
10 changed files with 193 additions and 95 deletions

View File

@ -71,7 +71,7 @@ class TicketModel extends \App\Models\BaseModel
return $this->find($id);
}
public function getResource($search = [], )
public function getResource($search = [], $user_id = null)
{
$builder = $this->db
->table($this->table . " t1")
@ -91,6 +91,9 @@ class TicketModel extends \App\Models\BaseModel
$builder->join("tickets_estados t4", "t1.estado_id = t4.id", "left");
$builder->join("tickets_secciones t5", "t1.seccion_id = t5.id", "left");
if ($user_id !== null)
$builder->where("t1.usuario_id", $user_id);
if (empty($search))
return $builder;
else {

View File

@ -0,0 +1,17 @@
<?php
namespace App\Models\Soporte;
class TicketRespuestaModel extends \App\Models\BaseModel
{
protected $table = 'tickets_respuestas';
protected $primaryKey = 'id';
protected $allowedFields = ['ticket_id', 'usuario_id', 'mensaje' ,'createt_at', 'updated_at'];
protected $useTimestamps = true;
protected $returnType = "App\Entities\Soporte\TicketRespuestaEntity";
}