mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
add alias_ot field to lg_maquinas
This commit is contained in:
@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Database\Migrations;
|
||||||
|
|
||||||
|
use CodeIgniter\Database\Migration;
|
||||||
|
|
||||||
|
class AddAliasOtColumnMaquinasTable extends Migration
|
||||||
|
{
|
||||||
|
|
||||||
|
protected array $COLUMNS = [
|
||||||
|
"alias_ot" => [
|
||||||
|
"type" => "VARCHAR",
|
||||||
|
"constraint" => 255,
|
||||||
|
"null" => true
|
||||||
|
],
|
||||||
|
];
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
$this->forge->addColumn('lg_maquinas', $this->COLUMNS);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
$this->forge->dropColumn('lg_maquinas', array_keys($this->COLUMNS));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -42,7 +42,8 @@ class Maquina extends \CodeIgniter\Entity\Entity
|
|||||||
"updated_at" => null,
|
"updated_at" => null,
|
||||||
"user_created_id" => 0,
|
"user_created_id" => 0,
|
||||||
"user_updated_id" => 0,
|
"user_updated_id" => 0,
|
||||||
"etiqueta_envio" => false
|
"etiqueta_envio" => false,
|
||||||
|
"alias_ot" => null,
|
||||||
];
|
];
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
"is_padre" => "boolean",
|
"is_padre" => "boolean",
|
||||||
@ -70,6 +71,7 @@ class Maquina extends \CodeIgniter\Entity\Entity
|
|||||||
"is_deleted" => "int",
|
"is_deleted" => "int",
|
||||||
"user_created_id" => "int",
|
"user_created_id" => "int",
|
||||||
"user_updated_id" => "int",
|
"user_updated_id" => "int",
|
||||||
|
"alias_ot" => "?string"
|
||||||
];
|
];
|
||||||
|
|
||||||
public function papeles_impresion() : ?array
|
public function papeles_impresion() : ?array
|
||||||
|
|||||||
@ -29,6 +29,7 @@ return [
|
|||||||
'min' => 'Min POD',
|
'min' => 'Min POD',
|
||||||
'moduleTitle' => 'Machines',
|
'moduleTitle' => 'Machines',
|
||||||
'nombre' => 'Name',
|
'nombre' => 'Name',
|
||||||
|
'alias_ot' => 'Alias',
|
||||||
'observaciones' => 'Remarks',
|
'observaciones' => 'Remarks',
|
||||||
'ordenPlanning' => 'Planning order',
|
'ordenPlanning' => 'Planning order',
|
||||||
'padreId' => 'Variante',
|
'padreId' => 'Variante',
|
||||||
|
|||||||
@ -30,6 +30,7 @@ return [
|
|||||||
'min' => 'POD Min',
|
'min' => 'POD Min',
|
||||||
'moduleTitle' => 'Máquinas',
|
'moduleTitle' => 'Máquinas',
|
||||||
'nombre' => 'Nombre',
|
'nombre' => 'Nombre',
|
||||||
|
'alias_ot' => 'Alias',
|
||||||
'observaciones' => 'Observaciones',
|
'observaciones' => 'Observaciones',
|
||||||
'ordenPlanning' => 'Orden Planning',
|
'ordenPlanning' => 'Orden Planning',
|
||||||
'padreId' => 'Variante',
|
'padreId' => 'Variante',
|
||||||
@ -99,7 +100,7 @@ return [
|
|||||||
],
|
],
|
||||||
|
|
||||||
'metrosxminuto' => [
|
'metrosxminuto' => [
|
||||||
'max_length' => 'El campo {field} no puede exeder de {param} caracteres de longitud.',
|
'max_length' => 'El campo {field} no puede exceder de {param} caracteres de longitud.',
|
||||||
'required' => 'El campo {field} es obligatorio.',
|
'required' => 'El campo {field} es obligatorio.',
|
||||||
|
|
||||||
],
|
],
|
||||||
@ -111,13 +112,16 @@ return [
|
|||||||
],
|
],
|
||||||
|
|
||||||
'nombre' => [
|
'nombre' => [
|
||||||
'max_length' => 'El campo {field} no puede exeder de {param} caracteres de longitud.',
|
'max_length' => 'El campo {field} no puede exceder de {param} caracteres de longitud.',
|
||||||
'required' => 'El campo {field} es obligatorio.',
|
'required' => 'El campo {field} es obligatorio.',
|
||||||
|
|
||||||
],
|
],
|
||||||
|
'alias' => [
|
||||||
|
'max_length' => 'El campo {field} no puede exceder de {param} caracteres de longitud.',
|
||||||
|
],
|
||||||
|
|
||||||
'observaciones' => [
|
'observaciones' => [
|
||||||
'max_length' => 'El campo {field} no puede exeder de {param} caracteres de longitud.',
|
'max_length' => 'El campo {field} no puede exceder de {param} caracteres de longitud.',
|
||||||
'required' => 'El campo {field} es obligatorio.',
|
'required' => 'El campo {field} es obligatorio.',
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|||||||
@ -54,6 +54,7 @@ class MaquinaModel extends \App\Models\BaseModel
|
|||||||
"user_created_id",
|
"user_created_id",
|
||||||
"user_updated_id",
|
"user_updated_id",
|
||||||
"etiqueta_envio",
|
"etiqueta_envio",
|
||||||
|
"alias_ot",
|
||||||
];
|
];
|
||||||
protected $returnType = "App\Entities\Configuracion\Maquina";
|
protected $returnType = "App\Entities\Configuracion\Maquina";
|
||||||
|
|
||||||
@ -149,6 +150,10 @@ class MaquinaModel extends \App\Models\BaseModel
|
|||||||
"label" => "Maquinas.velocidadCorte",
|
"label" => "Maquinas.velocidadCorte",
|
||||||
"rules" => "decimal",
|
"rules" => "decimal",
|
||||||
],
|
],
|
||||||
|
"alias_ot" => [
|
||||||
|
"label" => "Maquinas.alias_ot",
|
||||||
|
"rules" => "trim|max_length[255]",
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $validationMessages = [
|
protected $validationMessages = [
|
||||||
@ -196,6 +201,9 @@ class MaquinaModel extends \App\Models\BaseModel
|
|||||||
"max_length" => "Maquinas.validation.nombre.max_length",
|
"max_length" => "Maquinas.validation.nombre.max_length",
|
||||||
"required" => "Maquinas.validation.nombre.required",
|
"required" => "Maquinas.validation.nombre.required",
|
||||||
],
|
],
|
||||||
|
"alias_ot" => [
|
||||||
|
"max_length" => "Maquinas.validation.alias.max_length"
|
||||||
|
],
|
||||||
"observaciones" => [
|
"observaciones" => [
|
||||||
"max_length" => "Maquinas.validation.observaciones.max_length",
|
"max_length" => "Maquinas.validation.observaciones.max_length",
|
||||||
//"required" => "Maquinas.validation.observaciones.required",
|
//"required" => "Maquinas.validation.observaciones.required",
|
||||||
|
|||||||
@ -6,6 +6,13 @@
|
|||||||
</label>
|
</label>
|
||||||
<input type="text" id="nombre" name="nombre" required maxLength="255" class="form-control"
|
<input type="text" id="nombre" name="nombre" required maxLength="255" class="form-control"
|
||||||
value="<?= old('nombre', $maquina->nombre) ?>">
|
value="<?= old('nombre', $maquina->nombre) ?>">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<label for="alias" class="form-label">
|
||||||
|
<?= lang('Maquinas.alias_ot') ?>*
|
||||||
|
</label>
|
||||||
|
<input type="text" id="alias" name="alias_ot" required maxLength="255" class="form-control"
|
||||||
|
value="<?= old('alias_ot', $maquina->alias_ot) ?>">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<label for="min" class="form-label">
|
<label for="min" class="form-label">
|
||||||
|
|||||||
Reference in New Issue
Block a user