mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
add etiqueta envio maquina model and show in tarea card
This commit is contained in:
@ -207,6 +207,9 @@ class Maquinas extends \App\Controllers\BaseResourceController
|
||||
if ($this->request->getPost('is_inkjet') == null) {
|
||||
$sanitizedData['is_inkjet'] = false;
|
||||
}
|
||||
if ($this->request->getPost('etiqueta_envio') == null) {
|
||||
$sanitizedData['etiqueta_envio'] = false;
|
||||
}
|
||||
|
||||
// JJO
|
||||
$sanitizedData['user_updated_id'] = auth()->user()->id;
|
||||
|
||||
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Database\Migrations;
|
||||
|
||||
use CodeIgniter\Database\Migration;
|
||||
|
||||
class AddEtiquetaEnvioCheckLgMaquinasTable extends Migration
|
||||
{
|
||||
protected array $COLUMNS = [
|
||||
'etiqueta_envio' => [
|
||||
'type' => 'BOOL',
|
||||
'default' => false
|
||||
],
|
||||
];
|
||||
public function up()
|
||||
{
|
||||
|
||||
$this->forge->addColumn('lg_maquinas',$this->COLUMNS);
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->forge->dropColumn('lg_maquinas',array_keys($this->COLUMNS));
|
||||
}
|
||||
}
|
||||
@ -42,6 +42,7 @@ class Maquina extends \CodeIgniter\Entity\Entity
|
||||
"updated_at" => null,
|
||||
"user_created_id" => 0,
|
||||
"user_updated_id" => 0,
|
||||
"etiqueta_envio" => false
|
||||
];
|
||||
protected $casts = [
|
||||
"is_padre" => "boolean",
|
||||
@ -57,6 +58,7 @@ class Maquina extends \CodeIgniter\Entity\Entity
|
||||
"duracion_jornada" => "int",
|
||||
"orden_planning" => "int",
|
||||
"is_rotativa" => "boolean",
|
||||
"etiqueta_envio" => "boolean",
|
||||
"precio_tinta_negro" => "float",
|
||||
"is_inkjet" => "boolean",
|
||||
"precio_tinta_color" => "float",
|
||||
|
||||
@ -20,6 +20,7 @@ return [
|
||||
'isPadre' => 'Usar para variante?',
|
||||
'isRotativa' => 'Es Rotativa?',
|
||||
'isTinta' => 'Inkjet',
|
||||
'isEtiquetaEnvio' => 'Etiqueta envío',
|
||||
'manipulado' => 'manipulado',
|
||||
'maquina' => 'Maquina',
|
||||
'maquinaList' => 'Lista Máquinas',
|
||||
|
||||
@ -52,7 +52,8 @@ class MaquinaModel extends \App\Models\BaseModel
|
||||
"deleted_at",
|
||||
"is_deleted",
|
||||
"user_created_id",
|
||||
"user_updated_id"
|
||||
"user_updated_id",
|
||||
"etiqueta_envio",
|
||||
];
|
||||
protected $returnType = "App\Entities\Configuracion\Maquina";
|
||||
|
||||
|
||||
@ -173,7 +173,19 @@
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 mt-4 mb-4">
|
||||
<div class="form-check form-check-inline">
|
||||
<input type="checkbox"
|
||||
id="isEtiquetaEnvio"
|
||||
name="etiqueta_envio"
|
||||
value="1"
|
||||
class="form-check-input"<?= $maquina->etiqueta_envio == true ? 'checked' : ''; ?>
|
||||
>
|
||||
<label for="isPadre" class="form-check-label">
|
||||
<?= lang('Maquinas.isEtiquetaEnvio') ?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-2 datosRotativa datosInkjet" style="display: none;">
|
||||
|
||||
@ -39,11 +39,13 @@
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane fade show active" id="navs-tarea">
|
||||
<div class="container-fluid h-100">
|
||||
<?= view('themes/_commonPartialsBs/_alertBoxes'); ?>
|
||||
<?= view('themes/_commonPartialsBs/_alertBoxes'); ?>
|
||||
<div class="row mb-2 h-100 d-flex flex-wrap">
|
||||
<div class="col-md-12 d-flex justify-content-end mb-2">
|
||||
<button class="btn-primary btn d-flex justify-content-evenly gap-2"><span class="ti ti-barcode ti-lg"></span><?= lang('Produccion.print_label') ?></button>
|
||||
</div>
|
||||
<?php if ($ot_tarea?->maquina_actual()?->etiqueta_envio): ?>
|
||||
<div class="col-md-12 d-flex justify-content-end mb-2">
|
||||
<button class="btn-primary btn d-flex justify-content-evenly gap-2" data-id="<?=$ot_tarea?->maquina_actual()->id?>"><span class="ti ti-barcode ti-lg"></span><?= lang('Produccion.print_label') ?></button>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="col-md-6 tarea-card-info-block">
|
||||
<?= view("/themes/vuexy/components/cards/tarea_card.php") ?>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user