vista creada de envios

This commit is contained in:
2025-04-13 20:28:05 +02:00
parent 084f3220e1
commit f0a4f19089
5 changed files with 151 additions and 7 deletions

View File

@ -15,11 +15,22 @@ class LogisticaController extends BaseController
protected string $locale;
protected array $viewData;
protected static $controllerSlug = 'logistica';
protected static $viewPath = 'themes/vuexy/form/logistica/';
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
$this->impresoraEtiquetaService = service('impresora_etiqueta');
$this->locale = session()->get('lang');
$this->viewData['pageTitle'] = lang('Logistica.logistica');
// Breadcrumbs
$this->viewData['breadcrumb'] = [
['title' => lang("App.menu_logistica"), 'route' => "javascript:void(0);", 'active' => false],
];
parent::initController($request, $response, $logger);
}
public function print_test_label()
@ -28,4 +39,33 @@ class LogisticaController extends BaseController
$responseMessage = $etiquetaData["status"] ? "OK" : "ERROR";
return $this->response->setJSON(["message" => $responseMessage, "data" => $etiquetaData, "status" => $etiquetaData["status"]]);
}
public function panel()
{
$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);
}
public function selectorEnvios($tipoEnvio = null)
{
$viewData = [
'currentModule' => static::$controllerSlug,
'boxTitle' => lang('Logistica.envioSimpleMultiple'),
'usingServerSideDataTable' => true,
'tipoEnvio' => $tipoEnvio,
];
$viewData = array_merge($this->viewData, $viewData); // merge any possible values from the parent controller class
return view(static::$viewPath . 'viewLogisticaSelectEnvios', $viewData);
}
}