mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
falta el checkear que no se solapen intervalos. corregido error en varios sitios (ponia user_update_id en lugar de user_updated_id; también en BBDD)
This commit is contained in:
26
ci4/.env
26
ci4/.env
@ -22,8 +22,8 @@ CI_ENVIRONMENT = development
|
||||
# APP
|
||||
#--------------------------------------------------------------------
|
||||
|
||||
#app.baseURL = 'https://sk-jjo.imnavajas.es'
|
||||
app.baseURL = 'https://sk-imn.imnavajas.es'
|
||||
app.baseURL = 'https://sk-jjo.imnavajas.es'
|
||||
#app.baseURL = 'https://sk-imn.imnavajas.es'
|
||||
# app.baseURL = "http://safekat.test/"
|
||||
# app.forceGlobalSecureRequests = false
|
||||
|
||||
@ -41,22 +41,22 @@ app.baseURL = 'https://sk-imn.imnavajas.es'
|
||||
# DATABASE
|
||||
#--------------------------------------------------------------------
|
||||
|
||||
database.default.hostname = localhost
|
||||
database.default.database = sk_jjo
|
||||
database.default.username = sk_jjo
|
||||
database.default.password = 61tv&G1Zf^XY
|
||||
database.default.DBDriver = MySQLi
|
||||
database.default.DBPrefix =
|
||||
database.default.dump =
|
||||
|
||||
# database.default.hostname = localhost
|
||||
# database.default.database = sk_imn
|
||||
# database.default.username = sk_imn
|
||||
# database.default.password = Uyia19_87
|
||||
# database.default.database = sk_jjo
|
||||
# database.default.username = sk_jjo
|
||||
# database.default.password = 61tv&G1Zf^XY
|
||||
# database.default.DBDriver = MySQLi
|
||||
# database.default.DBPrefix =
|
||||
# database.default.dump =
|
||||
|
||||
database.default.hostname = localhost
|
||||
database.default.database = sk_imn
|
||||
database.default.username = sk_imn
|
||||
database.default.password = Uyia19_87
|
||||
database.default.DBDriver = MySQLi
|
||||
database.default.DBPrefix =
|
||||
database.default.dump =
|
||||
|
||||
# database.tests.hostname = localhost
|
||||
# database.tests.database = ci4
|
||||
# database.tests.username = root
|
||||
|
||||
@ -266,7 +266,7 @@ $routes->group('maquinasdefecto', ['namespace' => 'App\Controllers\Configuracion
|
||||
$routes->post('add', 'Maquinasdefecto::add', ['as' => 'createMaquinaPorDefecto']);
|
||||
$routes->post('create', 'Maquinasdefecto::create', ['as' => 'ajaxCreateMaquinaPorDefecto']);
|
||||
$routes->put('(:num)/update', 'Maquinasdefecto::update/$1', ['as' => 'ajaxUpdateMaquinaPorDefecto']);
|
||||
$routes->post('(:num)/edit', 'Maquinasdefecto::edit/$1', ['as' => 'updateMaquinaPorDefecto']);
|
||||
$routes->post('edit/(:num)', 'Maquinasdefecto::edit/$1', ['as' => 'updateMaquinaPorDefecto']);
|
||||
$routes->post('datatable', 'Maquinasdefecto::datatable', ['as' => 'dataTableOfMaquinasPorDefecto']);
|
||||
$routes->post('allmenuitems', 'Maquinasdefecto::allItemsSelect', ['as' => 'select2ItemsOfMaquinasPorDefecto']);
|
||||
$routes->post('menuitems', 'Maquinasdefecto::menuItems', ['as' => 'menuItemsOfMaquinasPorDefecto']);
|
||||
|
||||
@ -32,6 +32,12 @@ class Maquinasdefecto extends \App\Controllers\GoBaseResourceController {
|
||||
public function initController(\CodeIgniter\HTTP\RequestInterface $request, \CodeIgniter\HTTP\ResponseInterface $response, \Psr\Log\LoggerInterface $logger) {
|
||||
$this->viewData['pageTitle'] = lang('MaquinasPorDefecto.moduleTitle');
|
||||
$this->viewData['usingSweetAlert'] = true;
|
||||
|
||||
// Se indica que este controlador trabaja con soft_delete
|
||||
$this->soft_delete = true;
|
||||
// Se indica el flag para los ficheros borrados
|
||||
$this->delete_flag = 1;
|
||||
|
||||
parent::initController($request, $response, $logger);
|
||||
}
|
||||
|
||||
@ -54,7 +60,8 @@ class Maquinasdefecto extends \App\Controllers\GoBaseResourceController {
|
||||
|
||||
public function add() {
|
||||
|
||||
|
||||
// JJO
|
||||
$session = session();
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
@ -66,6 +73,9 @@ class Maquinasdefecto extends \App\Controllers\GoBaseResourceController {
|
||||
|
||||
$sanitizedData = $this->sanitized($postData, $nullIfEmpty);
|
||||
|
||||
// JJO
|
||||
$sanitizedData['user_created_id'] = $session->id_user;
|
||||
|
||||
|
||||
$noException = true;
|
||||
if ($successfulResult = $this->canValidate()) : // if ($successfulResult = $this->validate($this->formValidationRules) ) :
|
||||
@ -80,7 +90,7 @@ class Maquinasdefecto extends \App\Controllers\GoBaseResourceController {
|
||||
}
|
||||
else:
|
||||
$this->viewData['errorMessage'] = lang('Basic.global.formErr1', [mb_strtolower(lang('MaquinasPorDefecto.maquinaPorDefecto'))]);
|
||||
$this->session->setFlashdata('formErrors', $this->model->errors());
|
||||
$this->session->setFlashdata('formErrors', $this->model->errors());
|
||||
endif;
|
||||
|
||||
$thenRedirect = true; // Change this to false if you want your user to stay on the form after submission
|
||||
@ -90,7 +100,7 @@ class Maquinasdefecto extends \App\Controllers\GoBaseResourceController {
|
||||
$id = $this->model->db->insertID();
|
||||
|
||||
$message = lang('Basic.global.saveSuccess', [mb_strtolower(lang('MaquinasPorDefecto.maquinaPorDefecto'))]).'.';
|
||||
$message .= anchor( "maquinasdefecto/{$id}/edit" , lang('Basic.global.continueEditing').'?');
|
||||
$message .= anchor( "configuracion/maquinasdefecto/edit/{$id}" , lang('Basic.global.continueEditing').'?');
|
||||
$message = ucfirst(str_replace("'", "\'", $message));
|
||||
|
||||
if ($thenRedirect) :
|
||||
@ -121,6 +131,9 @@ class Maquinasdefecto extends \App\Controllers\GoBaseResourceController {
|
||||
|
||||
public function edit($requestedId = null) {
|
||||
|
||||
// JJO
|
||||
$session = session();
|
||||
|
||||
if ($requestedId == null) :
|
||||
return $this->redirect2listView();
|
||||
endif;
|
||||
@ -142,7 +155,8 @@ class Maquinasdefecto extends \App\Controllers\GoBaseResourceController {
|
||||
|
||||
$sanitizedData = $this->sanitized($postData, $nullIfEmpty);
|
||||
|
||||
|
||||
// JJO
|
||||
$sanitizedData['user_updated_id'] = $session->id_user;
|
||||
|
||||
$noException = true;
|
||||
if ($successfulResult = $this->canValidate()) : // if ($successfulResult = $this->validate($this->formValidationRules) ) :
|
||||
@ -189,7 +203,7 @@ class Maquinasdefecto extends \App\Controllers\GoBaseResourceController {
|
||||
$this->viewData['maquinaList'] = $this->getMaquinaListItems($maquinasDefectoEntity->maquina_id ?? null);
|
||||
$this->viewData['tipoList'] = $this->getTipoOptions();
|
||||
|
||||
$this->viewData['formAction'] = route_to('updateMaquinaPorDefecto', $id);
|
||||
$this->viewData['formAction'] = route_to('updateMaquinaPorDefecto', $id);
|
||||
|
||||
$this->viewData['boxTitle'] = lang('Basic.global.edit2').' '.lang('MaquinasPorDefecto.moduleTitle').' '.lang('Basic.global.edit3');
|
||||
|
||||
@ -306,4 +320,6 @@ class Maquinasdefecto extends \App\Controllers\GoBaseResourceController {
|
||||
}
|
||||
|
||||
|
||||
//sanitiezdata
|
||||
//array(10) { ["tipo"]=> string(2) "bn" ["ancho_min"]=> string(3) "100" ["alto_min"]=> string(3) "180" ["tirada_min"]=> string(2) "31" ["maquina_id"]=> string(2) "80" ["ancho_max"]=> string(3) "477" ["alto_max"]=> string(3) "316" ["tirada_max"]=> string(5) "10000" ["save"]=> string(7) "Guardar" ["user_updated_id"]=> string(1) "1" }
|
||||
}
|
||||
|
||||
@ -184,10 +184,9 @@ class Papelesimpresion extends \App\Controllers\GoBaseResourceController
|
||||
$sanitizedData = $this->sanitized($postData, $nullIfEmpty);
|
||||
|
||||
// JJO
|
||||
$sanitizedData['user_update_id'] = $session->id_user;
|
||||
$sanitizedData['user_updated_id'] = $session->id_user;
|
||||
|
||||
|
||||
|
||||
|
||||
if ($this->request->getPost('defecto') == null) {
|
||||
$sanitizedData['defecto'] = false;
|
||||
}
|
||||
|
||||
@ -83,9 +83,8 @@ class Tarifaacabado extends \App\Controllers\GoBaseResourceController
|
||||
$sanitizedData = $this->sanitized($postData, $nullIfEmpty);
|
||||
|
||||
// JJO
|
||||
if (isset($this->model->user_update_id)) {
|
||||
$sanitizedData['user_created_id'] = $session->id_user;
|
||||
}
|
||||
$sanitizedData['user_created_id'] = $session->id_user;
|
||||
|
||||
|
||||
$noException = true;
|
||||
if ($successfulResult = $this->canValidate()) : // if ($successfulResult = $this->validate($this->formValidationRules) ) :
|
||||
@ -166,9 +165,8 @@ class Tarifaacabado extends \App\Controllers\GoBaseResourceController
|
||||
$sanitizedData = $this->sanitized($postData, $nullIfEmpty);
|
||||
|
||||
// JJO
|
||||
if (isset($this->model->user_update_id)) {
|
||||
$sanitizedData['user_update_id'] = $session->id_user;
|
||||
}
|
||||
$sanitizedData['user_updated_id'] = $session->id_user;
|
||||
|
||||
|
||||
$noException = true;
|
||||
if ($successfulResult = $this->canValidate()) : // if ($successfulResult = $this->validate($this->formValidationRules) ) :
|
||||
|
||||
@ -136,8 +136,8 @@ class Tarifapreimpresion extends \App\Controllers\GoBaseController {
|
||||
$sanitizedData = $this->sanitized($postData, $nullIfEmpty);
|
||||
|
||||
// JJO
|
||||
if(isset($this->model->user_update_id)){
|
||||
$sanitizedData['user_update_id'] = $session->id_user;
|
||||
if(isset($this->model->user_updated_id)){
|
||||
$sanitizedData['user_updated_id'] = $session->id_user;
|
||||
}
|
||||
|
||||
$noException = true;
|
||||
|
||||
@ -80,7 +80,7 @@ class Tarifasmanipulado extends \App\Controllers\GoBaseResourceController {
|
||||
$sanitizedData = $this->sanitized($postData, $nullIfEmpty);
|
||||
|
||||
// JJO
|
||||
if(isset($this->model->user_update_id)){
|
||||
if(isset($this->model->user_updated_id)){
|
||||
$sanitizedData['user_created_id'] = $session->id_user;
|
||||
}
|
||||
|
||||
@ -162,7 +162,7 @@ class Tarifasmanipulado extends \App\Controllers\GoBaseResourceController {
|
||||
$sanitizedData = $this->sanitized($postData, $nullIfEmpty);
|
||||
|
||||
// JJO
|
||||
if(isset($this->model->user_update_id)){
|
||||
if(isset($this->model->user_updated_id)){
|
||||
$sanitizedData['user_updated_id'] = $session->id_user;
|
||||
}
|
||||
|
||||
|
||||
@ -10,14 +10,14 @@ class TarifaManipuladoEntity extends \CodeIgniter\Entity\Entity
|
||||
"id" => null,
|
||||
"nombre" => null,
|
||||
"user_created_id" => 0,
|
||||
"user_update_id" => 0,
|
||||
"user_updated_id" => 0,
|
||||
"is_deleted" => 0,
|
||||
"created_at" => null,
|
||||
"updated_at" => null,
|
||||
];
|
||||
protected $casts = [
|
||||
"user_created_id" => "int",
|
||||
"user_update_id" => "int",
|
||||
"user_updated_id" => "int",
|
||||
"is_deleted" => "int",
|
||||
];
|
||||
}
|
||||
|
||||
@ -9,14 +9,14 @@ class TarifaacabadoEntity extends \CodeIgniter\Entity\Entity
|
||||
"id" => null,
|
||||
"nombre" => null,
|
||||
"user_created_id" => 0,
|
||||
"user_update_id" => 0,
|
||||
"user_updated_id" => 0,
|
||||
"is_deleted" => 0,
|
||||
"created_at" => null,
|
||||
"updated_at" => null,
|
||||
];
|
||||
protected $casts = [
|
||||
"user_created_id" => "int",
|
||||
"user_update_id" => "int",
|
||||
"user_updated_id" => "int",
|
||||
"is_deleted" => "int",
|
||||
];
|
||||
}
|
||||
|
||||
@ -10,7 +10,7 @@ class TarifapreimpresionEntity extends \CodeIgniter\Entity\Entity
|
||||
"nombre" => null,
|
||||
"precio" => null,
|
||||
"user_created_id" => 1,
|
||||
"user_update_id" => 1,
|
||||
"user_updated_id" => 1,
|
||||
"deleted_at" => null,
|
||||
"is_deleted" => 0,
|
||||
"created_at" => null,
|
||||
@ -19,6 +19,6 @@ class TarifapreimpresionEntity extends \CodeIgniter\Entity\Entity
|
||||
protected $casts = [
|
||||
"precio" => "float",
|
||||
"user_created_id" => "int",
|
||||
"user_update_id" => "int",
|
||||
"user_updated_id" => "int",
|
||||
];
|
||||
}
|
||||
|
||||
@ -18,7 +18,7 @@ return [
|
||||
'maquinaId' => 'Machine',
|
||||
'maquinaPorDefecto' => 'Default Machine',
|
||||
'maquinaPorDefectoList' => 'Default Machine List',
|
||||
'maquinadefecto' => 'Default Machines',
|
||||
'maquinadefecto' => 'Default Machine',
|
||||
'maquinasPorDefecto' => 'Default Machines',
|
||||
'maquinasdefecto' => 'Default Machines',
|
||||
'moduleTitle' => 'Default Machines',
|
||||
|
||||
@ -69,7 +69,7 @@ return [
|
||||
|
||||
],
|
||||
|
||||
'user_update_id' => [
|
||||
'user_updated_id' => [
|
||||
'integer' => 'The {field} field must contain an integer.',
|
||||
'required' => 'The {field} field is required.',
|
||||
|
||||
|
||||
@ -76,7 +76,7 @@ return [
|
||||
|
||||
],
|
||||
|
||||
'user_update_id' => [
|
||||
'user_updated_id' => [
|
||||
'integer' => 'The {field} field must contain an integer.',
|
||||
'required' => 'The {field} field is required.',
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@ return [
|
||||
|
||||
],
|
||||
|
||||
'user_update_id' => [
|
||||
'user_updated_id' => [
|
||||
'integer' => 'The {field} field must contain an integer.',
|
||||
'required' => 'The {field} field is required.',
|
||||
|
||||
|
||||
@ -91,7 +91,7 @@ return [
|
||||
],
|
||||
|
||||
'validation' => [
|
||||
'user_update_id' => [
|
||||
'user_updated_id' => [
|
||||
'integer' => 'El campo {field} debe contener un número entero.',
|
||||
'required' => 'El campo {field} es obligatorio.',
|
||||
|
||||
|
||||
@ -76,7 +76,7 @@ return [
|
||||
|
||||
],
|
||||
|
||||
'user_update_id' => [
|
||||
'user_updated_id' => [
|
||||
'integer' => 'El campo {field} debe contener un número entero.',
|
||||
'required' => 'El campo {field} es obligatorio.',
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@ return [
|
||||
|
||||
],
|
||||
|
||||
'user_update_id' => [
|
||||
'user_updated_id' => [
|
||||
'integer' => 'El campo {field} debe contener un número entero.',
|
||||
'required' => 'El campo {field} es obligatorio.',
|
||||
|
||||
|
||||
@ -32,8 +32,10 @@ class MaquinasDefectoModel extends \App\Models\GoBaseModel
|
||||
"tirada_min",
|
||||
"tirada_max",
|
||||
"maquina_id",
|
||||
|
||||
|
||||
"deleted_at",
|
||||
"is_deleted",
|
||||
"user_created_id",
|
||||
"user_updated_id"
|
||||
];
|
||||
protected $returnType = "App\Entities\Configuracion\MaquinasDefectoEntity";
|
||||
|
||||
@ -48,63 +50,63 @@ class MaquinasDefectoModel extends \App\Models\GoBaseModel
|
||||
|
||||
protected $validationRules = [
|
||||
"alto_max" => [
|
||||
"label" => "MaquinaPorDefectoes.altoMax",
|
||||
"label" => "MaquinasPorDefecto.altoMax",
|
||||
"rules" => "required|decimal",
|
||||
],
|
||||
"alto_min" => [
|
||||
"label" => "MaquinaPorDefectoes.altoMin",
|
||||
"label" => "MaquinasPorDefecto.altoMin",
|
||||
"rules" => "required|decimal",
|
||||
],
|
||||
"ancho_max" => [
|
||||
"label" => "MaquinaPorDefectoes.anchoMax",
|
||||
"label" => "MaquinasPorDefecto.anchoMax",
|
||||
"rules" => "required|decimal",
|
||||
],
|
||||
"ancho_min" => [
|
||||
"label" => "MaquinaPorDefectoes.anchoMin",
|
||||
"label" => "MaquinasPorDefecto.anchoMin",
|
||||
"rules" => "required|decimal",
|
||||
],
|
||||
"tipo" => [
|
||||
"label" => "MaquinaPorDefectoes.tipo",
|
||||
"label" => "MaquinasPorDefecto.tipo",
|
||||
"rules" => "required|in_list[bn,bnhq,color,portada,cubierta,rotativa]",
|
||||
],
|
||||
"tirada_max" => [
|
||||
"label" => "MaquinaPorDefectoes.tiradaMax",
|
||||
"label" => "MaquinasPorDefecto.tiradaMax",
|
||||
"rules" => "required|integer",
|
||||
],
|
||||
"tirada_min" => [
|
||||
"label" => "MaquinaPorDefectoes.tiradaMin",
|
||||
"label" => "MaquinasPorDefecto.tiradaMin",
|
||||
"rules" => "required|integer",
|
||||
],
|
||||
];
|
||||
|
||||
protected $validationMessages = [
|
||||
"alto_max" => [
|
||||
"decimal" => "MaquinaPorDefectoes.validation.alto_max.decimal",
|
||||
"required" => "MaquinaPorDefectoes.validation.alto_max.required",
|
||||
"decimal" => "MaquinasPorDefecto.validation.alto_max.decimal",
|
||||
"required" => "MaquinasPorDefecto.validation.alto_max.required",
|
||||
],
|
||||
"alto_min" => [
|
||||
"decimal" => "MaquinaPorDefectoes.validation.alto_min.decimal",
|
||||
"required" => "MaquinaPorDefectoes.validation.alto_min.required",
|
||||
"decimal" => "MaquinasPorDefecto.validation.alto_min.decimal",
|
||||
"required" => "MaquinasPorDefecto.validation.alto_min.required",
|
||||
],
|
||||
"ancho_max" => [
|
||||
"decimal" => "MaquinaPorDefectoes.validation.ancho_max.decimal",
|
||||
"required" => "MaquinaPorDefectoes.validation.ancho_max.required",
|
||||
"decimal" => "MaquinasPorDefecto.validation.ancho_max.decimal",
|
||||
"required" => "MaquinasPorDefecto.validation.ancho_max.required",
|
||||
],
|
||||
"ancho_min" => [
|
||||
"decimal" => "MaquinaPorDefectoes.validation.ancho_min.decimal",
|
||||
"required" => "MaquinaPorDefectoes.validation.ancho_min.required",
|
||||
"decimal" => "MaquinasPorDefecto.validation.ancho_min.decimal",
|
||||
"required" => "MaquinasPorDefecto.validation.ancho_min.required",
|
||||
],
|
||||
"tipo" => [
|
||||
"in_list" => "MaquinaPorDefectoes.validation.tipo.in_list",
|
||||
"required" => "MaquinaPorDefectoes.validation.tipo.required",
|
||||
"in_list" => "MaquinasPorDefecto.validation.tipo.in_list",
|
||||
"required" => "MaquinasPorDefecto.validation.tipo.required",
|
||||
],
|
||||
"tirada_max" => [
|
||||
"integer" => "MaquinaPorDefectoes.validation.tirada_max.integer",
|
||||
"required" => "MaquinaPorDefectoes.validation.tirada_max.required",
|
||||
"integer" => "MaquinasPorDefecto.validation.tirada_max.integer",
|
||||
"required" => "MaquinasPorDefecto.validation.tirada_max.required",
|
||||
],
|
||||
"tirada_min" => [
|
||||
"integer" => "MaquinaPorDefectoes.validation.tirada_min.integer",
|
||||
"required" => "MaquinaPorDefectoes.validation.tirada_min.required",
|
||||
"integer" => "MaquinasPorDefecto.validation.tirada_min.integer",
|
||||
"required" => "MaquinasPorDefecto.validation.tirada_min.required",
|
||||
],
|
||||
];
|
||||
|
||||
|
||||
@ -69,7 +69,7 @@ class PapelImpresionModel extends \App\Models\GoBaseModel
|
||||
"isActivo",
|
||||
"deleted_at",
|
||||
"is_deleted",
|
||||
"user_update_id",
|
||||
"user_updated_id",
|
||||
];
|
||||
protected $returnType = "App\Entities\Configuracion\PapelImpresion";
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@ class TarifaacabadoModel extends \App\Models\GoBaseModel
|
||||
"deleted_at",
|
||||
"is_deleted",
|
||||
"user_created_id",
|
||||
"user_update_id",
|
||||
"user_updated_id",
|
||||
];
|
||||
protected $returnType = 'App\Entities\Tarifas\TarifaacabadoEntity';
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@ class TarifapreimpresionModel extends \App\Models\GoBaseModel
|
||||
"deleted_at",
|
||||
"is_deleted",
|
||||
"user_created_id",
|
||||
"user_update_id"];
|
||||
"user_updated_id"];
|
||||
protected $returnType = "App\Entities\Tarifas\TarifapreimpresionEntity";
|
||||
|
||||
protected $useTimestamps = true;
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<label for="tipo" class="form-label">
|
||||
<?=lang('MaquinasPorDefecto.tipo') ?>*
|
||||
</label>
|
||||
<select id="tipo" name="tipo" required class="form-control select2bs" style="width: 100%;" >
|
||||
<select id="tipo" name="tipo" class="form-control select2bs" style="width: 100%;" >
|
||||
<option value="" selected="selected"><?=lang('Basic.global.pleaseSelectOne') ?></option>
|
||||
<option value="bn"<?=$maquinasDefectoEntity->tipo == 'bn' ? ' selected':'' ?>><?= lang('MaquinasPorDefecto.bn') ?></option>
|
||||
<option value="bnhq"<?=$maquinasDefectoEntity->tipo == 'bnhq' ? ' selected':'' ?>><?= lang('MaquinasPorDefecto.bnhq') ?></option>
|
||||
@ -19,43 +19,24 @@
|
||||
<label for="anchoMin" class="form-label">
|
||||
<?=lang('MaquinasPorDefecto.anchoMin') ?>*
|
||||
</label>
|
||||
<input type="number" id="anchoMin" name="ancho_min" required placeholder="0.00" maxLength="8" step="0.01" class="form-control" value="<?=old('ancho_min', $maquinasDefectoEntity->ancho_min) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="anchoMax" class="form-label">
|
||||
<?=lang('MaquinasPorDefecto.anchoMax') ?>*
|
||||
</label>
|
||||
<input type="number" id="anchoMax" name="ancho_max" required placeholder="0.00" maxLength="8" step="0.01" class="form-control" value="<?=old('ancho_max', $maquinasDefectoEntity->ancho_max) ?>">
|
||||
<input type="number" id="anchoMin" name="ancho_min" placeholder="0.00" maxLength="8" step="0.01" class="form-control" value="<?=old('ancho_min', $maquinasDefectoEntity->ancho_min) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="altoMin" class="form-label">
|
||||
<?=lang('MaquinasPorDefecto.altoMin') ?>*
|
||||
</label>
|
||||
<input type="number" id="altoMin" name="alto_min" required placeholder="0.00" maxLength="8" step="0.01" class="form-control" value="<?=old('alto_min', $maquinasDefectoEntity->alto_min) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="altoMax" class="form-label">
|
||||
<?=lang('MaquinasPorDefecto.altoMax') ?>*
|
||||
</label>
|
||||
<input type="number" id="altoMax" name="alto_max" required placeholder="0.00" maxLength="8" step="0.01" class="form-control" value="<?=old('alto_max', $maquinasDefectoEntity->alto_max) ?>">
|
||||
<input type="number" id="altoMin" name="alto_min" placeholder="0.00" maxLength="8" step="0.01" class="form-control" value="<?=old('alto_min', $maquinasDefectoEntity->alto_min) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="tiradaMin" class="form-label">
|
||||
<?=lang('MaquinasPorDefecto.tiradaMin') ?>*
|
||||
</label>
|
||||
<input type="number" id="tiradaMin" name="tirada_min" required placeholder="1" maxLength="11" class="form-control" value="<?=old('tirada_min', $maquinasDefectoEntity->tirada_min) ?>">
|
||||
<input type="number" id="tiradaMin" name="tirada_min" placeholder="1" maxLength="11" class="form-control" value="<?=old('tirada_min', $maquinasDefectoEntity->tirada_min) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="tiradaMax" class="form-label">
|
||||
<?=lang('MaquinasPorDefecto.tiradaMax') ?>*
|
||||
</label>
|
||||
<input type="number" id="tiradaMax" name="tirada_max" required placeholder="10000" maxLength="11" class="form-control" value="<?=old('tirada_max', $maquinasDefectoEntity->tirada_max) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
|
||||
</div><!--//.col -->
|
||||
<div class="col-md-12 col-lg-6 px-4">
|
||||
@ -63,7 +44,7 @@
|
||||
<label for="maquinaId" class="form-label">
|
||||
<?=lang('MaquinasPorDefecto.maquinaId') ?>*
|
||||
</label>
|
||||
<select id="maquinaId" name="maquina_id" required class="form-control select2 form-select" style="width: 100%;" >
|
||||
<select id="maquinaId" name="maquina_id" class="form-control select2 form-select" style="width: 100%;" >
|
||||
|
||||
<?php if ( isset($maquinaList) && is_array($maquinaList) && !empty($maquinaList) ) :
|
||||
foreach ($maquinaList as $k => $v) : ?>
|
||||
@ -75,6 +56,29 @@
|
||||
</select>
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="anchoMax" class="form-label">
|
||||
<?=lang('MaquinasPorDefecto.anchoMax') ?>*
|
||||
</label>
|
||||
<input type="number" id="anchoMax" name="ancho_max" placeholder="0.00" maxLength="8" step="0.01" class="form-control" value="<?=old('ancho_max', $maquinasDefectoEntity->ancho_max) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="altoMax" class="form-label">
|
||||
<?=lang('MaquinasPorDefecto.altoMax') ?>*
|
||||
</label>
|
||||
<input type="number" id="altoMax" name="alto_max" placeholder="0.00" maxLength="8" step="0.01" class="form-control" value="<?=old('alto_max', $maquinasDefectoEntity->alto_max) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="tiradaMax" class="form-label">
|
||||
<?=lang('MaquinasPorDefecto.tiradaMax') ?>*
|
||||
</label>
|
||||
<input type="number" id="tiradaMax" name="tirada_max" placeholder="10000" maxLength="11" class="form-control" value="<?=old('tirada_max', $maquinasDefectoEntity->tirada_max) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
</div><!--//.col -->
|
||||
|
||||
</div><!-- //.row -->
|
||||
@ -287,9 +287,6 @@
|
||||
|
||||
yeniden(json.<?= csrf_token() ?>);
|
||||
|
||||
setTimeout(() => {
|
||||
console.log("1 Segundo esperado")
|
||||
}, 1000);
|
||||
$.ajax({
|
||||
url: '<?= route_to('updateMaquinaPapelOnTarifasChange') ?>',
|
||||
data: {
|
||||
|
||||
@ -15,12 +15,15 @@
|
||||
<?= !empty($validation->getErrors()) ? $validation->listErrors("bootstrap_style") : "" ?>
|
||||
<?= view("themes/backend/vuexy/form/configuracion/maquinas/_maquinaPorDefectoFormItems") ?>
|
||||
</div><!-- /.card-body -->
|
||||
<div class="card-footer">
|
||||
<?= anchor(route_to("maquinaPorDefectoList"), lang("Basic.global.Cancel"), [
|
||||
"class" => "btn btn-secondary float-start",
|
||||
]) ?>
|
||||
<input type="submit" class="btn btn-primary float-end" name="save" value="<?= lang("Basic.global.Save") ?>">
|
||||
</div><!-- /.card-footer -->
|
||||
<div class="pt-4">
|
||||
<input
|
||||
type="submit"
|
||||
class="btn btn-primary float-start me-sm-3 me-1"
|
||||
name="save"
|
||||
value="<?= lang("Basic.global.Save") ?>"
|
||||
/>
|
||||
<?= anchor(route_to("maquinaPorDefectoList"), lang("Basic.global.Cancel"), ["class" => "btn btn-secondary"]) ?>
|
||||
</div><!-- /.card-footer -->
|
||||
</form>
|
||||
</div><!-- //.card -->
|
||||
</div><!--//.col -->
|
||||
@ -32,7 +35,6 @@
|
||||
|
||||
|
||||
$('#maquinaId').select2({
|
||||
theme: 'bootstrap-5',
|
||||
allowClear: false,
|
||||
ajax: {
|
||||
url: '<?= route_to("menuItemsOfMaquinas") ?>',
|
||||
|
||||
@ -125,7 +125,7 @@ $(document).on('click', '.btn-edit', function(e) {
|
||||
|
||||
$(document).on('click', '.btn-delete', function(e) {
|
||||
Swal.fire({
|
||||
title: '<?= lang('Basic.global.sweet.sureToDeleteTitle', [mb_strtolower(lang('MaquinasPorDefecto.maquina por defecto'))]) ?>',
|
||||
title: '<?= lang('Basic.global.sweet.sureToDeleteTitle', [mb_strtolower(lang('MaquinasPorDefecto.maquinadefecto'))]) ?>',
|
||||
text: '<?= lang('Basic.global.sweet.sureToDeleteText') ?>',
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
@ -139,8 +139,10 @@ $(document).on('click', '.btn-delete', function(e) {
|
||||
const row = $(this).closest('tr');
|
||||
if (result.value) {
|
||||
$.ajax({
|
||||
url: `<?= route_to('maquinaPorDefectoList') ?>/${dataId}`,
|
||||
method: 'DELETE',
|
||||
//url: `<?= route_to('maquinaPorDefectoList') ?>/${dataId}`,
|
||||
//method: 'DELETE',
|
||||
url: `/configuracion/maquinasdefecto/delete/${dataId}`,
|
||||
method: 'GET',
|
||||
}).done((data, textStatus, jqXHR) => {
|
||||
Toast.fire({
|
||||
icon: 'success',
|
||||
@ -166,20 +168,18 @@ $(document).on('click', '.btn-delete', function(e) {
|
||||
|
||||
|
||||
<?=$this->section('css') ?>
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/2.2.3/css/buttons.<?=config('Basics')->theme['name'] == 'Bootstrap5' ? 'bootstrap5' : 'bootstrap4' ?>.min.css">
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/2.2.3/css/buttons.bootstrap5.min.css">
|
||||
<?=$this->endSection() ?>
|
||||
|
||||
|
||||
<?= $this->section('additionalExternalJs') ?>
|
||||
<script src="https://cdn.datatables.net/buttons/2.2.3/js/dataTables.buttons.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.<?=config('Basics')->theme['name'] == 'Bootstrap5' ? 'bootstrap5' : 'bootstrap4' ?>.min.js"></script>
|
||||
|
||||
<script src="https://cdn.datatables.net/buttons/2.2.3/js/dataTables.buttons.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.bootstrap5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.print.min.js"></script>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.0/jszip.min.js" integrity="sha512-xcHCGC5tQ0SHlRX8Anbz6oy/OullASJkEhb4gjkneVpGE3/QGYejf14CUO5n5q5paiHfRFTa9HKgByxzidw2Bw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.5/pdfmake.min.js" integrity="sha512-rDbVu5s98lzXZsmJoMa0DjHNE+RwPJACogUCLyq3Xxm2kJO6qsQwjbE5NDk2DqmlKcxDirCnU1wAzVLe12IM3w==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.5/vfs_fonts.js" integrity="sha512-cktKDgjEiIkPVHYbn8bh/FEyYxmt4JDJJjOCu5/FQAkW4bc911XtKYValiyzBiJigjVEvrIAyQFEbRJZyDA1wQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
|
||||
<?=$this->endSection() ?>
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
<label for="userUpdateId" class="form-label">
|
||||
<?=lang('Tarifapreimpresion.userUpdateId') ?>*
|
||||
</label>
|
||||
<input type="number" id="userUpdateId" name="user_update_id" required placeholder="1" maxLength="10" class="form-control" value="<?=old('user_update_id', $tarifapreimpresionEntity->user_update_id) ?>">
|
||||
<input type="number" id="userUpdateId" name="user_updated_id" required placeholder="1" maxLength="10" class="form-control" value="<?=old('user_updated_id', $tarifapreimpresionEntity->user_updated_id) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
*/ ?>
|
||||
</div><!--//.col -->
|
||||
|
||||
@ -48,7 +48,7 @@
|
||||
<?= esc($item->user_created_id) ?>
|
||||
</td>
|
||||
<td class="align-middle">
|
||||
<?= esc($item->user_update_id) ?>
|
||||
<?= esc($item->user_updated_id) ?>
|
||||
</td>
|
||||
<td class="align-middle text-nowrap">
|
||||
<?= empty($item->created_at) ? '' : date('d/m/Y H:m:s', strtotime($item->created_at)) ?>
|
||||
|
||||
@ -51,8 +51,8 @@ Pasos para añadir el soft delete a una tabla
|
||||
debajo de $sanitizedData = $this->sanitized($postData, $nullIfEmpty);
|
||||
|
||||
// JJO
|
||||
if(isset($this->model->user_update_id)){
|
||||
$sanitizedData['user_update_id'] = $session->id_user;
|
||||
if(isset($this->model->user_updated_id)){
|
||||
$sanitizedData['user_updated_id'] = $session->id_user;
|
||||
}
|
||||
|
||||
5b.- Con lazy-tables:
|
||||
|
||||
Reference in New Issue
Block a user