mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Modificado el controlador
This commit is contained in:
@ -2,69 +2,30 @@
|
|||||||
|
|
||||||
namespace App\Controllers\Logistica;
|
namespace App\Controllers\Logistica;
|
||||||
|
|
||||||
use App\Models\Sistema\SettingsModel;
|
use App\Controllers\BaseController;
|
||||||
use CodeIgniter\Controller;
|
use App\Services\ImpresoraEtiquetaService;
|
||||||
|
use CodeIgniter\HTTP\RequestInterface;
|
||||||
|
use CodeIgniter\HTTP\ResponseInterface;
|
||||||
|
use Psr\Log\LoggerInterface;
|
||||||
|
|
||||||
|
class LogisticaController extends BaseController
|
||||||
use App\Models\Collection;
|
|
||||||
|
|
||||||
class Logisticacontroller extends \App\Controllers\BaseResourceController
|
|
||||||
{
|
{
|
||||||
|
|
||||||
protected $modelName = TicketModel::class;
|
protected ImpresoraEtiquetaService $impresoraEtiquetaService;
|
||||||
protected $format = 'json';
|
protected string $locale;
|
||||||
|
protected array $viewData;
|
||||||
|
|
||||||
protected static $singularObjectNameCc = 'logistica';
|
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||||
protected static $singularObjectName = 'Logistica';
|
|
||||||
protected static $pluralObjectName = 'Logistica';
|
|
||||||
protected static $controllerSlug = 'logistica';
|
|
||||||
|
|
||||||
protected static $viewPath = 'themes/vuexy/form/logistica/';
|
|
||||||
|
|
||||||
protected $indexRoute = 'panel';
|
|
||||||
|
|
||||||
|
|
||||||
public function initController(\CodeIgniter\HTTP\RequestInterface $request, \CodeIgniter\HTTP\ResponseInterface $response, \Psr\Log\LoggerInterface $logger)
|
|
||||||
{
|
{
|
||||||
$this->viewData['pageTitle'] = lang('Logistica.logistica');
|
$this->impresoraEtiquetaService = service('impresora_etiqueta');
|
||||||
|
$this->locale = session()->get('lang');
|
||||||
// Breadcrumbs
|
|
||||||
$this->viewData['breadcrumb'] = [
|
|
||||||
['title' => lang("App.menu_logistica"), 'route' => "javascript:void(0);", 'active' => false],
|
|
||||||
];
|
|
||||||
|
|
||||||
parent::initController($request, $response, $logger);
|
parent::initController($request, $response, $logger);
|
||||||
}
|
}
|
||||||
|
public function print_test_label()
|
||||||
public function index()
|
|
||||||
{
|
{
|
||||||
//checkPermission('tickets.menu');
|
$etiquetaData = $this->impresoraEtiquetaService->test();
|
||||||
|
$responseMessage = $etiquetaData["status"] ? "OK" : "ERROR";
|
||||||
/*$viewData = [
|
return $this->response->setJSON(["message" => $responseMessage, "data" => $etiquetaData, "status" => $etiquetaData["status"]]);
|
||||||
'currentModule' => static::$controllerSlug,
|
|
||||||
'pageSubTitle' => lang('Basic.global.ManageAllRecords', [lang('Tickets.tickets')]),
|
|
||||||
'usingServerSideDataTable' => true,
|
|
||||||
'userType' => auth()->user()->can('tickets.edit') ? 1 : 0,
|
|
||||||
];
|
|
||||||
|
|
||||||
$viewData = array_merge($this->viewData, $viewData); // merge any possible values from the parent controller class
|
|
||||||
|
|
||||||
return view(static::$viewPath . 'viewTicketList', $viewData);*/
|
|
||||||
}
|
|
||||||
|
|
||||||
public function panel()
|
|
||||||
{
|
|
||||||
//checkPermission('tickets.menu');
|
|
||||||
|
|
||||||
$viewData = [
|
|
||||||
'currentModule' => static::$controllerSlug,
|
|
||||||
'boxTitle' => lang('Logistica.panel'),
|
|
||||||
'pageSubTitle' => 'Panel',
|
|
||||||
'usingServerSideDataTable' => true,
|
|
||||||
];
|
|
||||||
|
|
||||||
$viewData = array_merge($this->viewData, $viewData); // merge any possible values from the parent controller class
|
|
||||||
|
|
||||||
return view(static::$viewPath . 'viewPanelLogistica', $viewData);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user