mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Añadidas tarifas extras, trabajando en permisos de tarifas
This commit is contained in:
@ -41,6 +41,10 @@ const SK_PERMISSION_MATRIX = [
|
|||||||
"tarifa-envio.edit",
|
"tarifa-envio.edit",
|
||||||
"tarifa-envio.delete",
|
"tarifa-envio.delete",
|
||||||
"tarifa-envio.menu",
|
"tarifa-envio.menu",
|
||||||
|
"tarifa-extra.create",
|
||||||
|
"tarifa-extra.edit",
|
||||||
|
"tarifa-extra.delete",
|
||||||
|
"tarifa-extra.menu",
|
||||||
"proveedores.create",
|
"proveedores.create",
|
||||||
"proveedores.edit",
|
"proveedores.edit",
|
||||||
"proveedores.delete",
|
"proveedores.delete",
|
||||||
|
|||||||
@ -1,28 +0,0 @@
|
|||||||
<?php
|
|
||||||
const SK_PERMISSION_MATRIX = [
|
|
||||||
"superadmin"=> [
|
|
||||||
"admin.*",
|
|
||||||
"users.*",
|
|
||||||
"beta.*"
|
|
||||||
],
|
|
||||||
"admin"=> [
|
|
||||||
"admin.access",
|
|
||||||
"users.create",
|
|
||||||
"users.edit",
|
|
||||||
"users.delete",
|
|
||||||
"beta.access"
|
|
||||||
],
|
|
||||||
"developer"=> [
|
|
||||||
"admin.access",
|
|
||||||
"admin.settings",
|
|
||||||
"users.create",
|
|
||||||
"users.edit",
|
|
||||||
"beta.access"
|
|
||||||
],
|
|
||||||
"user"=> [
|
|
||||||
"users.list"
|
|
||||||
],
|
|
||||||
"beta"=> [
|
|
||||||
"beta.access"
|
|
||||||
]
|
|
||||||
];
|
|
||||||
@ -41,6 +41,10 @@ const SK_PERMISSIONS = [
|
|||||||
'tarifa-envio.edit' => 'Can edit',
|
'tarifa-envio.edit' => 'Can edit',
|
||||||
'tarifa-envio.delete' => 'Can delete',
|
'tarifa-envio.delete' => 'Can delete',
|
||||||
'tarifa-envio.menu' => 'Menu shall be visualize',
|
'tarifa-envio.menu' => 'Menu shall be visualize',
|
||||||
|
'tarifa-extra.create' => 'Can create',
|
||||||
|
'tarifa-extra.edit' => 'Can edit',
|
||||||
|
'tarifa-extra.delete' => 'Can delete',
|
||||||
|
'tarifa-extra.menu' => 'Menu shall be visualize',
|
||||||
'proveedores.create' => 'Can create',
|
'proveedores.create' => 'Can create',
|
||||||
'proveedores.edit' => 'Can edit',
|
'proveedores.edit' => 'Can edit',
|
||||||
'proveedores.delete' => 'Can delete',
|
'proveedores.delete' => 'Can delete',
|
||||||
|
|||||||
@ -1,11 +0,0 @@
|
|||||||
<?php
|
|
||||||
const SK_PERMISSIONS = [
|
|
||||||
'admin.access' => 'Can access the sites admin area',
|
|
||||||
'admin.settings' => 'Can access the main site settings',
|
|
||||||
'users.manage-admins' => 'Can manage other admins',
|
|
||||||
'users.list' => 'Can list user stuff',
|
|
||||||
'users.create' => 'Can create new non-admin users',
|
|
||||||
'users.edit' => 'Can edit existing non-admin users',
|
|
||||||
'users.delete' => 'Can delete existing non-admin users',
|
|
||||||
'beta.access' => 'Can access beta-level features',
|
|
||||||
];
|
|
||||||
@ -1,22 +0,0 @@
|
|||||||
{
|
|
||||||
"superadmin": {
|
|
||||||
"title": "Super Admin",
|
|
||||||
"description": "Complete control of the site."
|
|
||||||
},
|
|
||||||
"admin": {
|
|
||||||
"title": "Admin",
|
|
||||||
"description": "Day to day administrators of the site."
|
|
||||||
},
|
|
||||||
"developer": {
|
|
||||||
"title": "Developer",
|
|
||||||
"description": "Site programmers."
|
|
||||||
},
|
|
||||||
"user": {
|
|
||||||
"title": "User",
|
|
||||||
"description": "General users of the site. Often customers."
|
|
||||||
},
|
|
||||||
"beta": {
|
|
||||||
"title": "Beta User",
|
|
||||||
"description": "Has access to beta-level features."
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,23 +0,0 @@
|
|||||||
<?php
|
|
||||||
const SK_ROLES = [
|
|
||||||
'superadmin' => [
|
|
||||||
'title' => 'Super Admin',
|
|
||||||
'description' => 'Complete control of the site.',
|
|
||||||
],
|
|
||||||
'admin' => [
|
|
||||||
'title' => 'Admin',
|
|
||||||
'description' => 'Day to day administrators of the site.',
|
|
||||||
],
|
|
||||||
'developer' => [
|
|
||||||
'title' => 'Developer',
|
|
||||||
'description' => 'Site programmers.',
|
|
||||||
],
|
|
||||||
'user' => [
|
|
||||||
'title' => 'User',
|
|
||||||
'description' => 'General users of the site. Often customers.',
|
|
||||||
],
|
|
||||||
'beta' => [
|
|
||||||
'title' => 'Beta User',
|
|
||||||
'description' => 'Has access to beta-level features.',
|
|
||||||
],
|
|
||||||
];
|
|
||||||
@ -17,7 +17,7 @@ class Home extends BaseController
|
|||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
|
|
||||||
echo view(getenv('theme.path') . 'main/defaultlayout');
|
echo view(getenv('theme.path') . 'form/home/viewHome');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -40,6 +40,10 @@ class Tarifapreimpresion extends \App\Controllers\GoBaseController
|
|||||||
|
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
|
if(!auth()->user()->can('tarifa-preimpresion.menu')){
|
||||||
|
$message = "No tiene permisos de acceso";
|
||||||
|
return redirect()->to(route_to('home'))->with('errorMessage', $message);
|
||||||
|
}
|
||||||
|
|
||||||
$this->viewData['usingClientSideDataTable'] = true;
|
$this->viewData['usingClientSideDataTable'] = true;
|
||||||
|
|
||||||
@ -51,6 +55,10 @@ class Tarifapreimpresion extends \App\Controllers\GoBaseController
|
|||||||
public function add()
|
public function add()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if(!auth()->user()->can('tarifa-preimpresion.create')){
|
||||||
|
$message = "No tiene permisos de acceso";
|
||||||
|
return redirect()->to(route_to($this->indexRoute))->with('errorMessage', $message);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -34,6 +34,7 @@ return [
|
|||||||
'tarifaAcabadoSection' => 'Tarifas de acabado',
|
'tarifaAcabadoSection' => 'Tarifas de acabado',
|
||||||
'tarifaEncuadernacionSection' => 'Tarifas de encuadernación',
|
'tarifaEncuadernacionSection' => 'Tarifas de encuadernación',
|
||||||
'tarifaEnvioSection' => 'Tarifas de envio',
|
'tarifaEnvioSection' => 'Tarifas de envio',
|
||||||
|
'tarifaExtraSection' => 'Tarifas extra',
|
||||||
'proveedoresSection' => 'Proveedores',
|
'proveedoresSection' => 'Proveedores',
|
||||||
'paisesSection' => 'Países',
|
'paisesSection' => 'Países',
|
||||||
'maquinasSection' => 'Máquinas',
|
'maquinasSection' => 'Máquinas',
|
||||||
|
|||||||
41
ci4/app/Views/themes/vuexy/form/home/viewHome.php
Normal file
41
ci4/app/Views/themes/vuexy/form/home/viewHome.php
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
<?= $this->include('themes/_commonPartialsBs/_confirm2delete') ?>
|
||||||
|
<?= $this->extend('themes/vuexy/main/defaultlayout') ?>
|
||||||
|
|
||||||
|
<?= $this->section('content'); ?>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
|
||||||
|
<div class="card card-info">
|
||||||
|
<div class="card-header">
|
||||||
|
<h3 class="card-title">Inicio</h3>
|
||||||
|
</div><!--//.card-header -->
|
||||||
|
<div class="card-body">
|
||||||
|
<?= view('themes/_commonPartialsBs/_alertBoxes'); ?>
|
||||||
|
|
||||||
|
</div><!--//.card-body -->
|
||||||
|
<div class="card-footer">
|
||||||
|
|
||||||
|
</div><!--//.card-footer -->
|
||||||
|
</div><!--//.card -->
|
||||||
|
</div><!--//.col -->
|
||||||
|
</div><!--//.row -->
|
||||||
|
|
||||||
|
|
||||||
|
<?= $this->endSection() ?>
|
||||||
|
|
||||||
|
|
||||||
|
<?= $this->section('additionalInlineJs') ?>
|
||||||
|
|
||||||
|
<?= $this->endSection() ?>
|
||||||
|
|
||||||
|
|
||||||
|
<?= $this->section('css') ?>
|
||||||
|
|
||||||
|
<?= $this->endSection() ?>
|
||||||
|
|
||||||
|
|
||||||
|
<?= $this->section('additionalExternalJs') ?>
|
||||||
|
|
||||||
|
<?= $this->endSection() ?>
|
||||||
|
|
||||||
@ -77,7 +77,7 @@ if (
|
|||||||
<?php if (auth()->user()->can('series-facturas.menu')) { ?>
|
<?php if (auth()->user()->can('series-facturas.menu')) { ?>
|
||||||
<li class="menu-item">
|
<li class="menu-item">
|
||||||
<a href="<?= route_to("seriesFacturasList") ?>" class="menu-link">
|
<a href="<?= route_to("seriesFacturasList") ?>" class="menu-link">
|
||||||
<?= lang("App.menu_series_factura") ?>
|
<?= lang("App.menu_series_facturas") ?>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|||||||
@ -52,6 +52,13 @@ if (
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
<?php if (auth()->user()->can('tarifa-extra.menu')) { ?>
|
||||||
|
<li class="menu-item">
|
||||||
|
<a href="<?= site_url("tarifas/tarifaextra") ?>" class="menu-link">
|
||||||
|
<?= lang("App.menu_tarifaextra") ?>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<?php } ?>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
Reference in New Issue
Block a user