mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Merge branch 'fix/logistica-controller' into 'main'
fix logistica controller See merge request jjimenez/safekat!641
This commit is contained in:
@ -977,9 +977,7 @@ $routes->group('soporte', ['namespace' => 'App\Controllers\Soporte'], function (
|
||||
$routes->get('image/(:segment)', 'Ticketcontroller::image/$1');
|
||||
});
|
||||
|
||||
$routes->group('logistica', ['namespace' => 'App\Controllers\Logistica'], function ($routes) {
|
||||
$routes->get('panel', 'Logisticacontroller::panel', ['as' => 'LogisticaPanel']);
|
||||
});
|
||||
|
||||
|
||||
$routes->group('produccion', ['namespace' => 'App\Controllers\Produccion'], function ($routes) {
|
||||
$routes->group('ordentrabajo', ['namespace' => 'App\Controllers\Produccion'], function ($routes) {
|
||||
|
||||
@ -1,31 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers\Logistica;
|
||||
|
||||
use App\Controllers\BaseController;
|
||||
use App\Services\ImpresoraEtiquetaService;
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
class LogisticaController extends BaseController
|
||||
{
|
||||
|
||||
protected ImpresoraEtiquetaService $impresoraEtiquetaService;
|
||||
protected string $locale;
|
||||
protected array $viewData;
|
||||
|
||||
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||
{
|
||||
$this->impresoraEtiquetaService = service('impresora_etiqueta');
|
||||
$this->locale = session()->get('lang');
|
||||
|
||||
parent::initController($request, $response, $logger);
|
||||
}
|
||||
public function print_test_label()
|
||||
{
|
||||
$etiquetaData = $this->impresoraEtiquetaService->test();
|
||||
$responseMessage = $etiquetaData["status"] ? "OK" : "ERROR";
|
||||
return $this->response->setJSON(["message" => $responseMessage, "data" => $etiquetaData, "status" => $etiquetaData["status"]]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user