mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Añadiendo funcionalidad a servicios presupuestos
This commit is contained in:
@ -12,6 +12,8 @@ return [
|
|||||||
'Close' => 'Close',
|
'Close' => 'Close',
|
||||||
'Dashboard' => 'Dashboard',
|
'Dashboard' => 'Dashboard',
|
||||||
'Delete' => 'Delete',
|
'Delete' => 'Delete',
|
||||||
|
'Clone' => 'Clone',
|
||||||
|
'Print' => 'Print',
|
||||||
'Error' => 'Error',
|
'Error' => 'Error',
|
||||||
'Groups' => 'Groups',
|
'Groups' => 'Groups',
|
||||||
'Home' => 'Home',
|
'Home' => 'Home',
|
||||||
|
|||||||
@ -12,6 +12,8 @@ return [
|
|||||||
'Close' => 'Cerrar',
|
'Close' => 'Cerrar',
|
||||||
'Dashboard' => 'Panel de control',
|
'Dashboard' => 'Panel de control',
|
||||||
'Delete' => 'Borrar',
|
'Delete' => 'Borrar',
|
||||||
|
'Clone' => 'Duplicar',
|
||||||
|
'Print' => 'Imprimir',
|
||||||
'Error' => 'Error',
|
'Error' => 'Error',
|
||||||
'Groups' => 'Grupos',
|
'Groups' => 'Grupos',
|
||||||
'Home' => 'Inicio',
|
'Home' => 'Inicio',
|
||||||
|
|||||||
@ -15,13 +15,11 @@ class PresupuestoAcabadoModel extends \App\Models\GoBaseModel
|
|||||||
|
|
||||||
const SORTABLE = [
|
const SORTABLE = [
|
||||||
0 => "t1.nombre",
|
0 => "t1.nombre",
|
||||||
1 => "t1.apellidos",
|
1 => "t1.precio",
|
||||||
2 => "t1.cargo",
|
2 => "t1.precio_unidad"
|
||||||
3 => "t1.telefono",
|
|
||||||
4 => "t1.email",
|
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $allowedFields = ["cliente_id", "cargo", "nombre", "apellidos", "telefono", "email"];
|
protected $allowedFields = ["presupuesto_id", "tarifa_acabado_id", "nombre", "precio", "precio_unidad"];
|
||||||
protected $returnType = "App\Entities\Presupuestos\PresupuestoAcabadosEntity";
|
protected $returnType = "App\Entities\Presupuestos\PresupuestoAcabadosEntity";
|
||||||
|
|
||||||
protected $useTimestamps = true;
|
protected $useTimestamps = true;
|
||||||
@ -33,45 +31,16 @@ class PresupuestoAcabadoModel extends \App\Models\GoBaseModel
|
|||||||
public static $labelField = "nombre";
|
public static $labelField = "nombre";
|
||||||
|
|
||||||
protected $validationRules = [
|
protected $validationRules = [
|
||||||
"apellidos" => [
|
"precio" => [
|
||||||
"label" => "ClienteContactos.apellidos",
|
"label" => "ClienteContactos.precio",
|
||||||
"rules" => "trim|max_length[500]",
|
|
||||||
],
|
|
||||||
"cargo" => [
|
|
||||||
"label" => "ClienteContactos.cargo",
|
|
||||||
"rules" => "trim|max_length[100]",
|
"rules" => "trim|max_length[100]",
|
||||||
],
|
],
|
||||||
"email" => [
|
|
||||||
"label" => "ClienteContactos.email",
|
|
||||||
"rules" => "trim|max_length[150]|valid_email|permit_empty",
|
|
||||||
],
|
|
||||||
"nombre" => [
|
|
||||||
"label" => "ClienteContactos.nombre",
|
|
||||||
"rules" => "trim|max_length[100]",
|
|
||||||
],
|
|
||||||
"telefono" => [
|
|
||||||
"label" => "ClienteContactos.telefono",
|
|
||||||
"rules" => "trim|max_length[20]",
|
|
||||||
],
|
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $validationMessages = [
|
protected $validationMessages = [
|
||||||
"apellidos" => [
|
"precio" => [
|
||||||
"max_length" => "ClienteContactos.validation.apellidos.max_length",
|
"max_length" => "ClienteContactos.validation.apellidos.max_length",
|
||||||
],
|
],
|
||||||
"cargo" => [
|
|
||||||
"max_length" => "ClienteContactos.validation.cargo.max_length",
|
|
||||||
],
|
|
||||||
"email" => [
|
|
||||||
"max_length" => "ClienteContactos.validation.email.max_length",
|
|
||||||
"valid_email" => "ClienteContactos.validation.email.valid_email",
|
|
||||||
],
|
|
||||||
"nombre" => [
|
|
||||||
"max_length" => "ClienteContactos.validation.nombre.max_length",
|
|
||||||
],
|
|
||||||
"telefono" => [
|
|
||||||
"max_length" => "ClienteContactos.validation.telefono.max_length",
|
|
||||||
],
|
|
||||||
];
|
];
|
||||||
|
|
||||||
public function findAllWithClientes(string $selcols = "*", int $limit = null, int $offset = 0)
|
public function findAllWithClientes(string $selcols = "*", int $limit = null, int $offset = 0)
|
||||||
@ -117,7 +86,7 @@ class PresupuestoAcabadoModel extends \App\Models\GoBaseModel
|
|||||||
? $builder
|
? $builder
|
||||||
: $builder
|
: $builder
|
||||||
->groupStart()
|
->groupStart()
|
||||||
->like("t1.cargo", $search)
|
->like("t1.nombre", $search)
|
||||||
->orLike("t1.nombre", $search)
|
->orLike("t1.nombre", $search)
|
||||||
->orLike("t1.apellidos", $search)
|
->orLike("t1.apellidos", $search)
|
||||||
->orLike("t1.telefono", $search)
|
->orLike("t1.telefono", $search)
|
||||||
|
|||||||
@ -24,7 +24,9 @@
|
|||||||
name="save"
|
name="save"
|
||||||
value="<?= lang("Basic.global.Save") ?>"
|
value="<?= lang("Basic.global.Save") ?>"
|
||||||
/>
|
/>
|
||||||
<?= anchor(route_to("cosidotapablandaList"), lang("Basic.global.Cancel"), ["class" => "btn btn-secondary float-start",]) ?>
|
<?= anchor(route_to("#"), lang("Basic.global.Print"), ["class" => "btn btn-dark float-start me-sm-3 me-1",]) ?>
|
||||||
|
<?= anchor(route_to("#"), lang("Basic.global.Clone"), ["class" => "btn btn-info float-start me-sm-3 me-1",]) ?>
|
||||||
|
<?= anchor(route_to("cosidotapablandaList"), lang("Basic.global.Cancel"), ["class" => "btn btn-secondary float-start",]) ?>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div><!-- //.card -->
|
</div><!-- //.card -->
|
||||||
|
|||||||
Reference in New Issue
Block a user