servicio cliente tareas

This commit is contained in:
amazuecos
2024-12-10 07:35:25 +01:00
parent 0b4105f5bd
commit 9a57312601
17 changed files with 615 additions and 16 deletions

View File

@ -1,4 +1,6 @@
<?php namespace App\Controllers\Tarifas;
<?php
namespace App\Controllers\Tarifas;
use App\Controllers\BaseResourceController;
@ -130,7 +132,7 @@ class Tarifasmanipulado extends \App\Controllers\BaseResourceController
$this->viewData['tarifaManipuladoEntity'] = isset($sanitizedData) ? new TarifaManipuladoEntity($sanitizedData) : new TarifaManipuladoEntity();
$this->viewData['formAction'] = site_url('tarifas/tarifasmanipulado/add');//route_to('createTarifaManipulado');
$this->viewData['formAction'] = site_url('tarifas/tarifasmanipulado/add'); //route_to('createTarifaManipulado');
$this->viewData['boxTitle'] = lang('Basic.global.addNew') . ' ' . lang('Tarifamanipulado.moduleTitle') . ' ' . lang('Basic.global.addNewSuffix');
@ -153,7 +155,7 @@ class Tarifasmanipulado extends \App\Controllers\BaseResourceController
$message = lang('Basic.global.notFoundWithIdErr', [mb_strtolower(lang('Tarifamanipulado.tarifamanipulado')), $id]);
return $this->redirect2listView('sweet-error', $message);
endif;
if ($this->request->getPost()) :
@ -293,5 +295,19 @@ class Tarifasmanipulado extends \App\Controllers\BaseResourceController
return $this->failUnauthorized('Invalid request', 403);
}
}
public function show_select()
{
$query = $this->model->builder()
->select(
["id", "nombre as name", "code as description"]
)
->where("deleted_at", null);
if ($this->request->getGet("q")) {
$query->groupStart()
->orLike("nombre", $this->request->getGet("q"))
->groupEnd();
}
return $this->response->setJSON($query->get()->getResultObject());
}
}