mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Merge branch 'main' into 'fix/arreglar_resumen_cliente_vs_admin'
Main See merge request jjimenez/safekat!676
This commit is contained in:
@ -95,6 +95,17 @@ $routes->group('configuracion', ['namespace' => 'App\Controllers\Configuracion']
|
||||
$routes->post('datatable', 'Ubicaciones::datatable', ['as' => 'ubicacionesDT']);
|
||||
});
|
||||
|
||||
/* Permisos y roles */
|
||||
$routes->group('group', ['namespace' => 'App\Controllers\Configuracion'], function ($routes) {
|
||||
$routes->get('', 'Group::index', ['as' => 'userGroupList']);
|
||||
$routes->get('index', 'Group::index', ['as' => 'groupIndex']);
|
||||
$routes->post('edit/(:num)', 'Group::edit/$1', ['as' => 'updateGroup']);
|
||||
$routes->get('edit/(:num)', 'Group::edit/$1', ['as' => 'editGroup']);
|
||||
$routes->get('delete/(:num)', 'Group::delete/$1', ['as' => 'deleteGroup']);
|
||||
$routes->get('add', 'Group::add', ['as' => 'newGroup']);
|
||||
$routes->post('add', 'Group::add', ['as' => 'createGroup']);
|
||||
});
|
||||
|
||||
/* Series Factura */
|
||||
$routes->group('series-facturas', ['namespace' => 'App\Controllers\Configuracion'], function ($routes) {
|
||||
$routes->get('', 'SeriesFacturas::index', ['as' => 'seriesFacturasList']);
|
||||
@ -151,19 +162,10 @@ $routes->group('users', ['namespace' => 'App\Controllers\Configuracion'], functi
|
||||
$routes->post('datatable', 'Users::datatable', ['as' => 'datatableOfUsers']);
|
||||
$routes->get('getMenuComerciales', 'Users::getMenuComerciales', ['as' => 'menuItemsComerciales']);
|
||||
});
|
||||
|
||||
$routes->resource('users', ['namespace' => 'App\Controllers\Configuracion', 'controller' => 'Users', 'except' => 'show,new,create,update']);
|
||||
|
||||
|
||||
$routes->group('group', ['namespace' => 'App\Controllers\Configuracion'], function ($routes) {
|
||||
$routes->get('', 'Group::index', ['as' => 'userGroupList']);
|
||||
$routes->get('index', 'Group::index', ['as' => 'groupIndex']);
|
||||
$routes->post('edit/(:num)', 'Group::edit/$1', ['as' => 'updateGroup']);
|
||||
$routes->get('edit/(:num)', 'Group::edit/$1', ['as' => 'editGroup']);
|
||||
$routes->get('delete/(:num)', 'Group::delete/$1', ['as' => 'deleteGroup']);
|
||||
$routes->get('add', 'Group::add', ['as' => 'newGroup']);
|
||||
$routes->post('add', 'Group::add', ['as' => 'createGroup']);
|
||||
});
|
||||
|
||||
$routes->group('tarifapreimpresion', ['namespace' => 'App\Controllers\Tarifas'], function ($routes) {
|
||||
$routes->get('', 'Tarifapreimpresion::index', ['as' => 'tarifapreimpresionList']);
|
||||
$routes->get('index', 'Tarifapreimpresion::index', ['as' => 'tarifapreimpresionIndex']);
|
||||
@ -746,9 +748,9 @@ $routes->group('presupuestotiradasalternativas', ['namespace' => 'App\Controller
|
||||
|
||||
$routes->group('pedidos', ['namespace' => 'App\Controllers\Pedidos'], function ($routes) {
|
||||
$routes->get('list', 'Pedido::todos', ['as' => 'listaPedidos']);
|
||||
$routes->get('listActivos', 'Pedido::activos', ['as' => 'listaPedidosActivos']);
|
||||
$routes->get('listFinalizados', 'Pedido::finalizados', ['as' => 'listaFinalizados']);
|
||||
$routes->get('listCancelados', 'Pedido::cancelados', ['as' => 'listaCancelados']);
|
||||
$routes->get('activos', 'Pedido::activos', ['as' => 'listaPedidosActivos']);
|
||||
$routes->get('finalizados', 'Pedido::finalizados', ['as' => 'listaPedidosFinalizados']);
|
||||
$routes->get('cancelados', 'Pedido::cancelados', ['as' => 'listaPedidosCancelados']);
|
||||
$routes->post('datatable', 'Pedido::datatable', ['as' => 'dataTableOfPedidos']);
|
||||
$routes->get('add', 'Pedido::add', ['as' => 'nuevoPedido']);
|
||||
$routes->post('add', 'Pedido::add', ['as' => 'crearPedido']);
|
||||
@ -761,6 +763,7 @@ $routes->group('pedidos', ['namespace' => 'App\Controllers\Pedidos'], function (
|
||||
$routes->post('produccion/(:num)', 'Pedido::to_produccion/$1', ['as' => 'toProduccion']);
|
||||
$routes->get('pedidosCliente', 'Pedido::tablaClienteForm');
|
||||
$routes->get('getSumCliente/(:num)', 'Pedido::obtenerTotalPedidosCliente/$1');
|
||||
$routes->get('validacion', 'Pedido::validacion', ['as' => 'validacionView']);
|
||||
});
|
||||
$routes->resource('pedidos', ['namespace' => 'App\Controllers\Pedidos', 'controller' => 'Pedido', 'except' => 'show,new,create,update']);
|
||||
|
||||
|
||||
@ -1,507 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers;
|
||||
|
||||
use App\Models\CronTabModel;
|
||||
use App\Models\NotificationModel;
|
||||
use App\Models\Usuarios\UserModel;
|
||||
use App\Models\Usuarios\GroupModel;
|
||||
use App\Models\Usuarios\GroupsUsersModel;
|
||||
use App\Models\ActivityModel;
|
||||
use CodeIgniter\RESTful\ResourceController;
|
||||
|
||||
class Ajax extends ResourceController
|
||||
{
|
||||
private $user_model;
|
||||
private $group_model;
|
||||
private $group_user_model;
|
||||
private $activity_model;
|
||||
private $crontab_model;
|
||||
private $notification_model;
|
||||
private $id_user;
|
||||
private $token_user;
|
||||
|
||||
function __construct()
|
||||
{
|
||||
$this->user_model = new UserModel();
|
||||
$this->group_model = new GroupModel();
|
||||
$this->group_user_model = new GroupsUsersModel();
|
||||
$this->activity_model = new ActivityModel();
|
||||
$this->crontab_model = new CronTabModel();
|
||||
$this->notification_model = new NotificationModel();
|
||||
$this->id_user = session()->get('id_user');
|
||||
$this->token_user = session()->get('token');
|
||||
$language = \Config\Services::language();
|
||||
$language->setLocale(session()->lang);
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
return redirect()->to('/home');
|
||||
}
|
||||
|
||||
public function getUsers(){
|
||||
$postData = service('request')->getVar();
|
||||
if($postData != null && isset($postData->data)){
|
||||
$dtpostData = $postData->data;
|
||||
|
||||
//Read value
|
||||
$draw = $dtpostData->draw;
|
||||
$start = $dtpostData->start;
|
||||
$rowperpage = $dtpostData->length; // Rows display per page
|
||||
$columnIndex = $dtpostData->order[0]->column; // Column index
|
||||
$columnName = $dtpostData->columns[$columnIndex]->data; // Column name
|
||||
$columnSortOrder = $dtpostData->order[0]->dir; // asc or desc
|
||||
$searchValue = $dtpostData->search->value; // Search value
|
||||
|
||||
//Total number of records without filtering
|
||||
$totalRecords = $this->user_model->select('id_user')
|
||||
//->join('auth_groups','auth_groups.token = auth_user.group')
|
||||
->countAllResults();
|
||||
|
||||
//Total number of records with filtering
|
||||
$totalRecordwithFilter = $this->user_model->select('id_user')
|
||||
//->join('auth_groups','auth_groups.token = auth_user.group')
|
||||
->orLike('first_name', $searchValue)
|
||||
->orLike('email', $searchValue)
|
||||
->countAllResults();
|
||||
|
||||
//Fetch records
|
||||
//$records = $this->user_model->select('auth_user.*,auth_groups.title')
|
||||
$records = $this->user_model->select('auth_user.*')
|
||||
//->join('auth_groups','auth_groups.token = auth_user.group')
|
||||
->orLike('first_name', $searchValue)
|
||||
->orLike('email', $searchValue)
|
||||
->orderBy($columnName,$columnSortOrder)
|
||||
->findAll($rowperpage, $start);
|
||||
|
||||
|
||||
|
||||
//Format records
|
||||
foreach ($records as $key => $value){
|
||||
if($records[$key]['email_confirmed'] == 1){
|
||||
$records[$key]['email'] = $records[$key]['email'].' '.'<span class="text-success"><i class="fas fa-check-circle"></i></span>';
|
||||
}
|
||||
$editLink = site_url('usuarios/user/edit/').$records[$key]['token'];
|
||||
$records[$key]['options'] = ''.
|
||||
'<div class="btn-group mr-1 mb-1" xmlns="http://www.w3.org/1999/html">
|
||||
<button type="button" class="btn btn-primary btn-block dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
'.lang("App.user_grid_options").'
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="'.$editLink.'"><i class="fas fa-edit"></i> '.lang("App.user_btn_edit").'</a>
|
||||
<button type="button" class="dropdown-item" onclick="delete_user(\''.$records[$key]['token'].'\');"><i class="fas fa-trash"></i> '.lang("App.user_btn_delete").'</button>
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
}
|
||||
|
||||
//Data records
|
||||
$data = array();
|
||||
foreach($records as $record ){
|
||||
|
||||
$groups_token = $this->group_user_model->select('token_group')
|
||||
->where('token_user',$record['token'])
|
||||
->findAll();
|
||||
|
||||
$groups_names = [];
|
||||
foreach($groups_token as $g_t){
|
||||
$title = $this->group_model->select('title')
|
||||
->where('token',$g_t)
|
||||
->first()['title'];
|
||||
array_push($groups_names, $title);
|
||||
|
||||
}
|
||||
|
||||
$data[] = array(
|
||||
"first_name"=>$record['first_name'],
|
||||
"email"=>$record['email'],
|
||||
|
||||
"group"=>$groups_names,//JJO$record['title'],
|
||||
|
||||
"mobile"=>$record['mobile'],
|
||||
"last_access"=>$record['last_access'],
|
||||
"last_ip"=>$record['last_ip'],
|
||||
"created_at"=>$record['created_at'],
|
||||
"options"=>$record['options']
|
||||
);
|
||||
}
|
||||
|
||||
//Response
|
||||
$response = array(
|
||||
"draw" => intval($draw),
|
||||
"iTotalRecords" => $totalRecords,
|
||||
"iTotalDisplayRecords" => $totalRecordwithFilter,
|
||||
"aaData" => $data,
|
||||
"token" => csrf_hash() // New token hash
|
||||
);
|
||||
return $this->response->setJSON($response);
|
||||
}else{
|
||||
return $this->response->setJSON(["error"=>true]);
|
||||
}
|
||||
}
|
||||
|
||||
public function getGroups(){
|
||||
$postData = service('request')->getVar();
|
||||
if($postData != null && isset($postData->data)){
|
||||
$dtpostData = $postData->data;
|
||||
|
||||
//Read value
|
||||
$draw = $dtpostData->draw;
|
||||
$start = $dtpostData->start;
|
||||
$rowperpage = $dtpostData->length; // Rows display per page
|
||||
$columnIndex = $dtpostData->order[0]->column; // Column index
|
||||
$columnName = $dtpostData->columns[$columnIndex]->data; // Column name
|
||||
$columnSortOrder = $dtpostData->order[0]->dir; // asc or desc
|
||||
$searchValue = $dtpostData->search->value; // Search value
|
||||
|
||||
//Total number of records without filtering
|
||||
$totalRecords = $this->group_model->select('id_group')
|
||||
->countAllResults();
|
||||
|
||||
//Total number of records with filtering
|
||||
$totalRecordwithFilter = $this->group_model->select('id_group')
|
||||
->orLike('title', $searchValue)
|
||||
->countAllResults();
|
||||
|
||||
//Fetch records
|
||||
$records = $this->group_model->select('*')
|
||||
->orLike('title', $searchValue)
|
||||
->orderBy($columnName,$columnSortOrder)
|
||||
->findAll($rowperpage, $start);
|
||||
|
||||
//Format records
|
||||
foreach ($records as $key => $value){
|
||||
$editLink = site_url('usuarios/group/edit/').$records[$key]['token'];
|
||||
$records[$key]['options'] = ''.
|
||||
'<div class="btn-group mr-1 mb-1" xmlns="http://www.w3.org/1999/html">
|
||||
<button type="button" class="btn btn-primary btn-block dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
'.lang("App.group_grid_options").'
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="'.$editLink.'"><i class="fas fa-edit"></i> '.lang("App.group_btn_edit").'</a>
|
||||
<button type="button" class="dropdown-item" onclick="delete_group(\''.$records[$key]['token'].'\');"><i class="fas fa-trash"></i> '.lang("App.group_btn_delete").'</button>
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
}
|
||||
|
||||
//Data records
|
||||
$data = array();
|
||||
foreach($records as $record ){
|
||||
$data[] = array(
|
||||
"title"=>$record['title'],
|
||||
"dashboard"=>$record['dashboard'],
|
||||
"created_at"=>$record['created_at'],
|
||||
"updated_at"=>$record['updated_at'],
|
||||
"options"=>$record['options']
|
||||
);
|
||||
}
|
||||
|
||||
//Response
|
||||
$response = array(
|
||||
"draw" => intval($draw),
|
||||
"iTotalRecords" => $totalRecords,
|
||||
"iTotalDisplayRecords" => $totalRecordwithFilter,
|
||||
"aaData" => $data,
|
||||
"token" => csrf_hash() // New token hash
|
||||
);
|
||||
return $this->response->setJSON($response);
|
||||
}else{
|
||||
return $this->response->setJSON(["error"=>true]);
|
||||
}
|
||||
}
|
||||
|
||||
public function getActivities($all=""){
|
||||
$postData = service('request')->getVar();
|
||||
if($postData != null && isset($postData->data)){
|
||||
$dtpostData = $postData->data;
|
||||
|
||||
//Read value
|
||||
$draw = $dtpostData->draw;
|
||||
$start = $dtpostData->start;
|
||||
$rowperpage = $dtpostData->length; // Rows display per page
|
||||
$columnIndex = $dtpostData->order[0]->column; // Column index
|
||||
$columnName = $dtpostData->columns[$columnIndex]->data; // Column name
|
||||
$columnSortOrder = $dtpostData->order[0]->dir; // asc or desc
|
||||
$searchValue = $dtpostData->search->value; // Search value
|
||||
|
||||
$session = session();
|
||||
|
||||
//Total number of records without filtering
|
||||
if($session->get('dashboard')=='admin' && !empty($all)){
|
||||
$totalRecords = $this->activity_model->select('id_activity')
|
||||
->join('auth_user','auth_user.token = auth_activity.user')
|
||||
->countAllResults();
|
||||
}else{
|
||||
$totalRecords = $this->activity_model->select('id_activity')
|
||||
->join('auth_user','auth_user.token = auth_activity.user')
|
||||
->where('auth_activity.user',$session->get('token'))
|
||||
->countAllResults();
|
||||
}
|
||||
|
||||
//Total number of records with filtering
|
||||
if($session->get('dashboard')=='admin' && !empty($all)){
|
||||
$totalRecordwithFilter = $this->activity_model->select('id_activity')
|
||||
->join('auth_user','auth_user.token = auth_activity.user')
|
||||
->orLike('first_name', $searchValue)
|
||||
->countAllResults();
|
||||
}else{
|
||||
$totalRecordwithFilter = $this->activity_model->select('id_activity')
|
||||
->join('auth_user','auth_user.token = auth_activity.user')
|
||||
->orLike('first_name', $searchValue)
|
||||
->where('auth_activity.user',$session->get('token'))
|
||||
->countAllResults();
|
||||
}
|
||||
|
||||
//Fetch records
|
||||
if($session->get('dashboard')=='admin' && !empty($all)){
|
||||
$records = $this->activity_model->select('auth_activity.*,concat(first_name, " (",email, ")") AS name')
|
||||
->join('auth_user','auth_user.token = auth_activity.user')
|
||||
->orLike('first_name', $searchValue)
|
||||
->orderBy($columnName,$columnSortOrder)
|
||||
->findAll($rowperpage, $start);
|
||||
}else{
|
||||
$records = $this->activity_model->select('auth_activity.*,concat(first_name, " (",email, ")") AS name')
|
||||
->join('auth_user','auth_user.token = auth_activity.user')
|
||||
->orLike('first_name', $searchValue)
|
||||
->where('auth_activity.user',$session->get('token'))
|
||||
->orderBy($columnName,$columnSortOrder)
|
||||
->findAll($rowperpage, $start);
|
||||
}
|
||||
|
||||
|
||||
//Data records
|
||||
$data = array();
|
||||
foreach($records as $record ){
|
||||
$data[] = array(
|
||||
"name"=>$record['name'],
|
||||
"level"=>$record['level'],
|
||||
"event"=>$record['event'],
|
||||
"ip"=>$record['ip'],
|
||||
"os"=>$record['os'],
|
||||
"browser"=>$record['browser'],
|
||||
"created_at"=>$record['created_at']
|
||||
);
|
||||
}
|
||||
|
||||
//Response
|
||||
$response = array(
|
||||
"draw" => intval($draw),
|
||||
"iTotalRecords" => $totalRecords,
|
||||
"iTotalDisplayRecords" => $totalRecordwithFilter,
|
||||
"aaData" => $data,
|
||||
"token" => csrf_hash() // New token hash
|
||||
);
|
||||
return $this->response->setJSON($response);
|
||||
}else{
|
||||
return $this->response->setJSON(["error"=>true]);
|
||||
}
|
||||
}
|
||||
|
||||
public function getCronHistory(){
|
||||
$postData = service('request')->getVar();
|
||||
if($postData != null && isset($postData->data)){
|
||||
$dtpostData = $postData->data;
|
||||
|
||||
//Read value
|
||||
$draw = $dtpostData->draw;
|
||||
$start = $dtpostData->start;
|
||||
$rowperpage = $dtpostData->length; // Rows display per page
|
||||
$columnIndex = $dtpostData->order[0]->column; // Column index
|
||||
$columnName = $dtpostData->columns[$columnIndex]->data; // Column name
|
||||
$columnSortOrder = $dtpostData->order[0]->dir; // asc or desc
|
||||
$searchValue = $dtpostData->search->value; // Search value
|
||||
|
||||
//Total number of records without filtering
|
||||
$totalRecords = $this->crontab_model->select('id_crontab')
|
||||
->countAllResults();
|
||||
|
||||
//Total number of records with filtering
|
||||
$totalRecordwithFilter = $this->crontab_model->select('id_crontab')
|
||||
->orLike('routine', $searchValue)
|
||||
->orLike('error', $searchValue)
|
||||
->countAllResults();
|
||||
|
||||
//Fetch records
|
||||
$records = $this->crontab_model->select('*')
|
||||
->orLike('routine', $searchValue)
|
||||
->orLike('error', $searchValue)
|
||||
->orderBy($columnName,$columnSortOrder)
|
||||
->findAll($rowperpage, $start);
|
||||
|
||||
//Data records
|
||||
$data = array();
|
||||
foreach($records as $record ){
|
||||
$data[] = array(
|
||||
"routine"=>$record['routine'],
|
||||
"error"=>$record['error'],
|
||||
"created_at"=>$record['created_at']
|
||||
);
|
||||
}
|
||||
|
||||
//Response
|
||||
$response = array(
|
||||
"draw" => intval($draw),
|
||||
"iTotalRecords" => $totalRecords,
|
||||
"iTotalDisplayRecords" => $totalRecordwithFilter,
|
||||
"aaData" => $data,
|
||||
"token" => csrf_hash() // New token hash
|
||||
);
|
||||
return $this->response->setJSON($response);
|
||||
}else{
|
||||
return $this->response->setJSON(["error"=>true]);
|
||||
}
|
||||
}
|
||||
|
||||
public function getNotification(){
|
||||
$postData = service('request')->getVar();
|
||||
if($postData != null && isset($postData->data)){
|
||||
$dtpostData = $postData->data;
|
||||
|
||||
//Read value
|
||||
$draw = $dtpostData->draw;
|
||||
$start = $dtpostData->start;
|
||||
$rowperpage = $dtpostData->length; // Rows display per page
|
||||
$columnIndex = $dtpostData->order[0]->column; // Column index
|
||||
$columnName = $dtpostData->columns[$columnIndex]->data; // Column name
|
||||
$columnSortOrder = $dtpostData->order[0]->dir; // asc or desc
|
||||
$searchValue = $dtpostData->search->value; // Search value
|
||||
|
||||
//Total number of records without filtering
|
||||
$totalRecords = $this->notification_model->select('id_notification')
|
||||
->join('user AS sender','notification.user_sender = sender.token','left')
|
||||
->join('user AS recipient','notification.user_recipient = recipient.token','left')
|
||||
->countAllResults();
|
||||
|
||||
//Total number of records with filtering
|
||||
$totalRecordwithFilter = $this->notification_model->select('id_notification')
|
||||
->join('user AS sender','notification.user_sender = sender.token','left')
|
||||
->join('user AS recipient','notification.user_recipient = recipient.token','left')
|
||||
->orLike('title', $searchValue)
|
||||
->orLike('sender.first_name', $searchValue)
|
||||
->orLike('recipient.first_name', $searchValue)
|
||||
->countAllResults();
|
||||
|
||||
//Fetch records
|
||||
$records = $this->notification_model->select('notification.token, sender.first_name AS sender, recipient.first_name AS recipient, notification.title, is_send_email, is_read, notification.created_at')
|
||||
->join('user AS sender','notification.user_sender = sender.token','left')
|
||||
->join('user AS recipient','notification.user_recipient = recipient.token','left')
|
||||
->orLike('title', $searchValue)
|
||||
->orLike('sender.first_name', $searchValue)
|
||||
->orLike('recipient.first_name', $searchValue)
|
||||
->orderBy($columnName,$columnSortOrder)
|
||||
->findAll($rowperpage, $start);
|
||||
|
||||
//Format records
|
||||
foreach ($records as $key => $value){
|
||||
$records[$key]['options'] = ''.
|
||||
'<div class="btn-group mr-1 mb-1" xmlns="http://www.w3.org/1999/html">
|
||||
<button type="button" class="btn btn-primary btn-block dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
'.lang("App.notification_grid_options").'
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<button type="button" class="dropdown-item" onclick="delete_this(\''.$records[$key]['token'].'\');"><i class="fas fa-trash"></i> '.lang("App.user_btn_delete").'</button>
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
}
|
||||
|
||||
//Data records
|
||||
$data = array();
|
||||
foreach($records as $record ){
|
||||
$data[] = array(
|
||||
"sender"=>$record['sender'],
|
||||
"recipient"=>$record['recipient'],
|
||||
"title"=>$record['title'],
|
||||
"is_send_email"=>$record['is_send_email'],
|
||||
"is_read"=>$record['is_read'],
|
||||
"created_at"=>$record['created_at'],
|
||||
"options"=>$record['options']
|
||||
);
|
||||
}
|
||||
|
||||
//Response
|
||||
$response = array(
|
||||
"draw" => intval($draw),
|
||||
"iTotalRecords" => $totalRecords,
|
||||
"iTotalDisplayRecords" => $totalRecordwithFilter,
|
||||
"aaData" => $data,
|
||||
"token" => csrf_hash() // New token hash
|
||||
);
|
||||
return $this->response->setJSON($response);
|
||||
}else{
|
||||
return $this->response->setJSON(["error"=>true]);
|
||||
}
|
||||
}
|
||||
|
||||
public function getMyNotification(){
|
||||
$postData = service('request')->getVar();
|
||||
if($postData != null && isset($postData->data)){
|
||||
$dtpostData = $postData->data;
|
||||
|
||||
//Read value
|
||||
$draw = $dtpostData->draw;
|
||||
$start = $dtpostData->start;
|
||||
$rowperpage = $dtpostData->length; // Rows display per page
|
||||
$columnIndex = $dtpostData->order[0]->column; // Column index
|
||||
$columnName = $dtpostData->columns[$columnIndex]->data; // Column name
|
||||
$columnSortOrder = $dtpostData->order[0]->dir; // asc or desc
|
||||
$searchValue = $dtpostData->search->value; // Search value
|
||||
|
||||
//Total number of records without filtering
|
||||
$totalRecords = $this->notification_model->select('id_notification')
|
||||
->join('user AS sender','notification.user_sender = sender.token','left')
|
||||
->join('user AS recipient','notification.user_recipient = recipient.token','left')
|
||||
->where('user_recipient',$this->token_user)
|
||||
->countAllResults();
|
||||
|
||||
//Total number of records with filtering
|
||||
$totalRecordwithFilter = $this->notification_model->select('id_notification')
|
||||
->join('user AS sender','notification.user_sender = sender.token','left')
|
||||
->join('user AS recipient','notification.user_recipient = recipient.token','left')
|
||||
->orLike('title', $searchValue)
|
||||
->where('user_recipient',$this->token_user)
|
||||
->countAllResults();
|
||||
|
||||
//Fetch records
|
||||
$records = $this->notification_model->select('notification.token, sender.first_name AS sender, recipient.first_name AS recipient, notification.title, is_read, notification.created_at')
|
||||
->join('user AS sender','notification.user_sender = sender.token','left')
|
||||
->join('user AS recipient','notification.user_recipient = recipient.token','left')
|
||||
->orLike('title', $searchValue)
|
||||
->where('user_recipient',$this->token_user)
|
||||
->orderBy($columnName,$columnSortOrder)
|
||||
->findAll($rowperpage, $start);
|
||||
|
||||
//Format records
|
||||
foreach ($records as $key => $value){
|
||||
$records[$key]['options'] = '<a class="btn btn-primary" href="/my/notification_view/'.$records[$key]['token'].'"><i class="fas fa-eye"></i> '.lang("App.notification_view_btn").'</a>';
|
||||
}
|
||||
|
||||
//Data records
|
||||
$data = array();
|
||||
foreach($records as $record ){
|
||||
$data[] = array(
|
||||
"sender"=>$record['sender'],
|
||||
"recipient"=>$record['recipient'],
|
||||
"title"=>$record['title'],
|
||||
"created_at"=>$record['created_at'],
|
||||
"is_read"=>$record['is_read'],
|
||||
"options"=>$record['options']
|
||||
);
|
||||
}
|
||||
|
||||
//Response
|
||||
$response = array(
|
||||
"draw" => intval($draw),
|
||||
"iTotalRecords" => $totalRecords,
|
||||
"iTotalDisplayRecords" => $totalRecordwithFilter,
|
||||
"aaData" => $data,
|
||||
"token" => csrf_hash() // New token hash
|
||||
);
|
||||
return $this->response->setJSON($response);
|
||||
}else{
|
||||
return $this->response->setJSON(["error"=>true]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -28,7 +28,7 @@ class Group extends \App\Controllers\GoBaseController
|
||||
// Breadcrumbs
|
||||
$this->viewData['breadcrumb'] = [
|
||||
['title' => "Home", 'route' => "javascript:void(0);", 'active' => false],
|
||||
['title' => lang("App.menu_permission_group"), 'route' => site_url("configuracion/group"), 'active' => true]
|
||||
['title' => lang("App.menu_permission_group"), 'route' => route_to("userGroupList"), 'active' => true]
|
||||
];
|
||||
|
||||
parent::initController($request, $response, $logger);
|
||||
|
||||
@ -50,7 +50,7 @@ class Users extends \App\Controllers\GoBaseController
|
||||
// Breadcrumbs (IMN)
|
||||
$this->viewData['breadcrumb'] = [
|
||||
['title' => lang("App.menu_configuration"), 'route' => "javascript:void(0);", 'active' => false],
|
||||
['title' => lang("App.menu_users"), 'route' => site_url('configuracion/users'), 'active' => true]
|
||||
['title' => lang("App.menu_users"), 'route' => route_to('userList'), 'active' => true]
|
||||
];
|
||||
|
||||
parent::initController($request, $response, $logger);
|
||||
|
||||
@ -1,26 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers;
|
||||
|
||||
use App\Models\NotificationModel;
|
||||
use App\Models\Usuarios\UserModel;
|
||||
|
||||
class My extends BaseController
|
||||
{
|
||||
|
||||
private $user_model;
|
||||
private $notification_model;
|
||||
|
||||
function __construct()
|
||||
{
|
||||
$this->user_model = new UserModel();
|
||||
$this->notification_model = new NotificationModel();
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
return redirect()->to('profile');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -26,6 +26,9 @@ return [
|
||||
|
||||
'toprodPermission' => 'Pasar a Producción',
|
||||
|
||||
'otsPermission' => 'Órdenes de trabajo',
|
||||
'planningsPermission' => 'Plannings',
|
||||
|
||||
// System sections
|
||||
'clientesSection' => 'Clientes',
|
||||
'plantillaTarifaSection' => 'Plantilla de tarifas',
|
||||
@ -63,6 +66,7 @@ return [
|
||||
'albaranesPermission' => 'Albaranes',
|
||||
'vencimientosPermission' => 'Vencimientos',
|
||||
"ticketsSection" => "Tickets",
|
||||
'produccionSection' => 'Producción',
|
||||
|
||||
'validation' => [
|
||||
'id' => [
|
||||
|
||||
@ -1,106 +0,0 @@
|
||||
<!--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>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-header row">
|
||||
<div class="col-sm-12">
|
||||
<h4 class="card-title"><?= $title['page']??'' ?></h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<!-- CSRF token -->
|
||||
<input type="hidden" class="txt_csrfname" name="<?= csrf_token() ?>" value="<?= csrf_hash() ?>" />
|
||||
<!-- Table -->
|
||||
<div class="table-responsive">
|
||||
<table id='table-grid' class="table table-striped nowrap" style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?=lang("App.notification_grid_sender")?></th>
|
||||
<th><?=lang("App.notification_grid_recipient")?></th>
|
||||
<th><?=lang("App.notification_grid_title")?></th>
|
||||
<th><?=lang("App.notification_grid_created_my")?></th>
|
||||
<th><?=lang("App.notification_grid_view_my")?></th>
|
||||
<th><?=lang("App.user_grid_options")?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</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>
|
||||
<!-- Datatable -->
|
||||
<script src="<?=site_url("themes/focus2/vendor/datatables/js/jquery.dataTables.min.js")?>"></script>
|
||||
<script src="<?=site_url("themes/focus2/vendor/pickers/daterange/moment.min.js")?>"></script>
|
||||
<script src="<?=site_url("themes/focus2/vendor/datatables/js/dataTables.datetime.js")?>"></script>
|
||||
<script src="<?=site_url("themes/focus2/vendor/datatables/js/dataTables.buttons.min.js")?>"></script>
|
||||
<script src="<?=site_url("themes/focus2/vendor/datatables/js/buttons.bootstrap4.min.js")?>"></script>
|
||||
<script src="<?=site_url("themes/focus2/vendor/datatables/js/jszip.min.js")?>"></script>
|
||||
<script src="<?=site_url("themes/focus2/vendor/datatables/js/pdfmake.min.js")?>"></script>
|
||||
<script src="<?=site_url("themes/focus2/vendor/datatables/js/vfs_fonts.js")?>"></script>
|
||||
<script src="<?=site_url("themes/focus2/vendor/datatables/js/buttons.html5.min.js")?>"></script>
|
||||
<script src="<?=site_url("themes/focus2/vendor/datatables/js/buttons.print.min.js")?>"></script>
|
||||
<script src="<?=site_url("themes/focus2/vendor/datatables/js/buttons.colVis.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>
|
||||
<!-- Custom -->
|
||||
<script src="<?=site_url("assets/js/main.js")?>"></script>
|
||||
<script src="<?=site_url('themes/focus2/vendor/timeago/jquery.timeago.js'); ?>"></script>
|
||||
<script src="<?=site_url('themes/focus2/vendor/timeago/locales/jquery.timeago.'.langJS().'.js'); ?>"></script>
|
||||
<script>
|
||||
"use strict";
|
||||
$(document).ready(function () {
|
||||
let dataFormat = [
|
||||
{
|
||||
targets: 3,
|
||||
render: $.fn.dataTable.render.moment('YYYY-MM-DD HH:mm:ss','<?=momentDateTimeJS()?>')
|
||||
},
|
||||
{
|
||||
targets: 4,
|
||||
render: function ( data, type, row ) {
|
||||
switch (data) {
|
||||
case '1':
|
||||
return '<span class="badge badge-success"><?=lang("App.notification_grid_yes")?></span>';
|
||||
default:
|
||||
return '<span class="badge badge-dark"><?=lang("App.notification_grid_no")?></span>';
|
||||
}
|
||||
}
|
||||
},
|
||||
];
|
||||
let order = [[3, "desc"]];
|
||||
let translate = '/themes/focus2/vendor/datatables/locales/<?=langJS()?>.json';
|
||||
let button = ["<?=lang("App.global_copy")?>","<?=lang("App.global_print")?>","<?=lang("App.global_excel")?>","<?=lang("App.global_pdf")?>"];
|
||||
let columns = [{ data: 'sender' },{ data: 'recipient' },{ data: 'title' },{ data: 'created_at' },{ data: 'is_read' },{ data: 'options' }];
|
||||
loadDataTableAjax('table-grid', '<?=site_url('ajax/getMyNotification')?>', translate, true, true, order, columns,dataFormat, button);
|
||||
});
|
||||
</script>
|
||||
<?= sweetAlert() ?>
|
||||
@ -1,46 +0,0 @@
|
||||
<!--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>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h4 class="card-title"><?= $obj['title']??''?></h4>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<?= html_entity_decode($obj['body']??'');?>
|
||||
<div class="form-actions mt-4">
|
||||
<a href="<?= site_url($btn_return['route']??'#') ?>" class="<?= $btn_return['class']??''?>">
|
||||
<i class="<?= $btn_return['icon']??'' ?>"></i> <?= $btn_return['title']??'' ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</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>
|
||||
|
||||
@ -98,28 +98,28 @@
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Pedido')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'activos', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("pedidos/pedido/activos") ?>" class="menu-link">
|
||||
<a href="<?= route_to("validacionView") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_pedidos_activos") ?>"><?= lang("App.menu_pedidos_activos") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'finalizados', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("pedidos/pedido/finalizados") ?>" class="menu-link">
|
||||
<a href="<?= route_to("listaPedidosFinalizados") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_pedidos_finalizados") ?>"><?= lang("App.menu_pedidos_finalizados") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'cancelados', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("pedidos/pedido/cancelados") ?>" class="menu-link">
|
||||
<a href="<?= route_to("listaPedidosCancelados") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_pedidos_cancelados") ?>"><?= lang("App.menu_pedidos_cancelados") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'todos', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("pedidos/pedido/todos") ?>" class="menu-link">
|
||||
<a href="<?= route_to("listaPedidos") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_pedidos_todos") ?>"><?= lang("App.menu_pedidos_todos") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
@ -265,16 +265,17 @@
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Users')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("configuracion/users") ?>" class="menu-link">
|
||||
<a href="<?= route_to('userList') ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_users") ?>"><?= lang("App.menu_users") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Group')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("configuracion/group") ?>" class="menu-link">
|
||||
<a href="<?= route_to("userGroupList") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_permission_group") ?>"><?= lang("App.menu_permission_group") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@ -1,114 +1,119 @@
|
||||
<?php $menus = getMenuControl(); ?>
|
||||
|
||||
<!-- Menu -->
|
||||
<aside id="layout-menu" class="layout-menu menu-vertical menu bg-menu-theme">
|
||||
<div class="app-brand">
|
||||
<a href="<?= site_url('home') ?>" class="app-brand-link">
|
||||
<span class="app-brand-logo">
|
||||
<img src="<?= site_url('themes/vuexy/img/branding/logo.png') ?>" width="150px">
|
||||
</span>
|
||||
<!-- Menu -->
|
||||
<aside id="layout-menu" class="layout-menu menu-vertical menu bg-menu-theme">
|
||||
<div class="app-brand">
|
||||
<a href="<?= site_url('home') ?>" class="app-brand-link">
|
||||
<span class="app-brand-logo">
|
||||
<img src="<?= site_url('themes/vuexy/img/branding/logo.png') ?>" width="150px">
|
||||
</span>
|
||||
</a>
|
||||
<a href="javascript:void(0);" class="layout-menu-toggle menu-link text-large ms-auto">
|
||||
<i class="ti menu-toggle-icon d-none d-xl-block ti-sm align-middle"></i>
|
||||
<i class="ti ti-x d-block d-xl-none ti-sm align-middle"></i>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="menu-inner-shadow"></div>
|
||||
|
||||
<ul class="menu-inner py-1">
|
||||
|
||||
<li class="menu-item active">
|
||||
<a href="<?= site_url("") ?>" class="menu-link">
|
||||
<i class="menu-icon tf-icons ti ti-dashboard"></i>
|
||||
<div data-i18n="<?= lang("App.menu_dashboard") ?>"><?= lang("App.menu_dashboard") ?></div>
|
||||
</a>
|
||||
<a href="javascript:void(0);" class="layout-menu-toggle menu-link text-large ms-auto">
|
||||
<i class="ti menu-toggle-icon d-none d-xl-block ti-sm align-middle"></i>
|
||||
<i class="ti ti-x d-block d-xl-none ti-sm align-middle"></i>
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<div class="menu-inner-shadow"></div>
|
||||
|
||||
<ul class="menu-inner py-1">
|
||||
|
||||
<li class="menu-item active">
|
||||
<a href="<?= site_url("") ?>" class="menu-link">
|
||||
<i class="menu-icon tf-icons ti ti-dashboard"></i>
|
||||
<div data-i18n="<?= lang("App.menu_dashboard") ?>"><?= lang("App.menu_dashboard") ?></div>
|
||||
<?php
|
||||
/**
|
||||
* MENU CLIENTES
|
||||
*/
|
||||
if (allowMenuSection($menus, ['Cliente'], 'index')):
|
||||
?>
|
||||
<!-- Clientes -->
|
||||
<li class="menu-item">
|
||||
<a href="javascript:void(0);" class="menu-link menu-toggle">
|
||||
<i class="menu-icon tf-icons ti ti-users"></i>
|
||||
<div data-i18n="<?= lang("App.menu_clientes") ?>"><?= lang("App.menu_clientes") ?></div>
|
||||
</a>
|
||||
<ul class="menu-sub">
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Cliente')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("clientes/cliente") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_clientes") ?>"><?= lang("App.menu_clientes") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to("clienteplantillapreciosList") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_plantillas_tarifas_clientes") ?>">
|
||||
<?= lang("App.menu_plantillas_tarifas_clientes") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* MENU CLIENTES
|
||||
*/
|
||||
if (allowMenuSection($menus, ['Cliente'], 'index')):
|
||||
?>
|
||||
<!-- Clientes -->
|
||||
<li class="menu-item">
|
||||
<a href="javascript:void(0);" class="menu-link menu-toggle">
|
||||
<i class="menu-icon tf-icons ti ti-users"></i>
|
||||
<div data-i18n="<?= lang("App.menu_clientes") ?>"><?= lang("App.menu_clientes") ?></div>
|
||||
</a>
|
||||
<ul class="menu-sub">
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Cliente')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("clientes/cliente") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_clientes") ?>"><?= lang("App.menu_clientes") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to("clienteplantillapreciosList") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_plantillas_tarifas_clientes") ?>"><?= lang("App.menu_plantillas_tarifas_clientes") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* MENU PRESUPUESTOS
|
||||
*/
|
||||
if (allowMenuSection($menus, ['Presupuesto'], 'index')): ?>
|
||||
<!-- Budgets -->
|
||||
<li class="menu-item">
|
||||
<a href="javascript:void(0);" class="menu-link menu-toggle">
|
||||
<i class="menu-icon tf-icons ti ti-currency-dollar"></i>
|
||||
<div data-i18n="<?= lang("App.menu_presupuestos") ?>"><?= lang("App.menu_presupuestos") ?></div>
|
||||
</a>
|
||||
<ul class="menu-sub">
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Presupuestomaquetacion')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("presupuestos/presupuestomaquetacion") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_presupuestomaquetacion_todos") ?>">
|
||||
<?= lang("App.menu_presupuestomaquetacion_todos") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<?php
|
||||
/**
|
||||
* MENU PRESUPUESTOS
|
||||
*/
|
||||
if (allowMenuSection($menus, ['Presupuesto'], 'index')): ?>
|
||||
<!-- Budgets -->
|
||||
<li class="menu-item">
|
||||
<a href="javascript:void(0);" class="menu-link menu-toggle">
|
||||
<i class="menu-icon tf-icons ti ti-currency-dollar"></i>
|
||||
<div data-i18n="<?= lang("App.menu_presupuestos") ?>"><?= lang("App.menu_presupuestos") ?></div>
|
||||
</a>
|
||||
<ul class="menu-sub">
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Presupuestomaquetacion')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("presupuestos/presupuestomaquetacion") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_presupuestomaquetacion_todos") ?>"><?= lang("App.menu_presupuestomaquetacion_todos") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'nuevo', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("presupuestos/presupuestomaquetacion/nuevo") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_presupuestomaquetacion_nuevo") ?>"><?= lang("App.menu_presupuestomaquetacion_nuevo") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'borrador', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("presupuestos/presupuestomaquetacion/borrador") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_presupuestomaquetacion_borrador") ?>"><?= lang("App.menu_presupuestomaquetacion_borrador") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'aceptados', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("presupuestos/presupuestomaquetacion/aceptados") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_presupuestomaquetacion_aceptados") ?>"><?= lang("App.menu_presupuestomaquetacion_aceptados") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'nuevo', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("presupuestos/presupuestomaquetacion/nuevo") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_presupuestomaquetacion_nuevo") ?>">
|
||||
<?= lang("App.menu_presupuestomaquetacion_nuevo") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'borrador', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("presupuestos/presupuestomaquetacion/borrador") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_presupuestomaquetacion_borrador") ?>">
|
||||
<?= lang("App.menu_presupuestomaquetacion_borrador") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'aceptados', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("presupuestos/presupuestomaquetacion/aceptados") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_presupuestomaquetacion_aceptados") ?>">
|
||||
<?= lang("App.menu_presupuestomaquetacion_aceptados") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<?php
|
||||
/**
|
||||
* MENU PEDIDOS
|
||||
*/
|
||||
if (allowMenuSection($menus, ['Pedido'], 'index')): ?>
|
||||
<?php
|
||||
/**
|
||||
* MENU PEDIDOS
|
||||
*/
|
||||
if (allowMenuSection($menus, ['Pedido'], 'index')): ?>
|
||||
<!-- Orders -->
|
||||
<li class="menu-item">
|
||||
<a href="javascript:void(0);" class="menu-link menu-toggle">
|
||||
@ -119,244 +124,262 @@
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Pedido')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'activos', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("pedidos/pedido/activos") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_pedidos_activos") ?>"><?= lang("App.menu_pedidos_activos") ?></div>
|
||||
<a href="<?= route_to("validacionView") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_pedidos_activos") ?>"><?= lang("App.menu_pedidos_activos") ?>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'finalizados', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("pedidos/pedido/finalizados") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_pedidos_finalizados") ?>"><?= lang("App.menu_pedidos_finalizados") ?></div>
|
||||
<a href="<?= route_to("listaPedidosFinalizados") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_pedidos_finalizados") ?>">
|
||||
<?= lang("App.menu_pedidos_finalizados") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'cancelados', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("pedidos/pedido/cancelados") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_pedidos_cancelados") ?>"><?= lang("App.menu_pedidos_cancelados") ?></div>
|
||||
<a href="<?= route_to("listaPedidosCancelados") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_pedidos_cancelados") ?>">
|
||||
<?= lang("App.menu_pedidos_cancelados") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'todos', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("pedidos/pedido/todos") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_pedidos_todos") ?>"><?= lang("App.menu_pedidos_todos") ?></div>
|
||||
<a href="<?= route_to("listaPedidos") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_pedidos_todos") ?>"><?= lang("App.menu_pedidos_todos") ?>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<?php
|
||||
/**
|
||||
* MENU PRODUCCION
|
||||
*/
|
||||
if
|
||||
(allowMenuSection($menus, ['Ordentrabajo'], 'index')): ?>
|
||||
<!-- Production -->
|
||||
<li class="menu-item">
|
||||
<a href="javascript:void(0);" class="menu-link menu-toggle">
|
||||
<i class="menu-icon tf-icons ti ti-printer"></i>
|
||||
<div data-i18n="<?= lang("App.menu_produccion") ?>"><?= lang("App.menu_produccion") ?></div>
|
||||
</a>
|
||||
<ul class="menu-sub">
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Ordentrabajo')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("produccion/ordentrabajo") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_orden_trabajo") ?>"><?= lang("App.menu_orden_trabajo") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
/**
|
||||
* MENU PRODUCCION
|
||||
*/
|
||||
if
|
||||
(allowMenuSection($menus, ['Ordentrabajo'], 'index')): ?>
|
||||
<!-- Production -->
|
||||
<li class="menu-item">
|
||||
<a href="javascript:void(0);" class="menu-link menu-toggle">
|
||||
<i class="menu-icon tf-icons ti ti-printer"></i>
|
||||
<div data-i18n="<?= lang("App.menu_produccion") ?>"><?= lang("App.menu_produccion") ?></div>
|
||||
</a>
|
||||
<ul class="menu-sub">
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Ordentrabajo')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("produccion/ordentrabajo") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_orden_trabajo") ?>"><?= lang("App.menu_orden_trabajo") ?>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Ordentrabajo')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'cien', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("produccion/ordentrabajo/cien") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_orden_trabajo_100") ?>"><?= lang("App.menu_orden_trabajo_100") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Ordentrabajo')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'cien', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("produccion/ordentrabajo/cien") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_orden_trabajo_100") ?>">
|
||||
<?= lang("App.menu_orden_trabajo_100") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Ordentrabajo')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'finalizado', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("produccion/ordentrabajo/finalizado") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_orden_trabajo_finalizados") ?>"><?= lang("App.menu_orden_trabajo_finalizados") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Ordentrabajo')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'finalizado', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("produccion/ordentrabajo/finalizado") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_orden_trabajo_finalizados") ?>">
|
||||
<?= lang("App.menu_orden_trabajo_finalizados") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Ordentrabajo')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'pendiente', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("produccion/ordentrabajo/pendiente") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_orden_trabajo_pendientes") ?>"><?= lang("App.menu_orden_trabajo_pendientes") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Ordentrabajo')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'pendiente', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("produccion/ordentrabajo/pendiente") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_orden_trabajo_pendientes") ?>">
|
||||
<?= lang("App.menu_orden_trabajo_pendientes") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
/**
|
||||
* MENU FACTURACION
|
||||
*/
|
||||
if (allowMenuSection($menus, ['Albaran', 'Factura'], 'index')): ?>
|
||||
<!-- Invoicing -->
|
||||
<li class="menu-item">
|
||||
<a href="javascript:void(0);" class="menu-link menu-toggle">
|
||||
<i class="menu-icon tf-icons ti ti-file-dollar"></i>
|
||||
<div data-i18n="<?= lang("App.menu_facturación") ?>"><?= lang("App.menu_facturación") ?></div>
|
||||
</a>
|
||||
<ul class="menu-sub">
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Factura')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("facturacion/factura") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_facturas") ?>"><?= lang("App.menu_facturas") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'vencimiento', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("facturacion/factura/vencimiento") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_facturas_vencimiento") ?>"><?= lang("App.menu_facturas_vencimiento") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'nueva', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("facturacion/factura/nueva") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_facturas_nueva") ?>"><?= lang("App.menu_facturas_nueva") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Albaran')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("facturacion/albaran") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_albaran") ?>"><?= lang("App.menu_albaran") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<?php
|
||||
/**
|
||||
* MENU CONFIGURACION
|
||||
*/
|
||||
if (allowMenuSection($menus,
|
||||
['Calendario', 'Paises', 'Users', 'Group'], 'index')): ?>
|
||||
<li class="menu-item">
|
||||
<a href="javascript:void(0);" class="menu-link menu-toggle">
|
||||
<i class="menu-icon tf-icons ti ti-adjustments-horizontal"></i>
|
||||
<div data-i18n="<?= lang("App.menu_configuration") ?>"><?= lang("App.menu_configuration") ?></div>
|
||||
</a>
|
||||
<ul class="menu-sub">
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Calendario')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("configuracion/calendario") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_calendario") ?>"><?= lang("App.menu_calendario") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Paises')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("configuracion/paises") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_paises") ?>"><?= lang("App.menu_paises") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Users')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("configuracion/users") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_users") ?>"><?= lang("App.menu_users") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Group')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("configuracion/group") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_permission_group") ?>"><?= lang("App.menu_permission_group") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<?php
|
||||
/**
|
||||
* MENU MENSAJES
|
||||
*/
|
||||
if (count(getArrayItem($menus, 'name', 'Mensajes')) > 0): ?>
|
||||
<!-- Messages -->
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("servicios/mensajes") ?>" class="menu-link">
|
||||
<i class="menu-icon tf-icons ti ti-message"></i>
|
||||
<div data-i18n="<?= lang("App.menu_mensajes") ?>"><?= lang("App.menu_mensajes") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
|
||||
<li class="menu-header small text-uppercase">
|
||||
<span class="menu-header-text">Sistema</span>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* MENU AJUSTES
|
||||
*/
|
||||
if (count(getArrayItem($menus, 'name', 'Settings')) > 0): ?>
|
||||
<!-- Settings -->
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("settings")?>" class="menu-link">
|
||||
<i class="menu-icon tf-icons ti ti-settings""></i>
|
||||
<div data-i18n="<?= lang("App.menu_settings") ?>"><?= lang("App.menu_settings") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* MENU ACTIVIDAD
|
||||
*/
|
||||
if (count(getArrayItem($menus, 'name', 'Activity')) > 0): ?>
|
||||
<!-- Activity -->
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("activity") ?>" class="menu-link">
|
||||
<i class="menu-icon tf-icons ti ti-fingerprint""></i>
|
||||
<div data-i18n="<?= lang("App.menu_activity") ?>"><?= lang("App.menu_activity") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
</ul>
|
||||
</aside>
|
||||
<!-- / Menu -->
|
||||
|
||||
<?php
|
||||
/**
|
||||
* MENU FACTURACION
|
||||
*/
|
||||
if (allowMenuSection($menus, ['Albaran', 'Factura'], 'index')): ?>
|
||||
<!-- Invoicing -->
|
||||
<li class="menu-item">
|
||||
<a href="javascript:void(0);" class="menu-link menu-toggle">
|
||||
<i class="menu-icon tf-icons ti ti-file-dollar"></i>
|
||||
<div data-i18n="<?= lang("App.menu_facturación") ?>"><?= lang("App.menu_facturación") ?></div>
|
||||
</a>
|
||||
<ul class="menu-sub">
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Factura')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("facturacion/factura") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_facturas") ?>"><?= lang("App.menu_facturas") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'vencimiento', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("facturacion/factura/vencimiento") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_facturas_vencimiento") ?>">
|
||||
<?= lang("App.menu_facturas_vencimiento") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'nueva', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("facturacion/factura/nueva") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_facturas_nueva") ?>"><?= lang("App.menu_facturas_nueva") ?>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Albaran')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("facturacion/albaran") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_albaran") ?>"><?= lang("App.menu_albaran") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<?php
|
||||
/**
|
||||
* MENU CONFIGURACION
|
||||
*/
|
||||
if (
|
||||
allowMenuSection(
|
||||
$menus,
|
||||
['Calendario', 'Paises', 'Users', 'Group'],
|
||||
'index'
|
||||
)
|
||||
): ?>
|
||||
<li class="menu-item">
|
||||
<a href="javascript:void(0);" class="menu-link menu-toggle">
|
||||
<i class="menu-icon tf-icons ti ti-adjustments-horizontal"></i>
|
||||
<div data-i18n="<?= lang("App.menu_configuration") ?>"><?= lang("App.menu_configuration") ?></div>
|
||||
</a>
|
||||
<ul class="menu-sub">
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Calendario')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("configuracion/calendario") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_calendario") ?>"><?= lang("App.menu_calendario") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Paises')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("configuracion/paises") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_paises") ?>"><?= lang("App.menu_paises") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Users')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to('userList') ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_users") ?>"><?= lang("App.menu_users") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Group')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to("userGroupList") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_permission_group") ?>">
|
||||
<?= lang("App.menu_permission_group") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<?php
|
||||
/**
|
||||
* MENU MENSAJES
|
||||
*/
|
||||
if (count(getArrayItem($menus, 'name', 'Mensajes')) > 0): ?>
|
||||
<!-- Messages -->
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("servicios/mensajes") ?>" class="menu-link">
|
||||
<i class="menu-icon tf-icons ti ti-message"></i>
|
||||
<div data-i18n="<?= lang("App.menu_mensajes") ?>"><?= lang("App.menu_mensajes") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
|
||||
<li class="menu-header small text-uppercase">
|
||||
<span class="menu-header-text">Sistema</span>
|
||||
</li>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* MENU AJUSTES
|
||||
*/
|
||||
if (count(getArrayItem($menus, 'name', 'Settings')) > 0): ?>
|
||||
<!-- Settings -->
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("settings") ?>" class="menu-link">
|
||||
<i class="menu-icon tf-icons ti ti-settings""></i>
|
||||
<div data-i18n=" <?= lang("App.menu_settings") ?>"><?= lang("App.menu_settings") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* MENU ACTIVIDAD
|
||||
*/
|
||||
if (count(getArrayItem($menus, 'name', 'Activity')) > 0): ?>
|
||||
<!-- Activity -->
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("activity") ?>" class="menu-link">
|
||||
<i class="menu-icon tf-icons ti ti-fingerprint""></i>
|
||||
<div data-i18n=" <?= lang("App.menu_activity") ?>"><?= lang("App.menu_activity") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
</ul>
|
||||
</aside>
|
||||
<!-- / Menu -->
|
||||
@ -72,14 +72,14 @@ if (
|
||||
<?php } ?>
|
||||
<?php if (auth()->user()->can('usuarios.menu')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("configuracion/users") ?>" class="menu-link">
|
||||
<a href="<?= route_to('userList') ?>" class="menu-link">
|
||||
<?= lang("App.menu_users") ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (auth()->user()->can('roles-permisos.menu')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("configuracion/group") ?>" class="menu-link">
|
||||
<a href="<?= route_to("userGroupList") ?>" class="menu-link">
|
||||
<?= lang("App.menu_permission_group") ?>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@ -18,35 +18,35 @@ if (
|
||||
<ul class="menu-sub">
|
||||
<?php if (auth()->user()->can('pedidos-validacion.menu')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("pedidos/pedido/validacion") ?>" class="menu-link">
|
||||
<a href="<?= route_to("validacionView") ?>" class="menu-link">
|
||||
<?= lang("App.menu_pedidos_validacion") ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (auth()->user()->can('pedidos-activos.menu')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("pedidos/pedido/activos") ?>" class="menu-link">
|
||||
<a href="<?= route_to("listaPedidosActivos") ?>" class="menu-link">
|
||||
<?= lang("App.menu_pedidos_activos") ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (auth()->user()->can('pedidos-finalizados.menu')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("pedidos/pedido/finalizados") ?>" class="menu-link">
|
||||
<a href="<?= route_to("listaPedidosFinalizados") ?>" class="menu-link">
|
||||
<?= lang("App.menu_pedidos_finalizados") ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (auth()->user()->can('pedidos-cancelados.menu')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("pedidos/pedido/cancelados") ?>" class="menu-link">
|
||||
<a href="<?= route_to("listaPedidosCancelados") ?>" class="menu-link">
|
||||
<?= lang("App.menu_pedidos_cancelados") ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (auth()->user()->can('pedidos-todos.menu')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("pedidos/pedido/todos") ?>" class="menu-link">
|
||||
<a href="<?= route_to("listaPedidos") ?>" class="menu-link">
|
||||
<?= lang("App.menu_pedidos_todos") ?>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@ -2,7 +2,9 @@
|
||||
/**
|
||||
* MENU PRODUCCION
|
||||
*/
|
||||
if (auth()->user()->inGroup('beta')) {
|
||||
if (
|
||||
auth()->user()->can('produccion.menu')
|
||||
) {
|
||||
?>
|
||||
<!-- Production -->
|
||||
<li class="menu-item">
|
||||
@ -11,11 +13,13 @@ if (auth()->user()->inGroup('beta')) {
|
||||
<?= lang("App.menu_produccion") ?>
|
||||
</a>
|
||||
<ul class="menu-sub">
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("produccion/ordentrabajo") ?>" class="menu-link">
|
||||
<?= lang("App.menu_orden_trabajo") ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php if (auth()->user()->can('produccion.ots')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("produccion/ordentrabajo") ?>" class="menu-link">
|
||||
<?= lang("App.menu_orden_trabajo") ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<!-- <li class="menu-item">
|
||||
<a href="<?= site_url("produccion/ordentrabajo/cien") ?>" class="menu-link">
|
||||
<?= lang("App.menu_orden_trabajo_100") ?>
|
||||
@ -31,11 +35,13 @@ if (auth()->user()->inGroup('beta')) {
|
||||
<?= lang("App.menu_orden_trabajo_pendientes") ?>
|
||||
</a>
|
||||
</li> -->
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("produccion/ordentrabajo/planning/rotativa") ?>" class="menu-link">
|
||||
<?= lang("App.menu_planning") ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php if (auth()->user()->can('produccion.plannings')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("produccion/ordentrabajo/planning/rotativa") ?>" class="menu-link">
|
||||
<?= lang("App.menu_planning") ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php } ?>
|
||||
Reference in New Issue
Block a user