mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
233 lines
6.2 KiB
PHP
Executable File
233 lines
6.2 KiB
PHP
Executable File
<?php
|
|
|
|
namespace Config;
|
|
|
|
use CodeIgniter\Config\BaseConfig;
|
|
use CodeIgniter\Validation\StrictRules\CreditCardRules;
|
|
use CodeIgniter\Validation\StrictRules\FileRules;
|
|
use CodeIgniter\Validation\StrictRules\FormatRules;
|
|
use CodeIgniter\Validation\StrictRules\Rules;
|
|
|
|
class Validation extends BaseConfig
|
|
{
|
|
// --------------------------------------------------------------------
|
|
// Setup
|
|
// --------------------------------------------------------------------
|
|
|
|
/**
|
|
* Stores the classes that contain the
|
|
* rules that are available.
|
|
*
|
|
* @var string[]
|
|
*/
|
|
public array $ruleSets = [
|
|
Rules::class,
|
|
FormatRules::class,
|
|
FileRules::class,
|
|
CreditCardRules::class,
|
|
];
|
|
|
|
/**
|
|
* Specifies the views that are used to display the
|
|
* errors.
|
|
*
|
|
* @var array<string, string>
|
|
*/
|
|
public array $templates = [
|
|
'list' => 'CodeIgniter\Validation\Views\list',
|
|
'single' => 'CodeIgniter\Validation\Views\single',
|
|
'bootstrap_style' => 'themes/_commonPartialsBs/_form_validation_errors',
|
|
];
|
|
|
|
// --------------------------------------------------------------------
|
|
// Rules
|
|
// --------------------------------------------------------------------
|
|
/**
|
|
* Maquina duplicate validation
|
|
*
|
|
* @var array
|
|
*/
|
|
public array $maquina_duplicate = [
|
|
"name" => "required|string"
|
|
];
|
|
/**
|
|
* PapelImpresion duplicate validation
|
|
*
|
|
* @var array
|
|
*/
|
|
public array $papel_impresion_duplicate = [
|
|
"name" => "required|string"
|
|
];
|
|
/**========================================================================
|
|
* TARIFA MAQUINA ACABADO
|
|
*========================================================================**/
|
|
public array $tarifa_maquina_acabado =
|
|
[
|
|
"tarifa_acabado_id" => [
|
|
"rules" => "required|integer",
|
|
"label" => "tarifa acabado",
|
|
],
|
|
"maquina_id" => [
|
|
"rules" => "required|integer",
|
|
"label" => "maquina",
|
|
],
|
|
"maquina_tarea_id" => [
|
|
"rules" => "required|integer",
|
|
"label" => "tarea",
|
|
],
|
|
];
|
|
public array $tarifa_maquina_manipulado =
|
|
[
|
|
"tarifa_manipulado_id" => [
|
|
"rules" => "required|integer",
|
|
"label" => "tarifa acabado",
|
|
],
|
|
"maquina_id" => [
|
|
"rules" => "required|integer",
|
|
"label" => "maquina",
|
|
],
|
|
"maquina_tarea_id" => [
|
|
"rules" => "required|integer",
|
|
"label" => "tarea",
|
|
],
|
|
];
|
|
public array $tarifa_maquina_preimpresion =
|
|
[
|
|
"tarifa_preimpresion_id" => [
|
|
"rules" => "required|integer",
|
|
"label" => "tarifa acabado",
|
|
],
|
|
"maquina_id" => [
|
|
"rules" => "required|integer",
|
|
"label" => "maquina",
|
|
],
|
|
"maquina_tarea_id" => [
|
|
"rules" => "required|integer",
|
|
"label" => "tarea",
|
|
],
|
|
];
|
|
public array $tarifa_maquina_encuadernacion =
|
|
[
|
|
"tarifa_encuadernacion_id" => [
|
|
"rules" => "required|integer",
|
|
"label" => "tarifa acabado",
|
|
],
|
|
"maquina_id" => [
|
|
"rules" => "required|integer",
|
|
"label" => "maquina",
|
|
],
|
|
"maquina_tarea_id" => [
|
|
"rules" => "required|integer",
|
|
"label" => "tarea",
|
|
],
|
|
];
|
|
public array $tarifa_maquina_extra =
|
|
[
|
|
"tarifa_extra_id" => [
|
|
"rules" => "required|integer",
|
|
"label" => "tarifa acabado",
|
|
],
|
|
"maquina_id" => [
|
|
"rules" => "required|integer",
|
|
"label" => "maquina",
|
|
],
|
|
"maquina_tarea_id" => [
|
|
"rules" => "required|integer",
|
|
"label" => "tarea",
|
|
],
|
|
];
|
|
|
|
public array $orden_trabajo_tarea = [
|
|
|
|
"orden_trabajo_tarea_id" => [
|
|
"rules" => "required|integer",
|
|
"label" => "tarea"
|
|
],
|
|
// "tiempo_real" => [
|
|
// "rules" => "required|float",
|
|
// "label" => "tiempo real"
|
|
// ]
|
|
];
|
|
public array $orden_trabajo_date = [
|
|
"orden_trabajo_id" => [
|
|
"rules" => "required|integer",
|
|
"label" => "tarea"
|
|
],
|
|
|
|
];
|
|
public array $orden_trabajo_tarea_progress_date = [
|
|
|
|
"ot_tarea_id" => [
|
|
"rules" => "required|integer",
|
|
"label" => "tarea"
|
|
],
|
|
"estado" => [
|
|
"rules" => "required|in_list[P,I,S,D,F,E]",
|
|
"label" => "estado"
|
|
]
|
|
];
|
|
public array $orden_trabajo = [
|
|
"orden_trabajo_id" => [
|
|
"rules" => "required|integer",
|
|
"label" => "Orden trabajo"
|
|
],
|
|
|
|
];
|
|
public array $orden_trabajo_fichaje_auto = [
|
|
"orden_trabajo_id" => [
|
|
"rules" => "required|integer",
|
|
"label" => "Orden trabajo"
|
|
],
|
|
"maquina_id" => [
|
|
"rules" => "required|integer",
|
|
"label" => "Máquina"
|
|
],
|
|
"tareas" => [
|
|
"rules" => "required",
|
|
"label" => "Tareas"
|
|
],
|
|
"click_init" => [
|
|
"rules" => "required|integer",
|
|
"label" => "Click init"
|
|
],
|
|
"click_end" => [
|
|
"rules" => "required|integer",
|
|
"label" => "Click end"
|
|
],
|
|
|
|
];
|
|
public array $maquina_ordenes_trabajo = [
|
|
"ordenes_trabajo" => [
|
|
"rules" => "required",
|
|
"label" => "Orden trabajo"
|
|
],
|
|
"maquina_id" => [
|
|
"rules" => "required|integer",
|
|
"label" => "Máquina"
|
|
],
|
|
|
|
];
|
|
public array $chat_department =
|
|
[
|
|
"display" => [
|
|
"rules" => "required|string",
|
|
"label" => "tarifa acabado",
|
|
],
|
|
"description" => [
|
|
"rules" => "permit_empty",
|
|
"label" => "maquina",
|
|
],
|
|
];
|
|
public array $proveedor_tarea =
|
|
[
|
|
"proveedor_id" => [
|
|
"rules" => "required|integer",
|
|
"label" => "Proveedor",
|
|
],
|
|
"orden_trabajo_tarea_id" => [
|
|
"rules" => "required|integer",
|
|
"label" => "Tarea",
|
|
],
|
|
];
|
|
}
|