mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Añadido autorute a true y corregidos errores del metodo request-
This commit is contained in:
2
.idea/safekat.iml
generated
2
.idea/safekat.iml
generated
@ -2,8 +2,6 @@
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/ci4" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/ci4/app" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/ci4/app/ThirdParty/DatatablesEditor/" isTestSource="false" packagePrefix="DataTables\" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
|
||||
@ -87,7 +87,7 @@ class Routing extends BaseRouting
|
||||
*
|
||||
* If FALSE, will stop searching and do NO automatic routing.
|
||||
*/
|
||||
public bool $autoRoute = false;
|
||||
public bool $autoRoute = true;
|
||||
|
||||
/**
|
||||
* If TRUE, will enable the use of the 'prioritize' option
|
||||
|
||||
@ -1,81 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers;
|
||||
|
||||
use App\Models\ActivityModel;
|
||||
use App\Models\Usuarios\UserModel;
|
||||
|
||||
class Activity extends BaseController
|
||||
{
|
||||
private $user_model;
|
||||
private $activity_model;
|
||||
|
||||
function __construct()
|
||||
{
|
||||
$this->user_model = new UserModel();
|
||||
$this->activity_model = new ActivityModel();
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$session = session();
|
||||
|
||||
$data['title'] = [
|
||||
'module' => lang("App.activity_title"),
|
||||
'page' => lang("App.activity_subtitle"),
|
||||
'icon' => 'fas fa-list'
|
||||
];
|
||||
|
||||
$data['breadcrumb'] = [
|
||||
['title' => lang("App.menu_activity"), 'route' => site_url('activity'), 'active' => true]
|
||||
];
|
||||
|
||||
$data['logs'] = $this->activity_model->select('SUM( IF( os LIKE "%Windows%", 1, 0 ) ) AS windows,
|
||||
SUM( IF( os = "Mac OS X", 1, 0 ) ) AS mac,
|
||||
SUM( IF( os = "Linux", 1, 0 ) ) AS linux,
|
||||
SUM( IF( os = "Android", 1, 0 ) ) AS android,
|
||||
SUM( IF( os = "iOS", 1, 0 ) ) AS iphone,
|
||||
SUM( IF( browser LIKE "%Chrome%", 1, 0 ) ) AS chrome,
|
||||
SUM( IF( browser LIKE "%Firefox%", 1, 0 ) ) AS firefox,
|
||||
SUM( IF( browser LIKE "%Safari%", 1, 0 ) ) AS safari,
|
||||
SUM( IF( browser LIKE "%Internet Explorer%", 1, 0 ) ) AS ie,
|
||||
SUM( IF( browser LIKE "%Edge%", 1, 0 ) ) AS edge,
|
||||
SUM( IF( browser LIKE "%Opera%", 1, 0 ) ) AS opera')->where('auth_activity.user',$session->get('token'))->first();
|
||||
$data['all'] = "";
|
||||
echo view(getenv('theme.path').'form/activity/index',$data);
|
||||
}
|
||||
|
||||
public function all()
|
||||
{
|
||||
$session = session();
|
||||
$dashboard = $session->get('dashboard')??'user';
|
||||
if($dashboard != 'admin'){
|
||||
return redirect()->to('/activity');
|
||||
}
|
||||
|
||||
$data['title'] = [
|
||||
'module' => lang("App.activity_title"),
|
||||
'page' => lang("App.activity_subtitle"),
|
||||
'icon' => 'fas fa-list'
|
||||
];
|
||||
|
||||
$data['breadcrumb'] = [
|
||||
['title' => lang("App.menu_dashboard"), 'route' => "/home", 'active' => false],
|
||||
['title' => lang("App.activity_title"), 'route' => "", 'active' => true]
|
||||
];
|
||||
|
||||
$data['logs'] = $this->activity_model->select('SUM( IF( os LIKE "%Windows%", 1, 0 ) ) AS windows,
|
||||
SUM( IF( os = "Mac OS X", 1, 0 ) ) AS mac,
|
||||
SUM( IF( os = "Linux", 1, 0 ) ) AS linux,
|
||||
SUM( IF( os = "Android", 1, 0 ) ) AS android,
|
||||
SUM( IF( os = "iOS", 1, 0 ) ) AS iphone,
|
||||
SUM( IF( browser LIKE "%Chrome%", 1, 0 ) ) AS chrome,
|
||||
SUM( IF( browser LIKE "%Firefox%", 1, 0 ) ) AS firefox,
|
||||
SUM( IF( browser LIKE "%Safari%", 1, 0 ) ) AS safari,
|
||||
SUM( IF( browser LIKE "%Internet Explorer%", 1, 0 ) ) AS ie,
|
||||
SUM( IF( browser LIKE "%Edge%", 1, 0 ) ) AS edge,
|
||||
SUM( IF( browser LIKE "%Opera%", 1, 0 ) ) AS opera')->first();
|
||||
$data['all'] = "/all";
|
||||
echo view(getenv('theme.path').'form/activity/index',$data);
|
||||
}
|
||||
}
|
||||
@ -48,7 +48,7 @@ abstract class BaseResourceController extends \CodeIgniter\RESTful\ResourceContr
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static string $viewPath;
|
||||
protected static $viewPath;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@ -78,12 +78,10 @@ class Cliente extends \App\Controllers\BaseResourceController
|
||||
|
||||
public function add()
|
||||
{
|
||||
// JJO
|
||||
$session = session();
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
@ -92,7 +90,7 @@ class Cliente extends \App\Controllers\BaseResourceController
|
||||
$sanitizedData = $this->sanitized($postData, $nullIfEmpty);
|
||||
|
||||
// JJO
|
||||
$sanitizedData['user_created_id'] = $session->id_user;
|
||||
$sanitizedData['user_created_id'] = auth()->user()->id;
|
||||
|
||||
$noException = true;
|
||||
if ($successfulResult = $this->canValidate()) : // if ($successfulResult = $this->validate($this->formValidationRules) ) :
|
||||
@ -151,8 +149,6 @@ class Cliente extends \App\Controllers\BaseResourceController
|
||||
public function edit($requestedId = null)
|
||||
{
|
||||
|
||||
// JJO
|
||||
$session = session();
|
||||
|
||||
if ($requestedId == null) :
|
||||
return $this->redirect2listView();
|
||||
@ -165,9 +161,9 @@ class Cliente extends \App\Controllers\BaseResourceController
|
||||
return $this->redirect2listView('sweet-error', $message);
|
||||
endif;
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
@ -188,7 +184,7 @@ class Cliente extends \App\Controllers\BaseResourceController
|
||||
}
|
||||
|
||||
// JJO
|
||||
$sanitizedData['user_updated_id'] = $session->id_user;
|
||||
$sanitizedData['user_updated_id'] = auth()->user()->id;
|
||||
|
||||
$noException = true;
|
||||
if ($successfulResult = $this->canValidate()) : // if ($successfulResult = $this->validate($this->formValidationRules) ) :
|
||||
|
||||
@ -60,9 +60,9 @@ class Clientecontactos extends \App\Controllers\BaseResourceController
|
||||
public function add()
|
||||
{
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
@ -134,9 +134,9 @@ class Clientecontactos extends \App\Controllers\BaseResourceController
|
||||
return $this->redirect2listView('sweet-error', $message);
|
||||
endif;
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
|
||||
@ -70,9 +70,9 @@ class Clienteplantillaprecios extends \App\Controllers\BaseResourceController
|
||||
// plantilla desde la lista
|
||||
public function update($requestedId = null)
|
||||
{
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
if ($requestedId == null) :
|
||||
return;
|
||||
@ -94,12 +94,10 @@ class Clienteplantillaprecios extends \App\Controllers\BaseResourceController
|
||||
|
||||
public function add()
|
||||
{
|
||||
// JJO
|
||||
$session = session();
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
@ -110,7 +108,7 @@ class Clienteplantillaprecios extends \App\Controllers\BaseResourceController
|
||||
$sanitizedData = $this->sanitized($postData, $nullIfEmpty);
|
||||
|
||||
// JJO
|
||||
$sanitizedData['user_created_id'] = $session->id_user;
|
||||
$sanitizedData['user_created_id'] = auth()->user()->id;
|
||||
|
||||
$noException = true;
|
||||
if ($successfulResult = $this->canValidate()) : // if ($successfulResult = $this->validate($this->formValidationRules) ) :
|
||||
@ -172,8 +170,6 @@ class Clienteplantillaprecios extends \App\Controllers\BaseResourceController
|
||||
public function edit($requestedId = null)
|
||||
{
|
||||
|
||||
// JJO
|
||||
$session = session();
|
||||
|
||||
if ($requestedId == null) :
|
||||
return $this->redirect2listView();
|
||||
@ -186,9 +182,9 @@ class Clienteplantillaprecios extends \App\Controllers\BaseResourceController
|
||||
return $this->redirect2listView('sweet-error', $message);
|
||||
endif;
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
@ -197,7 +193,7 @@ class Clienteplantillaprecios extends \App\Controllers\BaseResourceController
|
||||
$sanitizedData = $this->sanitized($postData, $nullIfEmpty);
|
||||
|
||||
// JJO
|
||||
$sanitizedData['user_updated_id'] = $session->id_user;
|
||||
$sanitizedData['user_updated_id'] = auth()->user()->id;
|
||||
|
||||
$noException = true;
|
||||
if ($successfulResult = $this->canValidate()) : // if ($successfulResult = $this->validate($this->formValidationRules) ) :
|
||||
|
||||
@ -49,9 +49,9 @@ class Clienteplantillaprecioslineas extends \App\Controllers\BaseResourceControl
|
||||
|
||||
public function update($requestedId = null){
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
if ($requestedId == null) :
|
||||
return;
|
||||
|
||||
@ -47,9 +47,9 @@ class ClientePrecios extends \App\Controllers\BaseResourceController
|
||||
|
||||
public function update($requestedId = null)
|
||||
{
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
if ($requestedId == null) :
|
||||
return;
|
||||
|
||||
@ -69,9 +69,9 @@ class Proveedores extends \App\Controllers\BaseResourceController {
|
||||
|
||||
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
@ -157,9 +157,9 @@ class Proveedores extends \App\Controllers\BaseResourceController {
|
||||
return $this->redirect2listView('sweet-error', $message);
|
||||
endif;
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@ class ProveedoresTipos extends \App\Controllers\BaseResourceController {
|
||||
|
||||
protected static $controllerSlug = 'proveedorestipos';
|
||||
|
||||
protected static $viewPath = 'themes/backend/vuexy/form/compras/proveedores/';
|
||||
protected static $viewPath = 'themes/backend/vuexy/form/compras/proveedores/';
|
||||
|
||||
protected $indexRoute = 'proveedorTipoList';
|
||||
|
||||
@ -54,9 +54,9 @@ class ProveedoresTipos extends \App\Controllers\BaseResourceController {
|
||||
|
||||
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
@ -128,9 +128,9 @@ class ProveedoresTipos extends \App\Controllers\BaseResourceController {
|
||||
return $this->redirect2listView('sweet-error', $message);
|
||||
endif;
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
|
||||
@ -58,9 +58,9 @@ class Comunidadesautonomas extends \App\Controllers\BaseResourceController
|
||||
{
|
||||
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
@ -132,9 +132,9 @@ class Comunidadesautonomas extends \App\Controllers\BaseResourceController
|
||||
return $this->redirect2listView('sweet-error', $message);
|
||||
endif;
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
|
||||
@ -56,9 +56,9 @@ class Formaspagos extends \App\Controllers\BaseResourceController
|
||||
{
|
||||
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
@ -129,9 +129,9 @@ class Formaspagos extends \App\Controllers\BaseResourceController
|
||||
return $this->redirect2listView('sweet-error', $message);
|
||||
endif;
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
|
||||
@ -47,9 +47,9 @@ class Group extends \App\Controllers\GoBaseController
|
||||
public function add()
|
||||
{
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
@ -158,9 +158,9 @@ class Group extends \App\Controllers\GoBaseController
|
||||
return $this->redirect2listView('errorMessage', $message);
|
||||
endif;
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
|
||||
@ -56,9 +56,9 @@ class Imposiciones extends \App\Controllers\BaseResourceController
|
||||
{
|
||||
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
@ -130,9 +130,9 @@ class Imposiciones extends \App\Controllers\BaseResourceController
|
||||
return $this->redirect2listView('sweet-error', $message);
|
||||
endif;
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
|
||||
@ -69,12 +69,10 @@ class Maquinas extends \App\Controllers\BaseResourceController
|
||||
public function add()
|
||||
{
|
||||
|
||||
// JJO
|
||||
$session = session();
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
@ -83,7 +81,7 @@ class Maquinas extends \App\Controllers\BaseResourceController
|
||||
$sanitizedData = $this->sanitized($postData, $nullIfEmpty);
|
||||
|
||||
// JJO
|
||||
$sanitizedData['user_created_id'] = $session->id_user;
|
||||
$sanitizedData['user_created_id'] = auth()->user()->id;
|
||||
|
||||
$noException = true;
|
||||
if ($successfulResult = $this->canValidate()) : // if ($successfulResult = $this->validate($this->formValidationRules) ) :
|
||||
@ -139,8 +137,6 @@ class Maquinas extends \App\Controllers\BaseResourceController
|
||||
public function edit($requestedId = null)
|
||||
{
|
||||
|
||||
// JJO
|
||||
$session = session();
|
||||
|
||||
if ($requestedId == null) :
|
||||
return $this->redirect2listView();
|
||||
@ -153,9 +149,9 @@ class Maquinas extends \App\Controllers\BaseResourceController
|
||||
return $this->redirect2listView('sweet-error', $message);
|
||||
endif;
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
@ -173,7 +169,7 @@ class Maquinas extends \App\Controllers\BaseResourceController
|
||||
}
|
||||
|
||||
// JJO
|
||||
$sanitizedData['user_updated_id'] = $session->id_user;
|
||||
$sanitizedData['user_updated_id'] = auth()->user()->id;
|
||||
$noException = true;
|
||||
if ($successfulResult = $this->canValidate()) : // if ($successfulResult = $this->validate($this->formValidationRules) ) :
|
||||
|
||||
|
||||
@ -63,12 +63,10 @@ class Maquinasdefecto extends \App\Controllers\BaseResourceController
|
||||
public function add()
|
||||
{
|
||||
|
||||
// JJO
|
||||
$session = session();
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
@ -77,7 +75,7 @@ class Maquinasdefecto extends \App\Controllers\BaseResourceController
|
||||
$sanitizedData = $this->sanitized($postData, $nullIfEmpty);
|
||||
|
||||
// JJO
|
||||
$sanitizedData['user_created_id'] = $session->id_user;
|
||||
$sanitizedData['user_created_id'] = auth()->user()->id;
|
||||
|
||||
$noException = true;
|
||||
if ($successfulResult = $this->canValidate()) : // if ($successfulResult = $this->validate($this->formValidationRules) ) :
|
||||
@ -140,8 +138,6 @@ class Maquinasdefecto extends \App\Controllers\BaseResourceController
|
||||
public function edit($requestedId = null)
|
||||
{
|
||||
|
||||
// JJO
|
||||
$session = session();
|
||||
|
||||
if ($requestedId == null) :
|
||||
return $this->redirect2listView();
|
||||
@ -154,9 +150,9 @@ class Maquinasdefecto extends \App\Controllers\BaseResourceController
|
||||
return $this->redirect2listView('sweet-error', $message);
|
||||
endif;
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
@ -165,7 +161,7 @@ class Maquinasdefecto extends \App\Controllers\BaseResourceController
|
||||
$sanitizedData = $this->sanitized($postData, $nullIfEmpty);
|
||||
|
||||
// JJO
|
||||
$sanitizedData['user_updated_id'] = $session->id_user;
|
||||
$sanitizedData['user_updated_id'] = auth()->user()->id;
|
||||
|
||||
$noException = true;
|
||||
if ($successfulResult = $this->canValidate()) : // if ($successfulResult = $this->validate($this->formValidationRules) ) :
|
||||
|
||||
@ -69,9 +69,9 @@ class Maquinastarifasimpresion extends \App\Controllers\BaseResourceController
|
||||
{
|
||||
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
@ -145,9 +145,9 @@ class Maquinastarifasimpresion extends \App\Controllers\BaseResourceController
|
||||
return $this->redirect2listView('sweet-error', $message);
|
||||
endif;
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
|
||||
@ -56,9 +56,9 @@ class Paises extends \App\Controllers\BaseResourceController
|
||||
{
|
||||
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
@ -129,9 +129,9 @@ class Paises extends \App\Controllers\BaseResourceController
|
||||
return $this->redirect2listView('sweet-error', $message);
|
||||
endif;
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
|
||||
@ -72,9 +72,9 @@ class Papelesgenericos extends \App\Controllers\BaseResourceController
|
||||
|
||||
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
@ -144,9 +144,9 @@ class Papelesgenericos extends \App\Controllers\BaseResourceController
|
||||
return $this->redirect2listView('sweet-error', $message);
|
||||
endif;
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
|
||||
@ -96,9 +96,9 @@ class Papelesimpresion extends \App\Controllers\BaseResourceController
|
||||
|
||||
public function add()
|
||||
{
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = false; // !(phpversion() >= '8.1');
|
||||
|
||||
@ -159,8 +159,6 @@ class Papelesimpresion extends \App\Controllers\BaseResourceController
|
||||
|
||||
public function edit($requestedId = null)
|
||||
{
|
||||
// JJO
|
||||
$session = session();
|
||||
|
||||
if ($requestedId == null) :
|
||||
return $this->redirect2listView();
|
||||
@ -173,9 +171,9 @@ class Papelesimpresion extends \App\Controllers\BaseResourceController
|
||||
return $this->redirect2listView('sweet-error', $message);
|
||||
endif;
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
@ -184,7 +182,7 @@ class Papelesimpresion extends \App\Controllers\BaseResourceController
|
||||
$sanitizedData = $this->sanitized($postData, $nullIfEmpty);
|
||||
|
||||
// JJO
|
||||
$sanitizedData['user_updated_id'] = $session->id_user;
|
||||
$sanitizedData['user_updated_id'] = auth()->user()->id;
|
||||
|
||||
|
||||
if ($this->request->getPost('defecto') == null) {
|
||||
|
||||
@ -54,9 +54,9 @@ class Papelformato extends \App\Controllers\BaseResourceController {
|
||||
|
||||
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
@ -128,9 +128,9 @@ class Papelformato extends \App\Controllers\BaseResourceController {
|
||||
return $this->redirect2listView('sweet-error', $message);
|
||||
endif;
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
|
||||
@ -68,9 +68,9 @@ class Papelimpresiontipologias extends \App\Controllers\BaseResourceController {
|
||||
|
||||
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
@ -154,9 +154,9 @@ class Papelimpresiontipologias extends \App\Controllers\BaseResourceController {
|
||||
return $this->redirect2listView('sweet-error', $message);
|
||||
endif;
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
|
||||
@ -58,9 +58,9 @@ class Provincias extends \App\Controllers\BaseResourceController
|
||||
{
|
||||
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
@ -132,9 +132,9 @@ class Provincias extends \App\Controllers\BaseResourceController
|
||||
return $this->redirect2listView('sweet-error', $message);
|
||||
endif;
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
|
||||
@ -41,9 +41,9 @@ class Tipologias extends \App\Controllers\GoBaseController
|
||||
{
|
||||
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
@ -113,9 +113,9 @@ class Tipologias extends \App\Controllers\GoBaseController
|
||||
return $this->redirect2listView('errorMessage', $message);
|
||||
endif;
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
|
||||
@ -56,9 +56,9 @@ class Users extends \App\Controllers\GoBaseController {
|
||||
|
||||
public function add() {
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
@ -153,9 +153,9 @@ class Users extends \App\Controllers\GoBaseController {
|
||||
return $this->redirect2listView('errorMessage', $message);
|
||||
endif;
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
|
||||
@ -83,12 +83,10 @@ class Cosidotapablanda extends \App\Controllers\BaseResourceController
|
||||
public function add($tipo_impresion_id = null)
|
||||
{
|
||||
|
||||
// JJO
|
||||
$session = session();
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
@ -97,7 +95,7 @@ class Cosidotapablanda extends \App\Controllers\BaseResourceController
|
||||
$sanitizedData = $this->sanitized($postData, $nullIfEmpty);
|
||||
|
||||
// JJO
|
||||
$sanitizedData['user_created_id'] = $session->id_user;
|
||||
$sanitizedData['user_created_id'] = auth()->user()->id;
|
||||
|
||||
if (!isset($sanitizedData['papel_formato_id']) || $sanitizedData['papel_formato_id'] == null) {
|
||||
$sanitizedData['papel_formato_id'] = 0;
|
||||
@ -170,8 +168,6 @@ class Cosidotapablanda extends \App\Controllers\BaseResourceController
|
||||
|
||||
public function edit($requestedId = null)
|
||||
{
|
||||
// JJO
|
||||
$session = session();
|
||||
|
||||
if ($requestedId == null) :
|
||||
return $this->redirect2listView();
|
||||
@ -184,9 +180,9 @@ class Cosidotapablanda extends \App\Controllers\BaseResourceController
|
||||
return $this->redirect2listView('sweet-error', $message);
|
||||
endif;
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
@ -197,7 +193,7 @@ class Cosidotapablanda extends \App\Controllers\BaseResourceController
|
||||
$sanitizedData = $this->sanitized($postData, $nullIfEmpty);
|
||||
|
||||
// JJO
|
||||
$sanitizedData['user_updated_id'] = $session->id_user;
|
||||
$sanitizedData['user_updated_id'] = auth()->user()->id;
|
||||
|
||||
if ($this->request->getPost('is_duplicado') == null) {
|
||||
$sanitizedData['is_duplicado'] = 0;
|
||||
|
||||
@ -14,7 +14,7 @@ class Actividad extends BaseResourceController
|
||||
|
||||
protected static $controllerSlug = 'activity';
|
||||
|
||||
protected static string $viewPath = 'themes/backend/vuexy/form/activity/';
|
||||
protected static $viewPath = 'themes/backend/vuexy/form/activity/';
|
||||
|
||||
protected static $indexRoute = 'activityList';
|
||||
|
||||
|
||||
@ -13,10 +13,13 @@ class Ajustes extends BaseResourceController
|
||||
|
||||
protected static $controllerSlug = 'settings';
|
||||
|
||||
protected static string $viewPath = 'themes/vuexy/form/settings/';
|
||||
protected static $viewPath = 'themes/backend/vuexy/form/settings/';
|
||||
|
||||
protected static string $formViewName = 'settingsForm';
|
||||
|
||||
protected static $singularObjectName = 'settings';
|
||||
protected static $singularObjectNameCc = 'settings';
|
||||
|
||||
protected $indexRoute = 'settingForm';
|
||||
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@ class Tarifaacabado extends \App\Controllers\BaseResourceController
|
||||
|
||||
protected static $controllerSlug = 'tarifasacabado';
|
||||
|
||||
protected static $viewPath = 'themes/backend/vuexy/form/tarifas/acabado/';
|
||||
protected static $viewPath = 'themes/backend/vuexy/form/tarifas/acabado/';
|
||||
|
||||
protected $indexRoute = 'tarifaAcabadoList';
|
||||
|
||||
@ -69,12 +69,7 @@ class Tarifaacabado extends \App\Controllers\BaseResourceController
|
||||
public function add()
|
||||
{
|
||||
|
||||
// JJO
|
||||
$session = session();
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
@ -83,7 +78,7 @@ class Tarifaacabado extends \App\Controllers\BaseResourceController
|
||||
$sanitizedData = $this->sanitized($postData, $nullIfEmpty);
|
||||
|
||||
// JJO
|
||||
$sanitizedData['user_created_id'] = $session->id_user;
|
||||
$sanitizedData['user_created_id'] = auth()->user()->id;
|
||||
|
||||
if ($this->request->getPost('mostrar_en_presupuesto') == null) {
|
||||
$sanitizedData['mostrar_en_presupuesto'] = false;
|
||||
@ -149,8 +144,6 @@ class Tarifaacabado extends \App\Controllers\BaseResourceController
|
||||
public function edit($requestedId = null)
|
||||
{
|
||||
|
||||
// JJO
|
||||
$session = session();
|
||||
|
||||
if ($requestedId == null) :
|
||||
return $this->redirect2listView();
|
||||
@ -163,9 +156,7 @@ class Tarifaacabado extends \App\Controllers\BaseResourceController
|
||||
return $this->redirect2listView('sweet-error', $message);
|
||||
endif;
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
@ -174,7 +165,7 @@ class Tarifaacabado extends \App\Controllers\BaseResourceController
|
||||
$sanitizedData = $this->sanitized($postData, $nullIfEmpty);
|
||||
|
||||
// JJO
|
||||
$sanitizedData['user_updated_id'] = $session->id_user;
|
||||
$sanitizedData['user_updated_id'] = auth()->user()->id;
|
||||
|
||||
if ($this->request->getPost('mostrar_en_presupuesto') == null) {
|
||||
$sanitizedData['mostrar_en_presupuesto'] = false;
|
||||
|
||||
@ -76,9 +76,9 @@ class Tarifaacabadolineas extends \App\Controllers\BaseResourceController
|
||||
{
|
||||
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
@ -150,9 +150,9 @@ class Tarifaacabadolineas extends \App\Controllers\BaseResourceController
|
||||
return $this->redirect2listView('sweet-error', $message);
|
||||
endif;
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
|
||||
@ -73,9 +73,9 @@ class Tarifaencuadernacionlineas extends \App\Controllers\BaseResourceController
|
||||
{
|
||||
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
@ -145,9 +145,9 @@ class Tarifaencuadernacionlineas extends \App\Controllers\BaseResourceController
|
||||
return $this->redirect2listView('sweet-error', $message);
|
||||
endif;
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
|
||||
@ -71,9 +71,9 @@ class Tarifaencuadernacionlineashoras extends \App\Controllers\BaseResourceContr
|
||||
|
||||
public function add()
|
||||
{
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
@ -145,9 +145,9 @@ class Tarifaencuadernacionlineashoras extends \App\Controllers\BaseResourceContr
|
||||
return $this->redirect2listView('sweet-error', $message);
|
||||
endif;
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
|
||||
@ -52,9 +52,9 @@ class Tarifaextra extends \App\Controllers\GoBaseController
|
||||
{
|
||||
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
@ -117,8 +117,6 @@ class Tarifaextra extends \App\Controllers\GoBaseController
|
||||
public function edit($requestedId = null)
|
||||
{
|
||||
|
||||
// JJO
|
||||
$session = session();
|
||||
|
||||
if ($requestedId == null) :
|
||||
return $this->redirect2listView();
|
||||
@ -131,9 +129,9 @@ class Tarifaextra extends \App\Controllers\GoBaseController
|
||||
return $this->redirect2listView('errorMessage', $message);
|
||||
endif;
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
@ -142,7 +140,7 @@ class Tarifaextra extends \App\Controllers\GoBaseController
|
||||
|
||||
// JJO
|
||||
if (isset($this->model->user_updated_id)) {
|
||||
$sanitizedData['user_updated_id'] = $session->id_user;
|
||||
$sanitizedData['user_updated_id'] = auth()->user()->id;
|
||||
}
|
||||
if ($this->request->getPost('mostrar_en_presupuesto') == null) {
|
||||
$sanitizedData['mostrar_en_presupuesto'] = false;
|
||||
|
||||
@ -74,9 +74,9 @@ class Tarifamanipuladolineas extends \App\Controllers\BaseResourceController
|
||||
{
|
||||
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
@ -147,9 +147,9 @@ class Tarifamanipuladolineas extends \App\Controllers\BaseResourceController
|
||||
return $this->redirect2listView('sweet-error', $message);
|
||||
endif;
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
|
||||
@ -52,9 +52,9 @@ class Tarifapreimpresion extends \App\Controllers\GoBaseController
|
||||
{
|
||||
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
@ -117,8 +117,6 @@ class Tarifapreimpresion extends \App\Controllers\GoBaseController
|
||||
public function edit($requestedId = null)
|
||||
{
|
||||
|
||||
// JJO
|
||||
$session = session();
|
||||
|
||||
if ($requestedId == null) :
|
||||
return $this->redirect2listView();
|
||||
@ -131,9 +129,9 @@ class Tarifapreimpresion extends \App\Controllers\GoBaseController
|
||||
return $this->redirect2listView('errorMessage', $message);
|
||||
endif;
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
@ -142,7 +140,7 @@ class Tarifapreimpresion extends \App\Controllers\GoBaseController
|
||||
|
||||
// JJO
|
||||
if (isset($this->model->user_updated_id)) {
|
||||
$sanitizedData['user_updated_id'] = $session->id_user;
|
||||
$sanitizedData['user_updated_id'] = auth()->user()->id;
|
||||
}
|
||||
if ($this->request->getPost('mostrar_en_presupuesto') == null) {
|
||||
$sanitizedData['mostrar_en_presupuesto'] = false;
|
||||
|
||||
@ -73,12 +73,10 @@ class Tarifasencuadernacion extends \App\Controllers\BaseResourceController
|
||||
public function add()
|
||||
{
|
||||
|
||||
// JJO
|
||||
$session = session();
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
@ -88,7 +86,7 @@ class Tarifasencuadernacion extends \App\Controllers\BaseResourceController
|
||||
|
||||
// JJO
|
||||
if (isset($this->model->user_updated_id)) {
|
||||
$sanitizedData['user_created_id'] = $session->id_user;
|
||||
$sanitizedData['user_created_id'] = auth()->user()->id;
|
||||
}
|
||||
if ($this->request->getPost('mostrar_en_presupuesto') == null) {
|
||||
$sanitizedData['mostrar_en_presupuesto'] = false;
|
||||
@ -159,8 +157,6 @@ class Tarifasencuadernacion extends \App\Controllers\BaseResourceController
|
||||
public function edit($requestedId = null)
|
||||
{
|
||||
|
||||
// JJO
|
||||
$session = session();
|
||||
|
||||
if ($requestedId == null) :
|
||||
return $this->redirect2listView();
|
||||
@ -173,9 +169,9 @@ class Tarifasencuadernacion extends \App\Controllers\BaseResourceController
|
||||
return $this->redirect2listView('sweet-error', $message);
|
||||
endif;
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
@ -185,7 +181,7 @@ class Tarifasencuadernacion extends \App\Controllers\BaseResourceController
|
||||
|
||||
// JJO
|
||||
if (isset($this->model->user_updated_id)) {
|
||||
$sanitizedData['user_updated_id'] = $session->id_user;
|
||||
$sanitizedData['user_updated_id'] = auth()->user()->id;
|
||||
}
|
||||
if ($this->request->getPost('mostrar_en_presupuesto') == null) {
|
||||
$sanitizedData['mostrar_en_presupuesto'] = false;
|
||||
|
||||
@ -72,12 +72,10 @@ class Tarifasenvios extends \App\Controllers\BaseResourceController {
|
||||
|
||||
public function add() {
|
||||
|
||||
// JJO
|
||||
$session = session();
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
@ -87,7 +85,7 @@ class Tarifasenvios extends \App\Controllers\BaseResourceController {
|
||||
|
||||
// JJO
|
||||
if (isset($this->model->user_updated_id)) {
|
||||
$sanitizedData['user_created_id'] = $session->id_user;
|
||||
$sanitizedData['user_created_id'] = auth()->user()->id;
|
||||
}
|
||||
|
||||
$noException = true;
|
||||
@ -144,8 +142,6 @@ class Tarifasenvios extends \App\Controllers\BaseResourceController {
|
||||
|
||||
public function edit($requestedId = null) {
|
||||
|
||||
// JJO
|
||||
$session = session();
|
||||
|
||||
if ($requestedId == null) :
|
||||
return $this->redirect2listView();
|
||||
@ -158,9 +154,9 @@ class Tarifasenvios extends \App\Controllers\BaseResourceController {
|
||||
return $this->redirect2listView('sweet-error', $message);
|
||||
endif;
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
@ -170,7 +166,7 @@ class Tarifasenvios extends \App\Controllers\BaseResourceController {
|
||||
|
||||
// JJO
|
||||
if (isset($this->model->user_updated_id)) {
|
||||
$sanitizedData['user_updated_id'] = $session->id_user;
|
||||
$sanitizedData['user_updated_id'] = auth()->user()->id;
|
||||
}
|
||||
|
||||
$noException = true;
|
||||
|
||||
@ -68,9 +68,9 @@ class Tarifasenviosprecios extends \App\Controllers\BaseResourceController {
|
||||
|
||||
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
@ -145,9 +145,9 @@ class Tarifasenviosprecios extends \App\Controllers\BaseResourceController {
|
||||
return $this->redirect2listView('sweet-error', $message);
|
||||
endif;
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
|
||||
@ -69,9 +69,9 @@ class Tarifasenvioszonas extends \App\Controllers\BaseResourceController {
|
||||
|
||||
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
@ -144,9 +144,9 @@ class Tarifasenvioszonas extends \App\Controllers\BaseResourceController {
|
||||
return $this->redirect2listView('sweet-error', $message);
|
||||
endif;
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
|
||||
@ -69,12 +69,10 @@ class Tarifasmanipulado extends \App\Controllers\BaseResourceController
|
||||
public function add()
|
||||
{
|
||||
|
||||
// JJO
|
||||
$session = session();
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
@ -84,7 +82,7 @@ class Tarifasmanipulado extends \App\Controllers\BaseResourceController
|
||||
|
||||
// JJO
|
||||
if (isset($this->model->user_updated_id)) {
|
||||
$sanitizedData['user_created_id'] = $session->id_user;
|
||||
$sanitizedData['user_created_id'] = auth()->user()->id;
|
||||
}
|
||||
if ($this->request->getPost('mostrar_en_presupuesto') == null) {
|
||||
$sanitizedData['mostrar_en_presupuesto'] = false;
|
||||
@ -142,8 +140,6 @@ class Tarifasmanipulado extends \App\Controllers\BaseResourceController
|
||||
public function edit($requestedId = null)
|
||||
{
|
||||
|
||||
// JJO
|
||||
$session = session();
|
||||
|
||||
if ($requestedId == null) :
|
||||
return $this->redirect2listView();
|
||||
@ -156,9 +152,9 @@ class Tarifasmanipulado extends \App\Controllers\BaseResourceController
|
||||
return $this->redirect2listView('sweet-error', $message);
|
||||
endif;
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
@ -168,7 +164,7 @@ class Tarifasmanipulado extends \App\Controllers\BaseResourceController
|
||||
|
||||
// JJO
|
||||
if (isset($this->model->user_updated_id)) {
|
||||
$sanitizedData['user_updated_id'] = $session->id_user;
|
||||
$sanitizedData['user_updated_id'] = auth()->user()->id;
|
||||
}
|
||||
if ($this->request->getPost('mostrar_en_presupuesto') == null) {
|
||||
$sanitizedData['mostrar_en_presupuesto'] = false;
|
||||
|
||||
@ -173,7 +173,7 @@ if (!function_exists('getSystemSettings')) {
|
||||
// Get Settings
|
||||
$session = session();
|
||||
$settingsBase = new \App\Models\Sistema\SettingsModel();
|
||||
$settings = $settingsBase->first() ?? [];
|
||||
$settings = $settingsBase->asArray()->first() ?? [];
|
||||
$session->set('settings', $settings);
|
||||
if (empty($session->get('lang'))) {
|
||||
$session->set('lang', 'es');
|
||||
|
||||
@ -1,20 +0,0 @@
|
||||
<?php
|
||||
namespace App\Models;
|
||||
|
||||
class ActivityModel extends BaseModel
|
||||
{
|
||||
protected $table = 'auth_activity';
|
||||
protected $primaryKey = 'id_activity';
|
||||
protected $allowedFields = [
|
||||
'user',
|
||||
'level',
|
||||
'event',
|
||||
'ip',
|
||||
'os',
|
||||
'browser',
|
||||
'detail'
|
||||
];
|
||||
protected $useTimestamps = true;
|
||||
protected $createdField = 'created_at';
|
||||
protected $updatedField = 'updated_at';
|
||||
}
|
||||
@ -1,6 +1,6 @@
|
||||
<?= $this->include("themes/_commonPartialsBs/select2bs5") ?>
|
||||
<?= $this->include("themes/_commonPartialsBs/datatables") ?>
|
||||
<?= $this->extend('themes/vuexy/main/defaultlayout') ?>
|
||||
<?= $this->extend('themes/backend/vuexy/main/defaultlayout') ?>
|
||||
|
||||
<?= $this->section('content'); ?>
|
||||
<!--Content Body-->
|
||||
|
||||
@ -0,0 +1,431 @@
|
||||
<div class="row mt-4">
|
||||
|
||||
<!-- Navigation -->
|
||||
<div class="col-lg-3 col-md-4 col-12 mb-md-0 mb-3">
|
||||
<div class="d-flex justify-content-between flex-column mb-2 mb-md-0">
|
||||
<ul class="nav nav-align-left nav-pills flex-column">
|
||||
<li class="nav-item">
|
||||
<button class="nav-link active" data-bs-toggle="tab" data-bs-target="#general">
|
||||
<i class="ti ti-sitemap me-1 ti-sm"></i>
|
||||
<span class="align-middle fw-semibold"><?=lang("App.settings_label_general")?></span>
|
||||
</button>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<button class="nav-link" data-bs-toggle="tab" data-bs-target="#email">
|
||||
<i class="ti ti-mail me-1 ti-sm"></i>
|
||||
<span class="align-middle fw-semibold"><?=lang("App.settings_label_email")?></span>
|
||||
</button>
|
||||
</li>
|
||||
<?php /*
|
||||
<li class="nav-item">
|
||||
<button class="nav-link" data-bs-toggle="tab" data-bs-target="#backup">
|
||||
<i class="ti ti-server me-1 ti-sm"></i>
|
||||
<span class="align-middle fw-semibold"><?=lang("App.settings_label_backup")?></span>
|
||||
</button>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<button class="nav-link" data-bs-toggle="tab" data-bs-target="#logs">
|
||||
<i class="ti ti-archive me-1 ti-sm"></i>
|
||||
<span class="align-middle fw-semibold"><?=lang("App.settings_label_logs")?></span>
|
||||
</button>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<button class="nav-link" data-bs-toggle="tab" data-bs-target="#cron">
|
||||
<i class="ti ti-rotate-clockwise me-1 ti-sm"></i>
|
||||
<span class="align-middle fw-semibold"><?=lang("App.settings_label_cron")?></span>
|
||||
</button>
|
||||
</li>
|
||||
*/ ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Navigation -->
|
||||
|
||||
<!-- System Settings -->
|
||||
<div class="col-lg-9 col-md-8 col-12">
|
||||
<form class="form" action="<?= $formAction ?>" method="post">
|
||||
<?= csrf_field() ?>
|
||||
<div class="tab-content py-0">
|
||||
<!-- General Settings -->
|
||||
<div class="tab-pane fade show active" id="general" role="tabpanel">
|
||||
<div class="d-flex mb-3 gap-3">
|
||||
<div>
|
||||
<span class="badge bg-label-primary rounded-2 p-2">
|
||||
<i class="ti ti-sitemap ti-lg"></i>
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
<h4 class="mb-0">
|
||||
<span class="align-middle"><?=lang("App.settings_label_general_title")?></span>
|
||||
</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="row card-body">
|
||||
DETALLES ESPECIFICOS DEL ERP (TBD)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /General Settings -->
|
||||
|
||||
<!-- Email Settings -->
|
||||
<div class="tab-pane fade show" id="email" role="tabpanel">
|
||||
<div class="d-flex mb-3 gap-3">
|
||||
<div>
|
||||
<span class="badge bg-label-primary rounded-2 p-2">
|
||||
<i class="ti ti-mail ti-lg"></i>
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
<h4 class="mb-0">
|
||||
<span class="align-middle"><?=lang("App.settings_label_email_title")?></span>
|
||||
</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="row card-body">
|
||||
<div class="col-lg-12 mb-3">
|
||||
<label class="text-primary"><?=lang("App.settings_label_email_subtitle_1")?></label>
|
||||
</div>
|
||||
<div class="col-lg-3 mb-3">
|
||||
<label for="email_gateway" class="form-label"><?=lang("App.settings_field_email_gateway")?></label>
|
||||
<?php $id_select = (isset($obj)) ? $obj['email_gateway'] : set_value('email_gateway');?>
|
||||
<select name="email_gateway" id="email_gateway" class="select2 form-control">
|
||||
<option value="smtp" <?= $id_select == "smtp" ? 'selected' : '' ?>><?=lang("App.settings_field_email_gateway_smtp")?></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-3 mb-3">
|
||||
<label for="email_smtp" class="form-label"><?=lang("App.settings_field_email_smtp")?></label>
|
||||
<input
|
||||
type="text"
|
||||
id="email_smtp"
|
||||
name="email_smtp"
|
||||
class="form-control"
|
||||
placeholder="<?=lang("App.settings_field_email_smtp_ph")?>"
|
||||
value="<?= old('email_smtp', $settingsEntity->email_smtp) ?>"
|
||||
>
|
||||
</div>
|
||||
<div class="col-lg-3 mb-3">
|
||||
<label for="email_port" class="form-label"><?=lang("App.settings_field_email_port")?></label>
|
||||
<input
|
||||
type="number"
|
||||
id="email_port"
|
||||
name="email_port"
|
||||
class="form-control"
|
||||
placeholder="<?=lang("App.settings_field_email_port_ph")?>"
|
||||
value="<?= old('email_port', $settingsEntity->email_port) ?>"
|
||||
>
|
||||
</div>
|
||||
<div class="col-lg-3 mb-3">
|
||||
<label for="email_cert" class="form-label"><?=lang("App.settings_field_email_cert")?></label>
|
||||
<?php $id_select = (isset($settingsEntity)) ? $settingsEntity->email_cert : 'none';?>
|
||||
<select name="email_cert" id="email_cert" class="select2 form-control">
|
||||
<option value="none" <?= $id_select == "none" ? 'selected' : '' ?>><?=lang("App.settings_field_email_cert_none")?></option>
|
||||
<option value="ssl" <?= $id_select == "ssl" ? 'selected' : '' ?>><?=lang("App.settings_field_email_cert_ssl")?></option>
|
||||
<option value="tls" <?= $id_select == "tls" ? 'selected' : '' ?>><?=lang("App.settings_field_email_cert_tls")?></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-6 mb-3">
|
||||
<label for="email_address" class="form-label"><?=lang("App.settings_field_email_address")?></label>
|
||||
<input
|
||||
type="text"
|
||||
id="email_address"
|
||||
name="email_address"
|
||||
class="form-control"
|
||||
placeholder="<?=lang("App.settings_field_email_address_ph")?>"
|
||||
value="<?= old('email_address', $settingsEntity->email_address) ?>"
|
||||
>
|
||||
</div>
|
||||
<div class="col-lg-6 mb-3">
|
||||
<label for="email_pass" class="form-label"><?=lang("App.settings_field_email_pass")?></label>
|
||||
<input
|
||||
type="password"
|
||||
id="email_pass"
|
||||
name="email_pass"
|
||||
class="form-control"
|
||||
placeholder="<?=lang("App.settings_field_email_pass_ph")?>"
|
||||
value="<?= old('email_pass', $settingsEntity->email_pass) ?>"
|
||||
>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 mb-3">
|
||||
<label for="email_name" class="form-label"><?=lang("App.settings_field_email_name")?></label>
|
||||
<input
|
||||
type="text"
|
||||
id="email_name"
|
||||
name="email_name" class="form-control"
|
||||
placeholder="<?=lang("App.settings_field_email_name_ph")?>"
|
||||
value="<?= old('email_name', $settingsEntity->email_name) ?>"
|
||||
>
|
||||
</div>
|
||||
<?php /*
|
||||
<div class="col-lg-12 mt-4 mb-3">
|
||||
<label class="text-primary"><?=lang("App.settings_field_test_send")?></label>
|
||||
</div>
|
||||
<div class="col-lg-6 mb-3">
|
||||
<label class="form-label"><?=lang("App.settings_field_email_address")?></label>
|
||||
<div class="input-group">
|
||||
<input
|
||||
type="email"
|
||||
id="send_email_test"
|
||||
name="send_email_test"
|
||||
class="form-control"
|
||||
placeholder="<?=lang("App.settings_field_email_address_ph")?>"
|
||||
>
|
||||
<div class="input-group-append">
|
||||
<button type="button" class="btn btn-outline-primary" onclick="send_test()"><?=lang("App.settings_field_test_send_btn")?></button>
|
||||
</div>
|
||||
</div>
|
||||
<p class="text-primary" id="msg_email_test" style="display: none;"><i class="fas fa-spinner fa-pulse"></i> <?= lang("App.login_wait") ?></p>
|
||||
</div>
|
||||
*/ ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Email Settings -->
|
||||
|
||||
<?php /*
|
||||
<!-- Backup Settings -->
|
||||
<div class="tab-pane fade show" id="backup" role="tabpanel">
|
||||
<div class="d-flex mb-3 gap-3">
|
||||
<div>
|
||||
<span class="badge bg-label-primary rounded-2 p-2">
|
||||
<i class="ti ti-server ti-lg"></i>
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
<h4 class="mb-0">
|
||||
<span class="align-middle"><?=lang("App.settings_label_backup_title")?></span>
|
||||
</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="row card-body">
|
||||
<div class="row">
|
||||
<div class="col-lg-12 mb-3">
|
||||
<label class="text-primary"><?=lang("App.settings_label_backup_subtitle_1")?></label>
|
||||
</div>
|
||||
<div class="col-lg-4 mb-3">
|
||||
<label for="backup_storage" class="form-label"><?=lang("App.settings_field_backup_storage")?></label>
|
||||
<?php $id_select = (isset($obj)) ? $obj['backup_storage'] : set_value('backup_storage');?>
|
||||
<select name="backup_storage" id="backup_storage" class="select2 form-control">
|
||||
<option value="local" <?= $id_select == "local" ? 'selected' : '' ?>><?=lang("App.settings_field_storage_gateway_local")?></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-4 mb-3">
|
||||
<label for="backup_table" class="form-label"><?=lang("App.settings_field_backup_table")?></label>
|
||||
<?php $select = (isset($obj)) ? $obj['backup_table'] : set_value('backup_table');?>
|
||||
<select name="backup_table[]" id="backup_table" class="select2 form-control" multiple="multiple">
|
||||
<?php
|
||||
$select = explode(',',$select);
|
||||
foreach($select??[] as $id_select){
|
||||
if ($id_select == "all"){
|
||||
$all = 'selected';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<option value="all" <?=$all??''?>><?=lang("App.settings_field_backup_table_all")?></option>
|
||||
<?php foreach ($tables??[] as $item) : ?>
|
||||
<?php foreach ($select??[] as $id_select) : ?>
|
||||
<?php
|
||||
if ($id_select == $item){
|
||||
$selItem = 'selected';
|
||||
}
|
||||
?>
|
||||
<?php endforeach; ?>
|
||||
<option value="<?=$item?>" <?=$selItem??''?>><?=lang("App.settings_field_backup_table")?> (<?=$item?>)</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-4 mb-3">
|
||||
<label for="backup_time" class="form-label"><?=lang("App.settings_field_backup_time")?></label>
|
||||
<?php $id_select = (isset($obj)) ? $obj['backup_time'] : set_value('backup_time');?>
|
||||
<select name="backup_time" id="backup_time" class="select2 form-control">
|
||||
<?php for ($i = 0; $i <= 23; $i++) : ?>
|
||||
<option value="<?= $i < 10 ? '0'.$i.':00:00':$i.':00:00' ?>" <?= $id_select == "<?= $i < 10 ? '0'.$i.':00:00':$i.':00:00' ?>" ? 'selected' : '' ?>><?= $i < 10 ? '0'.$i.':00':$i.':00' ?></option>
|
||||
<option value="<?= $i < 10 ? '0'.$i.':30:00':$i.':30:00' ?>" <?= $id_select == "<?= $i < 10 ? '0'.$i.':30:00':$i.':30:00' ?>" ? 'selected' : '' ?>><?= $i < 10 ? '0'.$i.':30':$i.':30' ?></option>
|
||||
<?php endfor; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-12 mb-3">
|
||||
<label for="backup_email" class="form-label"><?=lang("App.settings_field_backup_email")?></label>
|
||||
<input
|
||||
type="text"
|
||||
id="backup_email"
|
||||
min="1"
|
||||
name="backup_email"
|
||||
class="form-control"
|
||||
placeholder="<?=lang("App.settings_field_backup_email_ph")?>"
|
||||
value="<?= (isset($obj)) ? $obj['backup_email'] : set_value('backup_email');?>"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-lg-3 mb-3">
|
||||
<div class="small mb-3"><?=lang("App.settings_field_backup_notification_email")?></div>
|
||||
<label class="switch">
|
||||
<input
|
||||
type="checkbox"
|
||||
id="backup_notification_email"
|
||||
name="backup_notification_email"
|
||||
class="switch-input"
|
||||
<?= $obj['backup_notification_email']??false ? 'checked' : ''?>
|
||||
/>
|
||||
<span class="switch-toggle-slider">
|
||||
<span class="switch-on"></span>
|
||||
<span class="switch-off"></span>
|
||||
</span>
|
||||
<span class="switch-label"><?=lang("App.global_activate")?></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-lg-3 mb-3">
|
||||
<div class="small mb-3"><?=lang("App.settings_field_backup_automatic")?></div>
|
||||
<label class="switch">
|
||||
<input
|
||||
type="checkbox"
|
||||
id="backup_automatic"
|
||||
name="backup_automatic"
|
||||
class="switch-input"
|
||||
<?= $obj['backup_automatic']??false ? 'checked' : ''?>
|
||||
/>
|
||||
<span class="switch-toggle-slider">
|
||||
<span class="switch-on"></span>
|
||||
<span class="switch-off"></span>
|
||||
</span>
|
||||
<span class="switch-label"><?=lang("App.global_activate")?></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12 text-right mb-3">
|
||||
<a href="<?=site_url("integration/create_backup/1")?>" class="btn btn-primary mt-2">
|
||||
<i class="fas fa-download"></i> <?=lang("App.settings_label_backup_btn_1")?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Backup Settings -->
|
||||
|
||||
<!-- Logs Settings -->
|
||||
<div class="tab-pane fade show" id="logs" role="tabpanel">
|
||||
<div class="d-flex mb-3 gap-3">
|
||||
<div>
|
||||
<span class="badge bg-label-primary rounded-2 p-2">
|
||||
<i class="ti ti-archive ti-lg"></i>
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
<h4 class="mb-0">
|
||||
<span class="align-middle"><?=lang("App.settings_label_logs_title")?></span>
|
||||
</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="row card-body">
|
||||
<div class="row">
|
||||
<div class="col-lg-12 mb-3">
|
||||
<label class="text-primary"><?=lang("App.settings_label_logs_subtitle_1")?></label>
|
||||
</div>
|
||||
<div class="col-lg-3 mb-3">
|
||||
<div class="small mb-3"><?=lang("App.settings_field_remove_log")?></div>
|
||||
<label class="switch">
|
||||
<input
|
||||
type="checkbox"
|
||||
id="remove_log"
|
||||
name="remove_log"
|
||||
class="switch-input"
|
||||
<?= $obj['remove_log']??false ? 'checked' : ''?>
|
||||
/>
|
||||
<span class="switch-toggle-slider">
|
||||
<span class="switch-on"></span>
|
||||
<span class="switch-off"></span>
|
||||
</span>
|
||||
<span class="switch-label"><?=lang("App.global_activate")?></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-lg-3 mb-3">
|
||||
<label for="remove_log_time" class="form-label"><?=lang("App.settings_field_remove_log_time")?></label>
|
||||
<div class="input-group">
|
||||
<input
|
||||
type="number"
|
||||
id="remove_log_time"
|
||||
min="1"
|
||||
name="remove_log_time"
|
||||
class="form-control"
|
||||
placeholder="<?=lang("App.settings_field_remove_log_time_ph")?>"
|
||||
value="<?= (isset($obj)) ? $obj['remove_log_time'] : set_value('remove_log_time');?>"
|
||||
/>
|
||||
<span class="input-group-text"><?=lang("App.global_days")?></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Logs Settings -->
|
||||
|
||||
<!-- Cron Settings -->
|
||||
<div class="tab-pane fade show" id="cron" role="tabpanel">
|
||||
<div class="d-flex mb-3 gap-3">
|
||||
<div>
|
||||
<span class="badge bg-label-primary rounded-2 p-2">
|
||||
<i class="ti ti-rotate-clockwise ti-lg"></i>
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
<h4 class="mb-0">
|
||||
<span class="align-middle"><?=lang("App.settings_label_cron_title")?></span>
|
||||
</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="row card-body">
|
||||
<div class="row">
|
||||
<div class="col-lg-12 mb-3">
|
||||
<label class="text-primary"><?=lang("App.settings_label_cron_subtitle_1")?></label>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-12 mb-3">
|
||||
<p class="form-label">
|
||||
<b><?=lang("App.settings_label_cron_timer")?></b>
|
||||
<br><?=lang("App.settings_label_cron_timer_time")?>
|
||||
<br><?=getenv('app.baseURL').'/cron'?>
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-lg-12 mb-3">
|
||||
<label class="text-primary"><?=lang("App.settings_label_cron_subtitle_2")?></label>
|
||||
<!-- CSRF token -->
|
||||
<input type="hidden" class="txt_csrfname" name="<?= csrf_token() ?>" value="<?= csrf_hash() ?>" />
|
||||
<!-- Table -->
|
||||
<table id='table-grid' class="table table-striped nowrap" style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?=lang("App.settings_grid_routine")?></th>
|
||||
<th><?=lang("App.settings_group_grid_error")?></th>
|
||||
<th><?=lang("App.settings_group_grid_created_at")?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Cron Settings -->
|
||||
*/ ?>
|
||||
|
||||
</div>
|
||||
<div class="tab-content pt-4">
|
||||
<button type="submit" class="btn btn-primary float-start me-sm-3 me-1">
|
||||
<?= lang("App.global_save") ?>
|
||||
</button>
|
||||
<a href="<?= site_url('/') ?>" class="btn btn-secondary">
|
||||
<?= lang("App.global_come_back") ?>
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /System Settings -->
|
||||
|
||||
</div>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,182 +0,0 @@
|
||||
<!--Style-->
|
||||
<link href="<?=site_url("themes/focus2/vendor/summernote/summernote.css")?>" rel="stylesheet">
|
||||
<!--Content Body-->
|
||||
<div class="content-body">
|
||||
<div class="container-fluid">
|
||||
<div class="row page-titles mx-0">
|
||||
<div class="col-sm-6 p-md-0">
|
||||
<div class="welcome-text">
|
||||
<h4><i class="<?= $title['icon']??'' ?>"></i> <?= $title['module']??'' ?></h4>
|
||||
<span class="ml-1"><?= $title['page']??'' ?></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 p-md-0 justify-content-sm-end mt-2 mt-sm-0 d-flex">
|
||||
<ol class="breadcrumb">
|
||||
<?php foreach ($breadcrumb??[] as $item) : ?>
|
||||
<?php if (!$item['active']) : ?>
|
||||
<li class="breadcrumb-item"><a href="<?= site_url($item['route']) ?>"><?= $item['title'] ?></a></li>
|
||||
<?php else : ?>
|
||||
<li class="breadcrumb-item active"><?= $item['title'] ?></li>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<form class="form" action="<?=site_url("settings/template_store")?>" method="post">
|
||||
<?= csrf_field() ?>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<div class="row mx-0" style="width: 100%;">
|
||||
<div class="col-sm-6 p-md-0">
|
||||
<h4 class="card-title"><?=lang("App.template_subtitle_email")?></h4>
|
||||
</div>
|
||||
<div class="col-sm-6 p-md-0 justify-content-sm-end mt-2 mt-sm-0 d-flex">
|
||||
<button type="button" class="btn btn-sm btn-secondary" data-toggle="modal" data-target="#tagModalCenter" title="<?=lang("App.template_label_tag")?>">
|
||||
<i class="fas fa-tags"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="default-tab">
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<?php $count=1; ?>
|
||||
<?php foreach ($template??[] as $item) : ?>
|
||||
<?php if ($item['type']=='email') : ?>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link <?=$count==1?'active':''?>" data-toggle="tab" href="#email_<?=$item['id_template']?>"><?=lang("App.".$item['name'])?></a>
|
||||
</li>
|
||||
<?php $count++; ?>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<?php $count=1; ?>
|
||||
<?php foreach ($template??[] as $item) : ?>
|
||||
<?php if ($item['type']=='email') : ?>
|
||||
<div class="tab-pane fade show <?=$count==1?'active':''?>" id="email_<?=$item['id_template']?>" role="tabpanel">
|
||||
<div class="row mt-4">
|
||||
<div class="col-lg-12">
|
||||
<div class="form-group">
|
||||
<label class="text-dark"><?=lang("App.template_label_title")?></label>
|
||||
<input type="text" id="title_email_<?=$item['id_template']?>" name="title_email_<?=$item['id_template']?>" class="form-control" placeholder="<?=lang("App.template_label_title_ph")?>" value="<?=$item['subject']?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-12">
|
||||
<div class="form-group">
|
||||
<label class="text-dark"><?=lang("App.template_label_message")?></label>
|
||||
<textarea class="form-control" id="body_email_<?=$item['id_template']?>" name="body_email_<?=$item['id_template']?>" rows="3"><?=$item['body']?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php $count++; ?>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="form-actions">
|
||||
<a href="<?= site_url($btn_return['route']??'#') ?>" class="<?= $btn_return['class']??''?>">
|
||||
<i class="<?= $btn_return['icon']??'' ?>"></i> <?= $btn_return['title']??'' ?>
|
||||
</a>
|
||||
<button type="submit" class="<?= $btn_submit['class']??''?>">
|
||||
<i class="<?= $btn_submit['icon']??'' ?>"></i> <?= $btn_submit['title']??'' ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="tagModalCenter">
|
||||
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"><?=lang("App.template_modal_title")?></h5>
|
||||
<button type="button" class="close" data-dismiss="modal"><span>×</span></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p><?=lang("App.template_modal_subtitle")?></p>
|
||||
<?php foreach (keywordEmail()??[] as $item) : ?>
|
||||
<button type="button" class="btn btn-primary btn-sm mt-1 mr-1" onclick="copy('[<?=$item?>]')">[<?=$item?>]</button>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-dark" data-dismiss="modal"><?=lang("App.template_modal_btn_1")?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Required vendors -->
|
||||
<script src="<?=site_url("themes/focus2/vendor/global/global.min.js")?>"></script>
|
||||
<script src="<?=site_url("themes/focus2/js/quixnav-init.js")?>"></script>
|
||||
<script src="<?=site_url("themes/focus2/js/custom.min.js")?>"></script>
|
||||
<script src="<?=site_url("themes/focus2/vendor/select2/js/select2.full.min.js")?>"></script>
|
||||
<!-- Summernote -->
|
||||
<script src="<?=site_url("themes/focus2/vendor/summernote/summernote.min.js")?>"></script>
|
||||
<!-- Alert -->
|
||||
<script src="<?=site_url("themes/focus2/vendor/sweetalert2/dist/sweetalert2.min.js")?>"></script>
|
||||
<script src="<?=site_url("themes/focus2/vendor/toastr/js/toastr.min.js")?>"></script>
|
||||
<!-- Form -->
|
||||
<script>
|
||||
"use strict";
|
||||
$(document).ready(function () {
|
||||
$('#first_name').focus();
|
||||
$("#email_gateway").select2();
|
||||
$("#email_cert").select2();
|
||||
|
||||
let configSummerNote = {
|
||||
height: 150, // set editor height
|
||||
minHeight: null, // set minimum height of editor
|
||||
maxHeight: null, // set maximum height of editor
|
||||
focus: true, // set focus to editable area after initializing summernote
|
||||
toolbar: [
|
||||
['style', ['style']],
|
||||
['font', ['bold', 'italic', 'underline', 'clear']],
|
||||
['fontname', ['fontname']],
|
||||
['color', ['color']],
|
||||
['para', ['ul', 'ol', 'paragraph']],
|
||||
['height', ['height']],
|
||||
['table', ['table']],
|
||||
['insert', ['link', 'picture', 'hr']],
|
||||
['view', ['codeview']]
|
||||
]
|
||||
}
|
||||
<?php foreach ($template??[] as $item) : ?>
|
||||
$("#body_<?=$item['type']?>_<?=$item['id_template']?>").summernote(configSummerNote);
|
||||
<?php endforeach; ?>
|
||||
});
|
||||
<?php foreach ($template??[] as $item) : ?>
|
||||
$("#body_<?=$item['type']?>_<?=$item['id_template']?>").on("summernote.enter", function(we, e) {
|
||||
$(this).summernote("pasteHTML", "<br><br>");
|
||||
e.preventDefault();
|
||||
});
|
||||
<?php endforeach; ?>
|
||||
function copy(copyText) {
|
||||
navigator.clipboard.writeText(copyText);
|
||||
toastr.success('<?= lang("App.template_modal_copy_msg") ?>','<?= lang("App.template_modal_copy") ?>!',{positionClass: 'toast-top-center'})
|
||||
$('#tagModalCenter').modal('hide')
|
||||
}
|
||||
</script>
|
||||
<?= sweetAlert() ?>
|
||||
<?= toastAlert() ?>
|
||||
@ -0,0 +1,32 @@
|
||||
<?= $this->include("themes/_commonPartialsBs/select2bs5") ?>
|
||||
<?= $this->include("themes/_commonPartialsBs/sweetalert") ?>
|
||||
<?= $this->extend('themes/backend/vuexy/main/defaultlayout') ?>
|
||||
<?= $this->section("content") ?>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card card-info">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><?= $boxTitle ?? $pageTitle ?></h3>
|
||||
</div><!--//.card-header -->
|
||||
|
||||
<div class="card-body">
|
||||
<?= view("themes/_commonPartialsBs/_alertBoxes") ?>
|
||||
<?= !empty($validation->getErrors()) ? $validation->listErrors("bootstrap_style") : "" ?>
|
||||
<?= view("themes/backend/vuexy/form/settings/_settingsFormItems") ?>
|
||||
</div><!-- /.card-body -->
|
||||
|
||||
<div class="card-footer">
|
||||
|
||||
</div><!-- /.card-footer -->
|
||||
|
||||
</div><!-- //.card -->
|
||||
</div><!--//.col -->
|
||||
</div><!--//.row -->
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
|
||||
<?= $this->section("additionalInlineJs") ?>
|
||||
|
||||
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
0
getMethod(
Normal file
0
getMethod(
Normal file
Reference in New Issue
Block a user