Merge branch 'main' into 'feat/printer-labels'

Main

See merge request jjimenez/safekat!637
This commit is contained in:
Ignacio Martinez Navajas
2025-04-02 10:14:38 +00:00
10 changed files with 268 additions and 42 deletions

View File

@ -977,6 +977,9 @@ $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) {

View File

@ -0,0 +1,70 @@
<?php
namespace App\Controllers\Logistica;
use App\Models\Sistema\SettingsModel;
use CodeIgniter\Controller;
use App\Models\Collection;
class Logisticacontroller extends \App\Controllers\BaseResourceController
{
protected $modelName = TicketModel::class;
protected $format = 'json';
protected static $singularObjectNameCc = 'logistica';
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');
// Breadcrumbs
$this->viewData['breadcrumb'] = [
['title' => lang("App.menu_logistica"), 'route' => "javascript:void(0);", 'active' => false],
];
parent::initController($request, $response, $logger);
}
public function index()
{
//checkPermission('tickets.menu');
/*$viewData = [
'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);
}
}

View File

@ -547,7 +547,7 @@ class Importadorpresupuestos extends \App\Controllers\BaseResourceController
"clienteId" => intval($this->request->getPost('cliente_id') ?? 0),
"isColor" => $isColor,
"isHq" => $isHq,
"papelDiferente" => $papel_interior_diferente,
"papelInteriorDiferente" => $papel_interior_diferente,
"paginasColor" => $paginas_color,
"paginasCuadernillo" => 32,

View File

@ -729,6 +729,7 @@ return [
"menu_logistica" => "Logística",
"menu_logistica_panel" => "Panel",
"menu_logistica_envios" => "Envíos conjuntos",
"menu_logistica_etiquetas" => "Etiquetas",
"menu_logistica_tracking" => "Tracking",

View File

@ -0,0 +1,12 @@
<?php
return [
'logistica' => 'Logística',
'panel' => 'Panel',
'envioSimple' => 'Envío simple',
'envioMultiple' => 'Envío múltiple',
'envioConjunto' => 'Envío conjunto',
'etiquetasTitulos' => 'Etiquetas de títulos',
'etiquetasEnvio' => 'Etiquetas de envío',
'envioFerros' => 'Envío de ferros',
'cerrarOTauto' => 'Cerrar OT automáticamente',
];

View File

@ -0,0 +1,68 @@
<?= $this->include("themes/_commonPartialsBs/sweetalert") ?>
<?= $this->include('themes/_commonPartialsBs/datatables') ?>
<?= $this->extend('themes/vuexy/main/defaultlayout') ?>
<?= $this->section('content'); ?>
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-header">
<h4><?= $boxTitle ?></h4>
</div>
<div class="card-body">
<div class="row mb-3">
<div class="col-4">
<button type="button" style="height: 80px;" class="btn btn-primary w-100 " data-toggle="modal" data-target="#modalCreate">
<?= lang('Logistica.envioSimple') ?>
</button>
</div>
<div class="col-4">
<button type="button" style="height: 80px;" class="btn btn-primary w-100 " data-toggle="modal" data-target="#modalCreate">
<?= lang('Logistica.envioMultiple') ?>
</button>
</div>
<div class="col-4">
<button type="button" style="height: 80px;" class="btn btn-primary w-100 " data-toggle="modal" data-target="#modalCreate">
<?= lang('Logistica.envioConjunto') ?>
</button>
</div>
</div>
<div class="row mb-3">
<div class="col-4">
<button type="button" style="height: 80px;" class="btn btn-primary w-100 " data-toggle="modal" data-target="#modalCreate">
<?= lang('Logistica.etiquetasTitulos') ?>
</button>
</div>
<div class="col-4">
<button type="button" style="height: 80px;" class="btn btn-primary w-100 " data-toggle="modal" data-target="#modalCreate">
<?= lang('Logistica.etiquetasEnvio') ?>
</button>
</div>
<div class="col-4">
<button type="button" style="height: 80px;" class="btn btn-primary w-100 " data-toggle="modal" data-target="#modalCreate">
<?= lang('Logistica.envioFerros') ?>
</button>
</div>
</div>
<div class="row">
<div class="col-4">
<button type="button" style="height: 80px;" class="btn btn-primary w-100 " data-toggle="modal" data-target="#modalCreate">
<?= lang('Logistica.cerrarOTauto') ?>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
<?= $this->endSection(); ?>
<?= $this->section('css') ?>
<?= $this->endSection() ?>
<?= $this->section('additionalExternalJs') ?>
<?= $this->endSection() ?>

View File

@ -117,8 +117,8 @@
<div class="col-md-6">
<label for="encuadernacion" class="form-label">Encuadernación propuesta</label>
<select id="encuadernacion" name="encuadernacion" class="form-control select2bs2"
style="width: 100%;">
<select id="encuadernacion" name="encuadernacion"
class="form-control select2bs2 warning-change" style="width: 100%;">
</select>
</div>
</div><!--//.row -->
@ -129,7 +129,7 @@
<div class="row mb-3">
<div class="col-md-2">
<label for="interior_old" class="form-label">Calidad</label>
<select id="isHq" name="isHq" class="form-control">
<select id="isHq" name="isHq" class="form-control warning-change">
<option value="0">Estándar</option>
<option value="1">HQ</option>
</select>
@ -162,13 +162,16 @@
</td>
<td>
<select id="compPapelNegroSelected" name="comp_papel_negro_selected"
class="form-control select2bs2 comp_negro_items" style="width: 100%;">
<select id="compPapelNegroSelected" name="comp_papel_negro_selected "
class="form-control select2bs2 comp_negro_items warning-change"
style="width: 100%;">
</select>
</td>
<td>
<input type="text" id="compGramajeNegro" name="comp_gramaje_negro"
class="form-control comp_negro_items" value="" readonly>
<select id="compGramajeNegro" name="comp_gramaje_negro "
class="form-control select2bs2 comp_negro_items warning-change"
style="width: 100%;">
</select>
</td>
</tr>
<tr>
@ -184,13 +187,15 @@
</td>
<td>
<select id="compPapelColorSelected" name="comp_papel_color_selected"
class="form-control select2bs2 comp_color_items" style="width: 100%;">
class="form-control select2bs2 comp_color_items warning-change"
style="width: 100%;">
</select>
</td>
<td>
<input type="text" id="compGramajeColor" name="comp_gramaje_color"
class="form-control comp_color_items" value="" readonly>
</input>
<select id="compGramajeColor" name="comp_papel_color_selected"
class="form-control select2bs2 comp_color_items warning-change"
style="width: 100%;">
</select>
</td>
</tr>
</tbody>
@ -233,13 +238,15 @@
</td>
<td>
<select id="compPapelCubiertaSelected" name="comp_papel_cubierta_selected"
class="form-control select2bs2 comp_cubierta_items"
class="form-control select2bs2 comp_cubierta_items warning-change"
style="width: 100%;">
</select>
</td>
<td>
<input type="text" id="compGramajeCubierta" name="comp_gramaje_cubierta"
class="form-control comp_cubierta_items" value="" readonly>
<select id="compGramajeCubierta" name="comp_papel_cubierta_selected"
class="form-control select2bs2 comp_cubierta_items warning-change"
style="width: 100%;">
</select>
</td>
</tr>
<tr>
@ -264,14 +271,16 @@
<td>
<select id="compPapelSobrecubiertaSelected"
name="comp_papel_sobrecubierta_selected"
class="form-control select2bs2 comp_sobrecubierta_items"
class="form-control select2bs2 comp_sobrecubierta_items warning-change"
style="width: 100%;">
</select>
</td>
<td>
<input type="text" id="compGramajeSobrecubierta"
name="comp_gramaje_sobrecubierta"
class="form-control comp_sobrecubierta_items" value="" readonly>
<select id="compGramajeSobrecubierta"
name="comp_papel_sobrecubierta_selected"
class="form-control select2bs2 comp_sobrecubierta_items warning-change"
style="width: 100%;">
</select>
</td>
</tr>
</tbody>
@ -299,7 +308,7 @@
<td>
<select id="compAcabadoCubiertaSelected"
name="comp_acabado_cubierta_selected"
class="form-control select2bs2 comp_cubierta_items"
class="form-control select2bs2 comp_cubierta_items warning-change"
style="width: 100%;">
</select>
</td>
@ -314,7 +323,7 @@
<td>
<select id="compAcabadoSobrecubiertaSelected"
name="comp_acabado_sobrecubierta_selected"
class="form-control select2bs2 comp_sobrecubierta_items"
class="form-control select2bs2 comp_sobrecubierta_items warning-change"
style="width: 100%;">
</select>
</td>
@ -369,7 +378,8 @@
<div class="row">
<div class="col-md-3 mb-3">
<button id="makeImport" class="btn btn-primary waves-effect waves-light mt-auto w-100" disabled>
<button id="makeImport" class="btn btn-primary waves-effect waves-light mt-auto w-100"
disabled>
Importar presupuesto
</button>
</div>
@ -389,7 +399,7 @@
<?= $this->endSection() ?>
<?= $this->section('css') ?>
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/sweetalert2/sweetalert2.css') ?>" />
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/sweetalert2/sweetalert2.css') ?>" />
<?= $this->endSection() ?>
<?= $this->section('additionalExternalJs') ?>

View File

@ -12,6 +12,9 @@ if (auth()->user()->inGroup('beta')) {
</a>
<ul class="menu-sub">
<li class="menu-item">
<a href="<?= route_to("LogisticaPanel") ?>" class="menu-link">
<?= lang("App.menu_logistica_panel") ?>
</a>
<a href="<?= site_url("envioslogistica/logistica") ?>" class="menu-link">
<?= lang("App.menu_logistica_envios") ?>
</a>