Compare commits

..

No commits in common. "9952c06c71674fe57f6b194dc7bd4ef2840a499e" and "abc63ae3d93afe2bcd316305900a6c5be21f3a67" have entirely different histories.

52 changed files with 1626 additions and 42991 deletions

View File

@ -15,15 +15,23 @@ Al momento sono presenti:
## Installazione
- clonare il repository
- copiare il file ```.env.example``` in ```.env```
- copiare il file .env.example
- inserire le informazioni del database (username,password,dbname)
- lanciare ``` composer install ```
- lanciare ``` php artisan migrate --seed```
- di default si crea l'utente ``` admin ``` con password ```admin ``` per accedere la prima volta.
- lanciare >composer install
- lanciare php artisan migrate
- lanciare i seeds (categorie e utenti di default)
## Sviluppatori (attualmente)
## Sviluppatori
Flavio Barachino <flavio.barachino@lavorain.cloud>
### Vuoi partecipare?
Scrivimi con le tue proposte, le tue critiche, i tuoi suggerimenti.
=======
## Sviluppatori
Flavio Barachino <flavio.barachino@lavorain.cloud>
### Vuoi partecipare?
Scrivimi con le tue proposte, le tue critiche, i tuoi suggerimenti.

View File

@ -23,6 +23,4 @@ class CondominioController extends Controller
{
abort(403);
}
}

View File

@ -4,59 +4,58 @@ namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
// use Junges\ACL\Models\Group;
// use Junges\ACL\Models\Permission;
use Spatie\Permission\Models\Role;
use Spatie\Permission\Models\Permission;
use App\Models\User;
use Junges\ACL\Models\Group;
use Junges\ACL\Models\Permission;
class Utenti extends Controller
{
public function createRole($ruolo)
//
public function nuovoGruppo()
{
$role=Role::create(['name'=>$ruolo]);
return json_encode(Role::all()->pluck('name'));
}
function createPermission($permesso){
$permission=Permission::create(['name'=>$permesso]);
return json_encode(Permission::all()->pluck('name'));
return view('vendor.junges.form_addGroup',['gruppi'=>Utenti::getGruppi()]);
}
function userClass() {
$user=new User();
return get_class_methods($user);
public function saveNuovoGruppo(Request $request)
{
$group=Group::create(['name' => $request['gruppo'],'description'=>$request['descrizione']]);
return view('vendor.junges.form_addGroup',['gruppi'=>Utenti::getGruppi()]);
}
// post del create user
function createUser(Request $params){
User::addUser($params);
return redirect('/admin/users/new');
public function nuovoPermesso()
{
return view('vendor.junges.form_addPermission',['permessi'=>Utenti::getPermessi()]);
}
public function saveNuovoPermesso(Request $request)
{
$group=Permission::create(['name' => $request['permesso'],'description'=>$request['descrizione']]);
return view('vendor.junges.form_addPermission',['permessi'=>Utenti::getPermessi()]);
}
// mostra il form della creazione dell'utente
function addUser(){
$roles = Role::all();
$users = User::all();
return view('users.create',['ruoli'=>$roles,'users'=>$users]);
public function getPermessi()
{
return DB::table('permissions')->orderBy('name')->get();
}
function listUser(){
$users = User::all();
return view('users.list',['users'=>$users]);
public function getGruppi()
{
return DB::table('groups')->orderBy('name')->get();
}
function listRoles(){
$roles = Role::all();
return $roles;
public function vw_assignToGroup()
{
return view('vendor.junges.assignPermissionToGroup',[
'permessi'=>Utenti::getPermessi(),
'gruppi'=>Utenti::getGruppi(),
]);
}
function deleteUser($id) {
User::destroy($id);
return redirect('/admin/users/new');
public function assignPermissionToGroup(Request $request)
{
$group=Group::findByName($request['gruppo']);
$group->assignPermission($request['permesso']);
return view('vendor.junges.assignPermissionToGroup',[
'permessi'=>Utenti::getPermessi(),
'gruppi'=>Utenti::getGruppi(),
]);
}
}

View File

@ -63,8 +63,6 @@ class Kernel extends HttpKernel
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
'role' => \Spatie\Permission\Middlewares\RoleMiddleware::class,
'permission' => \Spatie\Permission\Middlewares\PermissionMiddleware::class,
'role_or_permission' => \Spatie\Permission\Middlewares\RoleOrPermissionMiddleware::class,
];
}

View File

@ -2,20 +2,21 @@
namespace App\Models;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Hash;
use Laravel\Sanctum\HasApiTokens;
use Spatie\Permission\Traits\HasRoles;
use Illuminate\Foundation\Auth\Access\Authorizable;
//use LdapRecord\Laravel\Auth\Authenticatable;
use LdapRecord\Laravel\Auth\AuthenticatesWithLdap;
use Junges\ACL\Concerns\HasGroups;
class User extends Authenticatable
{
use HasApiTokens, HasFactory, Notifiable, HasRoles,Authorizable;
use HasApiTokens, HasFactory, Notifiable, AuthenticateswithLdap, HasGroups, SoftDeletes;
/**
* The attributes that are mass assignable.
@ -26,7 +27,6 @@ class User extends Authenticatable
'name',
'email',
'password',
'user_role',
];
/**
@ -48,8 +48,6 @@ class User extends Authenticatable
'email_verified_at' => 'datetime',
];
protected $guard_name = 'web';
public function getLdapDomainColumn()
{
return 'domain';
@ -70,24 +68,11 @@ class User extends Authenticatable
{
return DB::table('users')->where('id','=',$id)->get();
}
public static function getUsers()
{
return DB::table('users')->orderBy('name')->get();
}
// Aggiunge un utente e assegna un ruolo
public static function addUser($params)
{
self::create([
'name'=>$params['name'],
'email'=>$params['email'],
'password'=>Hash::make($params['password']),
])->assignRole($params['role']);
}
}

View File

@ -26,10 +26,5 @@ class AuthServiceProvider extends ServiceProvider
$this->registerPolicies();
//
Gate::before(function ($user, $ability) {
if ($user->hasRole('admin')) {
return true;
}
});
}
}

View File

@ -10,10 +10,8 @@
"require" : {
"php": "^7.3|^8.0",
"barryvdh/laravel-dompdf": "^2.0",
<<<<<<< HEAD
"directorytree/ldaprecord": "^2.9",
=======
>>>>>>> 3ebca7bb4a04430aecf781bee6ba7b1a1ec56a41
"directorytree/ldaprecord-laravel": "^2.5",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.0.1",
"laravel-notification-channels/telegram": "^2.0",
@ -22,12 +20,12 @@
"laravel/tinker": "^2.5",
"laravel/ui": "^3.4",
"laraveldaily/laravel-charts": "^0.1.29",
"mateusjunges/laravel-acl": "^4.2",
"rap2hpoutre/fast-excel": "^3.2",
"secondtruth/startmin": "^1.1",
"sfneal/view-export": "^2.10",
"snapappointments/bootstrap-select": "^1.13",
"spatie/laravel-backup": "^7.0",
"spatie/laravel-permission": "^5.10",
"webklex/laravel-imap": "^2.4"
},
"require-dev" : {

1194
composer.lock generated

File diff suppressed because it is too large Load Diff

106
config/acl.php Normal file
View File

@ -0,0 +1,106 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Models
|--------------------------------------------------------------------------
|
| When using this package, we need to know which Eloquent Model should be used
| to retrieve your groups and permissions. Of course, it is just the basics models
| needed, but you can use whatever you like.
|
*/
'models' => [
/*
| The model you want to use as Permission model must use the MateusJunges\ACL\Traits\PermissionsTrait
*/
'permission' => Junges\ACL\Models\Permission::class,
/*
| The model you want to use as Group model must use the MateusJunges\ACL\Traits\GroupsTrait
*/
'group' => Junges\ACL\Models\Group::class,
],
/*
|--------------------------------------------------------------------------
| Route Model Binding
|--------------------------------------------------------------------------
|
| If you would like model binding to use a database column other than id when
| retrieving a given model class, you may override the getRouteKeyName method
| on the Eloquent model with yours. The default key used for route model binding
| in this package is the `id` database column. You can modify it by changing the
| following configuration:
|
*/
'route_model_binding_keys' => [
'group_model' => 'id',
'permission_model' => 'id',
],
/*
|--------------------------------------------------------------------------
| Tables
|--------------------------------------------------------------------------
| Specify the basics authentication tables that you are using.
| Once you required this package, the following tables are
| created by default when you run the command
|
| php artisan migrate
|
| If you want to change this tables, please keep the basic structure unchanged.
|
*/
'tables' => [
'groups' => 'groups',
'permissions' => 'permissions',
'users' => 'users',
'group_has_permissions' => 'group_has_permissions',
'model_has_permissions' => 'model_has_permissions',
'model_has_groups' => 'model_has_groups',
],
'column_names' => [
'group_pivot_key' => null,
'permission_pivot_key' => null,
'model_morph_key' => 'model_id',
'team_foreign_key' => 'team_id'
],
'teams' => false,
/*
|--------------------------------------------------------------------------
| Ignition Solution Suggestions
|--------------------------------------------------------------------------
|
| To enable the ignition solutions for laravel-acl, set this flag to true.
|
| The solutions will then be automatically registered with ignition if its installed.
|
*/
'offer_solutions' => false,
'register_permission_check_method' => true,
'cache' => [
/*
* All permissions are cached for 24 hours by default. If permissions or groups are updated,
* then the cache is flushed automatically.
*/
'expiration_time' => DateInterval::createFromDateString('24 hours'),
/*
* The cache key used to store permissions.
*/
'key' => 'junges.acl.cache',
/*
* You can optionally specify a cache driver to use for permissions caching using
* store drivers listed in config/cache.php.
*/
'store' => 'default'
]
];

View File

@ -161,7 +161,6 @@ return [
Illuminate\Translation\TranslationServiceProvider::class,
Illuminate\Validation\ValidationServiceProvider::class,
Illuminate\View\ViewServiceProvider::class,
/*
* Package Service Providers...
@ -175,7 +174,6 @@ return [
// App\Providers\BroadcastServiceProvider::class,
App\Providers\EventServiceProvider::class,
App\Providers\RouteServiceProvider::class,
Spatie\Permission\PermissionServiceProvider::class,
],

View File

@ -60,14 +60,26 @@ return [
*/
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => App\Models\User::class,
'ldap' => [
'driver' => 'ldap', //'eloquent',
'model' => LdapRecord\Models\ActiveDirectory\User::class, //App\Models\User::class,
'rules' => [
App\Ldap\Rules\OnlyInGroupUsers::class,
],
'database' => [
'model' => App\Models\User::class,
'sync_passwords'=> false,
'sync_attributes' => [
'name' => 'displayname',
'email' => 'mail',
],
],
],
/*'users' => [
'users' => [
'driver' => 'database',
'table' => 'users',
],*/
],
],
/*

View File

@ -1,161 +0,0 @@
<?php
return [
'models' => [
/*
* When using the "HasPermissions" trait from this package, we need to know which
* Eloquent model should be used to retrieve your permissions. Of course, it
* is often just the "Permission" model but you may use whatever you like.
*
* The model you want to use as a Permission model needs to implement the
* `Spatie\Permission\Contracts\Permission` contract.
*/
'permission' => Spatie\Permission\Models\Permission::class,
/*
* When using the "HasRoles" trait from this package, we need to know which
* Eloquent model should be used to retrieve your roles. Of course, it
* is often just the "Role" model but you may use whatever you like.
*
* The model you want to use as a Role model needs to implement the
* `Spatie\Permission\Contracts\Role` contract.
*/
'role' => Spatie\Permission\Models\Role::class,
],
'table_names' => [
/*
* When using the "HasRoles" trait from this package, we need to know which
* table should be used to retrieve your roles. We have chosen a basic
* default value but you may easily change it to any table you like.
*/
'roles' => 'roles',
/*
* When using the "HasPermissions" trait from this package, we need to know which
* table should be used to retrieve your permissions. We have chosen a basic
* default value but you may easily change it to any table you like.
*/
'permissions' => 'permissions',
/*
* When using the "HasPermissions" trait from this package, we need to know which
* table should be used to retrieve your models permissions. We have chosen a
* basic default value but you may easily change it to any table you like.
*/
'model_has_permissions' => 'model_has_permissions',
/*
* When using the "HasRoles" trait from this package, we need to know which
* table should be used to retrieve your models roles. We have chosen a
* basic default value but you may easily change it to any table you like.
*/
'model_has_roles' => 'model_has_roles',
/*
* When using the "HasRoles" trait from this package, we need to know which
* table should be used to retrieve your roles permissions. We have chosen a
* basic default value but you may easily change it to any table you like.
*/
'role_has_permissions' => 'role_has_permissions',
],
'column_names' => [
/*
* Change this if you want to name the related pivots other than defaults
*/
'role_pivot_key' => null, //default 'role_id',
'permission_pivot_key' => null, //default 'permission_id',
/*
* Change this if you want to name the related model primary key other than
* `model_id`.
*
* For example, this would be nice if your primary keys are all UUIDs. In
* that case, name this `model_uuid`.
*/
'model_morph_key' => 'model_id',
/*
* Change this if you want to use the teams feature and your related model's
* foreign key is other than `team_id`.
*/
'team_foreign_key' => 'team_id',
],
/*
* When set to true, the method for checking permissions will be registered on the gate.
* Set this to false, if you want to implement custom logic for checking permissions.
*/
'register_permission_check_method' => true,
/*
* When set to true the package implements teams using the 'team_foreign_key'. If you want
* the migrations to register the 'team_foreign_key', you must set this to true
* before doing the migration. If you already did the migration then you must make a new
* migration to also add 'team_foreign_key' to 'roles', 'model_has_roles', and
* 'model_has_permissions'(view the latest version of package's migration file)
*/
'teams' => false,
/*
* When set to true, the required permission names are added to the exception
* message. This could be considered an information leak in some contexts, so
* the default setting is false here for optimum safety.
*/
'display_permission_in_exception' => false,
/*
* When set to true, the required role names are added to the exception
* message. This could be considered an information leak in some contexts, so
* the default setting is false here for optimum safety.
*/
'display_role_in_exception' => false,
/*
* By default wildcard permission lookups are disabled.
*/
'enable_wildcard_permission' => false,
'cache' => [
/*
* By default all permissions are cached for 24 hours to speed up performance.
* When permissions or roles are updated the cache is flushed automatically.
*/
'expiration_time' => \DateInterval::createFromDateString('24 hours'),
/*
* The cache key used to store all permissions.
*/
'key' => 'spatie.permission.cache',
/*
* You may optionally indicate a specific cache driver to use for permission and
* role caching using any of the `store` drivers listed in the cache.php config
* file. Using 'default' here means to use the `default` set in cache.php.
*/
'store' => 'default',
],
];

View File

@ -0,0 +1,29 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreatePermissionsTable extends Migration
{
public function up()
{
$permissionsTable = config('acl.tables.permissions', 'permissions');
Schema::create($permissionsTable, function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name');
$table->string('guard_name');
$table->text('description')->nullable();
$table->softDeletes();
$table->timestamps();
$table->unique(['name', 'guard_name']);
});
}
public function down()
{
$tables = config('acl.tables');
Schema::dropIfExists($tables['permissions']);
}
}

View File

@ -0,0 +1,42 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateGroupsTable extends Migration
{
public function up()
{
$groupsTable = config('acl.tables.groups', 'groups');
$teams = config('acl.teams');
$columnNames = config('acl.column_names');
Schema::create($groupsTable, function (Blueprint $table) use ($teams, $columnNames) {
$table->bigIncrements('id');
if ($teams || config("acl.testing")) {
$table->unsignedBigInteger($columnNames['team_foreign_key'])->nullable();
$table->index($columnNames['team_foreign_key'], 'groups_team_foreign_key_index');
}
$table->string('name');
$table->string('guard_name');
$table->text('description')->nullable();
$table->softDeletes();
$table->timestamps();
if ($teams || config('acl.testing')) {
$table->unique([$columnNames['team_foreign_key'], 'name', 'guard_name']);
} else {
$table->unique(['name', 'guard_name']);
}
});
}
public function down()
{
$groupsTable = config('acl.tables.groups', 'groups');
Schema::dropIfExists($groupsTable);
}
}

View File

@ -0,0 +1,47 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Junges\ACL\AclRegistrar;
class CreateModelHasPermissionsTable extends Migration
{
public function up()
{
$columnNames = config('acl.column_names');
$modelHasPermissions = config('acl.tables.model_has_permissions', 'model_has_permissions');
$permissionsTable = config('acl.tables.permissions', 'permissions');
$teams = config('acl.teams');
Schema::create($modelHasPermissions, function (Blueprint $table) use ($permissionsTable, $columnNames, $teams) {
$table->unsignedBigInteger(AclRegistrar::$pivotPermission);
$table->string('model_type');
$table->unsignedBigInteger($columnNames['model_morph_key']);
$table->index([$columnNames['model_morph_key'], 'model_type'], 'model_has_permissions_id_model_type_index');
$table->foreign(AclRegistrar::$pivotPermission)
->references('id')
->on($permissionsTable)
->cascadeOnDelete();
if ($teams) {
$table->unsignedBigInteger($columnNames['team_foreign_key']);
$table->index($columnNames['team_foreign_key'], 'model_has_permissions_team_foreign_key_index');
$table->primary([$columnNames['team_foreign_key'], AclRegistrar::$pivotPermission, $columnNames['model_morph_key'], 'model_type'],
'model_has_permissions_permission_model_type_primary');
} else {
$table->primary([AclRegistrar::$pivotPermission, $columnNames['model_morph_key'], 'model_type'],
'model_has_permissions_permission_model_type_primary');
}
});
}
public function down()
{
$modelHasPermissionTable = config('acl.tables.model_has_permissions', 'model_has_permissions');
Schema::dropIfExists($modelHasPermissionTable);
}
}

View File

@ -0,0 +1,47 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Junges\ACL\AclRegistrar;
class CreateModelHasGroupsTable extends Migration
{
public function up()
{
$columnNames = config('acl.column_names');
$modelHasGroups = config('acl.tables.model_has_groups', 'model_has_groups');
$groupsTable = config('acl.tables.groups', 'groups');
$teams = config('acl.teams');
Schema::create($modelHasGroups, function (Blueprint $table) use ($groupsTable, $columnNames, $teams) {
$table->unsignedBigInteger(AclRegistrar::$pivotGroup);
$table->string('model_type');
$table->unsignedBigInteger($columnNames['model_morph_key']);
$table->index([$columnNames['model_morph_key'], 'model_type'], 'model_has_groups_model_id_model_type_index');
$table->foreign(AclRegistrar::$pivotGroup)
->references('id')
->on($groupsTable)
->cascadeOnDelete();
if ($teams) {
$table->unsignedBigInteger($columnNames['team_foreign_key']);
$table->index($columnNames['team_foreign_key'], 'model_has_groups_team_foreign_key_index');
$table->primary([$columnNames['team_foreign_key'], AclRegistrar::$pivotGroup, $columnNames['model_morph_key'], 'model_type'],
'model_has_groups_group_model_type_primary');
} else {
$table->primary([AclRegistrar::$pivotGroup, $columnNames['model_morph_key'], 'model_type'],
'model_has_groups_group_model_type_primary');
}
});
}
public function down()
{
$modelHasGroupsTable = config('acl.tables.model_has_groups', 'model_has_groups');
Schema::dropIfExists($modelHasGroupsTable);
}
}

View File

@ -0,0 +1,40 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Junges\ACL\AclRegistrar;
class CreateGroupHasPermissionsTable extends Migration
{
public function up()
{
$groupHasPermissionTable = config('acl.tables.group_has_permissions', 'group_has_permissions');
$groupsTable = config('acl.tables.groups', 'groups');
$permissionsTable = config('acl.tables.permissions', 'permissions');
Schema::create($groupHasPermissionTable, function (Blueprint $table) use ($groupsTable, $permissionsTable) {
$table->unsignedBigInteger(AclRegistrar::$pivotPermission);
$table->unsignedBigInteger(AclRegistrar::$pivotGroup);
$table->foreign(AclRegistrar::$pivotPermission)
->references('id')
->on($permissionsTable)
->cascadeOnDelete();
$table->foreign(AclRegistrar::$pivotGroup)
->references('id')
->on($groupsTable)
->cascadeOnDelete();
$table->primary([AclRegistrar::$pivotPermission, AclRegistrar::$pivotGroup], 'group_has_permission_permission_id_group_id_primary');
});
}
public function down()
{
$groupHasPermissionsTable = config('acl.tables.group_has_permissions', 'group_has_permissions');
Schema::dropIfExists($groupHasPermissionsTable);
}
}

View File

@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class ColumnsAnagrafica extends Migration
class ColumnUsersRoles extends Migration
{
/**
* Run the migrations.
@ -13,13 +13,10 @@ class ColumnsAnagrafica extends Migration
*/
public function up()
{
Schema::table('anagraficas', function (Blueprint $table) {
Schema::table('users', function (Blueprint $table) {
//
$table->longText('ang_indirizzo');
$table->string('ang_CAP');
$table->string('ang_Citta');
$table->string('ang_Provincia');
$table->string('ang_telefono');
$table->softDeletes();
$table->string('user_role',25)->default('user')->nullable(false);
});
}
@ -30,8 +27,10 @@ class ColumnsAnagrafica extends Migration
*/
public function down()
{
Schema::table('anagraficas', function (Blueprint $table) {
Schema::table('users', function (Blueprint $table) {
//
$table->dropColumn('user_role');
$table->dropSoftDeletes();
});
}
}

View File

@ -1,141 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Spatie\Permission\PermissionRegistrar;
class CreatePermissionTables extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
$tableNames = config('permission.table_names');
$columnNames = config('permission.column_names');
$teams = config('permission.teams');
if (empty($tableNames)) {
throw new \Exception('Error: config/permission.php not loaded. Run [php artisan config:clear] and try again.');
}
if ($teams && empty($columnNames['team_foreign_key'] ?? null)) {
throw new \Exception('Error: team_foreign_key on config/permission.php not loaded. Run [php artisan config:clear] and try again.');
}
Schema::create($tableNames['permissions'], function (Blueprint $table) {
$table->bigIncrements('id'); // permission id
$table->string('name'); // For MySQL 8.0 use string('name', 125);
$table->string('guard_name'); // For MySQL 8.0 use string('guard_name', 125);
$table->timestamps();
$table->unique(['name', 'guard_name']);
});
Schema::create($tableNames['roles'], function (Blueprint $table) use ($teams, $columnNames) {
$table->bigIncrements('id'); // role id
if ($teams || config('permission.testing')) { // permission.testing is a fix for sqlite testing
$table->unsignedBigInteger($columnNames['team_foreign_key'])->nullable();
$table->index($columnNames['team_foreign_key'], 'roles_team_foreign_key_index');
}
$table->string('name'); // For MySQL 8.0 use string('name', 125);
$table->string('guard_name'); // For MySQL 8.0 use string('guard_name', 125);
$table->timestamps();
if ($teams || config('permission.testing')) {
$table->unique([$columnNames['team_foreign_key'], 'name', 'guard_name']);
} else {
$table->unique(['name', 'guard_name']);
}
});
Schema::create($tableNames['model_has_permissions'], function (Blueprint $table) use ($tableNames, $columnNames, $teams) {
$table->unsignedBigInteger(PermissionRegistrar::$pivotPermission);
$table->string('model_type');
$table->unsignedBigInteger($columnNames['model_morph_key']);
$table->index([$columnNames['model_morph_key'], 'model_type'], 'model_has_permissions_model_id_model_type_index');
$table->foreign(PermissionRegistrar::$pivotPermission)
->references('id') // permission id
->on($tableNames['permissions'])
->onDelete('cascade');
if ($teams) {
$table->unsignedBigInteger($columnNames['team_foreign_key']);
$table->index($columnNames['team_foreign_key'], 'model_has_permissions_team_foreign_key_index');
$table->primary([$columnNames['team_foreign_key'], PermissionRegistrar::$pivotPermission, $columnNames['model_morph_key'], 'model_type'],
'model_has_permissions_permission_model_type_primary');
} else {
$table->primary([PermissionRegistrar::$pivotPermission, $columnNames['model_morph_key'], 'model_type'],
'model_has_permissions_permission_model_type_primary');
}
});
Schema::create($tableNames['model_has_roles'], function (Blueprint $table) use ($tableNames, $columnNames, $teams) {
$table->unsignedBigInteger(PermissionRegistrar::$pivotRole);
$table->string('model_type');
$table->unsignedBigInteger($columnNames['model_morph_key']);
$table->index([$columnNames['model_morph_key'], 'model_type'], 'model_has_roles_model_id_model_type_index');
$table->foreign(PermissionRegistrar::$pivotRole)
->references('id') // role id
->on($tableNames['roles'])
->onDelete('cascade');
if ($teams) {
$table->unsignedBigInteger($columnNames['team_foreign_key']);
$table->index($columnNames['team_foreign_key'], 'model_has_roles_team_foreign_key_index');
$table->primary([$columnNames['team_foreign_key'], PermissionRegistrar::$pivotRole, $columnNames['model_morph_key'], 'model_type'],
'model_has_roles_role_model_type_primary');
} else {
$table->primary([PermissionRegistrar::$pivotRole, $columnNames['model_morph_key'], 'model_type'],
'model_has_roles_role_model_type_primary');
}
});
Schema::create($tableNames['role_has_permissions'], function (Blueprint $table) use ($tableNames) {
$table->unsignedBigInteger(PermissionRegistrar::$pivotPermission);
$table->unsignedBigInteger(PermissionRegistrar::$pivotRole);
$table->foreign(PermissionRegistrar::$pivotPermission)
->references('id') // permission id
->on($tableNames['permissions'])
->onDelete('cascade');
$table->foreign(PermissionRegistrar::$pivotRole)
->references('id') // role id
->on($tableNames['roles'])
->onDelete('cascade');
$table->primary([PermissionRegistrar::$pivotPermission, PermissionRegistrar::$pivotRole], 'role_has_permissions_permission_id_role_id_primary');
});
app('cache')
->store(config('permission.cache.store') != 'default' ? config('permission.cache.store') : null)
->forget(config('permission.cache.key'));
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
$tableNames = config('permission.table_names');
if (empty($tableNames)) {
throw new \Exception('Error: config/permission.php not found and defaults could not be merged. Please publish the package configuration before proceeding, or drop the tables manually.');
}
Schema::drop($tableNames['role_has_permissions']);
Schema::drop($tableNames['model_has_roles']);
Schema::drop($tableNames['model_has_permissions']);
Schema::drop($tableNames['roles']);
Schema::drop($tableNames['permissions']);
}
}

View File

@ -18,11 +18,5 @@ class CategorieSeeder extends Seeder
DB::table('categories')->insert(
['cat_name'=>'Automobili']
);
DB::table('categories')->insert(
['cat_name'=>'Stipendio']
);
DB::table('categories')->insert(
['cat_name'=>'Utenze']
);
}
}

View File

@ -18,7 +18,6 @@ class DatabaseSeeder extends Seeder
UserSeeder::class,
TagSeeder::class,
CategorieSeeder::class,
RoleSeeder::class,
]);
}
}

View File

@ -1,83 +0,0 @@
<?php
namespace Database\Seeders;
use App\Models\User;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Hash;
use Spatie\Permission\Models\Permission;
use Spatie\Permission\Models\Role;
use Spatie\Permission\PermissionRegistrar;
class RoleSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
// Role Creation
$role_admin = Role::create([
'name' => 'admin'
]);
$role_user = Role::create([
'name' => 'user'
]);
$role_guest = Role::create([
'name' => 'guest'
]);
// Permission Creation
Permission::create([
'name' => 'conti'
]);
Permission::create([
'name' => 'consumi'
]);
Permission::create([
'name' => 'automobili'
]);
Permission::create([
'name' => 'contatti'
]);
Permission::create([
'name' => 'affitti'
]);
Permission::create([
'name' => 'progetti'
]);
Permission::create([
'name' => 'amministrazione'
]);
// Assegnazione permessi al ruolo user
$role_user->givePermissionTo('affitti');
$role_user->givePermissionTo('automobili');
$role_user->givePermissionTo('contatti');
$role_user->givePermissionTo('consumi');
$role_user->givePermissionTo('conti');
$role_user->givePermissionTo('progetti');
// Assegnazione permessi al ruolo guest
$role_guest->givePermissionTo('affitti');
$admin = User::create([
'name'=>'Amministratore',
'email'=>'admin@localhost.local',
'password'=>Hash::make('password'),
])->assignRole($role_admin);
$user = User::create([
'name'=>'Utente',
'email'=>'user@localhost.local',
'password'=>Hash::make('password'),
])->assignRole($role_user);
$guest = User::create([
'name'=>'Guest',
'email'=>'guest@localhost.local',
'password'=>Hash::make('password'),
])->assignRole($role_guest);
}
}

View File

@ -18,8 +18,5 @@ class TagSeeder extends Seeder
DB::table('tags')->insert(
['tag_name'=>'System']
);
DB::table('tags')->insert(
['tag_name'=>'da verificare']
);
}
}

View File

@ -20,11 +20,9 @@ class UserSeeder extends Seeder
DB::table('users')->insert(
[
'name'=>'SystemUser',
'email'=>'system@localhost.local',
'email'=>env('SYSADMIN_MAIL'),
'password'=>Hash::make(Str::random(16)),
]
);
}
}

View File

@ -1,152 +0,0 @@
.u-section-1 .u-sheet-1 {
min-height: 561px;
}
.u-section-1 .u-repeater-1 {
margin-top: 60px;
margin-bottom: 60px;
min-height: 441px;
grid-template-columns: calc(33.3333% - 15px) calc(33.3333% - 15px) calc(33.3333% - 15px);
height: auto;
grid-gap: 22px;
}
.u-section-1 .u-repeater-item-1 {
background-image: none;
}
.u-section-1 .u-container-layout-1 {
padding: 30px 20px;
}
.u-section-1 .u-text-1 {
margin-top: 0;
margin-bottom: 0;
}
.u-section-1 .u-image-1 {
height: 222px;
margin-top: 17px;
margin-bottom: 0;
}
.u-section-1 .u-text-2 {
margin-top: 20px;
margin-bottom: 0;
}
.u-section-1 .u-btn-1 {
background-image: none;
border-style: none none solid;
margin: 17px auto 0 0;
padding: 0;
}
.u-section-1 .u-container-layout-2 {
padding: 30px 20px;
}
.u-section-1 .u-text-3 {
margin-top: 0;
margin-bottom: 0;
}
.u-section-1 .u-image-2 {
height: 222px;
margin-top: 17px;
margin-bottom: 0;
}
.u-section-1 .u-text-4 {
margin-top: 20px;
margin-bottom: 0;
}
.u-section-1 .u-btn-2 {
background-image: none;
border-style: none none solid;
margin: 17px auto 0 0;
padding: 0;
}
.u-section-1 .u-container-layout-3 {
padding: 30px 20px;
}
.u-section-1 .u-text-5 {
margin-top: 0;
margin-bottom: 0;
}
.u-section-1 .u-image-3 {
height: 222px;
margin-top: 17px;
margin-bottom: 0;
}
.u-section-1 .u-text-6 {
margin-top: 20px;
margin-bottom: 0;
}
.u-section-1 .u-btn-3 {
background-image: none;
border-style: none none solid;
margin: 17px auto 0 0;
padding: 0;
}
@media (max-width: 1199px) {
.u-section-1 .u-sheet-1 {
min-height: 484px;
}
.u-section-1 .u-repeater-1 {
min-height: 364px;
grid-template-columns: repeat(3, calc(33.333333333333336% - 15px));
}
}
@media (max-width: 991px) {
.u-section-1 .u-sheet-1 {
min-height: 956px;
}
.u-section-1 .u-repeater-1 {
min-height: 836px;
grid-template-columns: repeat(2, calc(50% - 11.25px));
}
}
@media (max-width: 767px) {
.u-section-1 .u-repeater-1 {
grid-template-columns: 100%;
}
.u-section-1 .u-container-layout-1 {
padding-left: 10px;
padding-right: 10px;
}
.u-section-1 .u-image-1 {
height: 278px;
}
.u-section-1 .u-container-layout-2 {
padding-left: 10px;
padding-right: 10px;
}
.u-section-1 .u-image-2 {
height: 278px;
}
.u-section-1 .u-container-layout-3 {
padding-left: 10px;
padding-right: 10px;
}
.u-section-1 .u-image-3 {
height: 278px;
}
}

186
public/css/Page-2.css vendored
View File

@ -1,186 +0,0 @@
.u-section-1 {
background-image: url("/images/aw.jpg");
background-position: 50% 50%;
}
.u-section-1 .u-sheet-1 {
min-height: 500px;
}
.u-section-1 .u-layout-wrap-1 {
width: 1140px;
margin: 0 auto;
}
.u-section-1 .u-image-1 {
min-height: 691px;
background-image: url("/images/s-min.jpg");
background-position: 50% 50%;
}
.u-section-1 .u-container-layout-1 {
padding: 30px;
}
.u-section-1 .u-layout-cell-2 {
min-height: 691px;
}
.u-section-1 .u-container-layout-2 {
padding: 30px 36px;
}
.u-section-1 .u-text-1 {
font-size: 1.25rem;
font-weight: 700;
line-height: 1.2;
background-image: none;
text-transform: uppercase;
letter-spacing: 5px;
font-family: "PT Sans", sans-serif;
margin: 110px 28px 0 0;
}
.u-section-1 .u-text-2 {
font-size: 4.5rem;
text-transform: uppercase;
letter-spacing: normal;
font-weight: 700;
font-family: "Roboto Condensed", sans-serif;
margin: 0 28px 0 0;
}
.u-section-1 .u-text-3 {
font-size: 1.125rem;
font-style: italic;
margin: 20px 14px 0 0;
}
.u-section-1 .u-text-4 {
margin: 18px auto 0 14px;
}
.u-section-1 .u-btn-1 {
border-style: solid;
padding: 0;
}
.u-section-1 .u-btn-2 {
background-image: none;
text-transform: uppercase;
letter-spacing: 3px;
font-weight: 700;
font-size: 1rem;
border-style: none;
margin: 28px auto 0 0;
padding: 10px 52px 10px 51px;
}
@media (max-width: 1199px) {
.u-section-1 .u-sheet-1 {
min-height: 291px;
}
.u-section-1 .u-layout-wrap-1 {
width: 940px;
}
.u-section-1 .u-image-1 {
min-height: 570px;
}
.u-section-1 .u-layout-cell-2 {
min-height: 570px;
}
.u-section-1 .u-text-1 {
margin-right: 0;
}
.u-section-1 .u-text-2 {
font-size: 3.75rem;
margin-right: 0;
}
.u-section-1 .u-text-3 {
margin-right: 0;
}
}
@media (max-width: 991px) {
.u-section-1 .u-sheet-1 {
min-height: 158px;
}
.u-section-1 .u-layout-wrap-1 {
width: 720px;
}
.u-section-1 .u-image-1 {
min-height: 437px;
}
.u-section-1 .u-layout-cell-2 {
min-height: 100px;
}
.u-section-1 .u-container-layout-2 {
padding-left: 30px;
padding-right: 30px;
}
.u-section-1 .u-text-2 {
font-size: 3rem;
}
}
@media (max-width: 767px) {
.u-section-1 .u-sheet-1 {
min-height: 477px;
}
.u-section-1 .u-layout-wrap-1 {
width: 540px;
}
.u-section-1 .u-image-1 {
min-height: 656px;
order: 1;
}
.u-section-1 .u-container-layout-1 {
padding-left: 10px;
padding-right: 10px;
}
.u-section-1 .u-layout-cell-2 {
order: 0;
}
.u-section-1 .u-container-layout-2 {
padding-left: 10px;
padding-right: 10px;
}
.u-section-1 .u-text-2 {
font-size: 4.5rem;
}
}
@media (max-width: 575px) {
.u-section-1 .u-sheet-1 {
min-height: 234px;
}
.u-section-1 .u-layout-wrap-1 {
width: 340px;
}
.u-section-1 .u-image-1 {
min-height: 413px;
}
.u-section-1 .u-text-2 {
font-size: 2.25rem;
}
}

View File

@ -1,87 +0,0 @@
.u-section-1 .u-sheet-1 {
min-height: 835px;
}
.u-section-1 .u-post-details-1 {
min-height: 375px;
margin-top: 60px;
margin-bottom: -10px;
}
.u-section-1 .u-container-layout-1 {
padding: 30px;
}
.u-section-1 .u-image-1 {
height: 486px;
margin-top: 0;
margin-bottom: 0;
margin-left: 0;
}
.u-section-1 .u-text-1 {
margin-top: 20px;
margin-bottom: 0;
margin-left: 0;
}
.u-section-1 .u-metadata-1 {
margin-top: 30px;
margin-bottom: 0;
margin-left: 0;
}
.u-section-1 .u-text-2 {
margin-bottom: 0;
margin-top: 20px;
margin-left: 0;
}
@media (max-width: 1199px) {
.u-section-1 .u-image-1 {
margin-left: initial;
}
}
@media (max-width: 991px) {
.u-section-1 .u-sheet-1 {
min-height: 782px;
}
.u-section-1 .u-post-details-1 {
margin-bottom: 60px;
}
.u-section-1 .u-image-1 {
height: 423px;
margin-left: initial;
}
}
@media (max-width: 767px) {
.u-section-1 .u-sheet-1 {
min-height: 722px;
}
.u-section-1 .u-container-layout-1 {
padding-left: 10px;
padding-right: 10px;
}
.u-section-1 .u-image-1 {
height: 354px;
margin-top: 9px;
margin-left: initial;
}
}
@media (max-width: 575px) {
.u-section-1 .u-sheet-1 {
min-height: 656px;
}
.u-section-1 .u-image-1 {
height: 275px;
margin-left: initial;
}
}

41239
public/css/nicepage.css vendored

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 KiB

View File

@ -1,21 +1,10 @@
$(document).ready(function() {
$('#automobili').DataTable({
responsive: true
fields: [
{
label:"Data",
type: "datetime"
}
]
});
$('#contatti').DataTable({
responsive: true
fields: [
{
label:"Data",
type: "datetime"
}
]
});
});
$(document).ready(function() {
$('#contatti').DataTable({
responsive: true
});
});

10
public/js/app/auto.js vendored
View File

@ -1,12 +1,6 @@
$(document).ready(function() {
$('#automobili').DataTable({
responsive: true
fields: [
{
label:"Data",
type: "datetime"
}
]
});
});
@ -32,7 +26,7 @@ $(document).on('click', '.open_modal_modify', function() {
$.getJSON(url + '/' + riga_id, function(data) {
$('.modal-title').text('Modifica Automobile');
// $('#id').val(data.mov_data);
// $('#id').val(data.mov_data);
$('#targa').val(data.targa);
$('#marca').val(data.marca);
$('#modello').val(data.modello);
@ -91,4 +85,4 @@ $(document).on('click', '.open_modal_nuovo', function() {
$('#myModal_nuovo').modal('show');
// $('.modal-title').append(' entrata');
$('#form').attr('action', 'movimentie');
});
});

View File

@ -1,42 +1,33 @@
$(document).ready(function() {
$('#listrapportoS').DataTable({
responsive: true,
fields: [
{
label:"Data",
type: "datetime"
}
]
responsive: true
});
});
$(document).ready(function() {
$('#listrapportoE').DataTable({
responsive: true,
fields: [
{
label:"Data",
type: "datetime"
}
]
responsive: true
});
$('#categorie').DataTable({
responsive: true
});
});
$(document).on('click','.open_modal',function(){
var url = "/admin/categorie/modify";
var riga_id= $(this).val();
$.getJSON(url + '/' + riga_id, function (data) {
//success data
console.log(data[0]);
console.log(data[0].cat_name);
$('#H_cat_cat_name').val(data[0].cat_name);
$('#H_cat_id').val(data[0].id);
$('#myModal').modal('show');
});
});
$(document).on('click','.open_modal_new',function(){
$('#myModal_new').modal('show');
});
$(document).ready(function() {
$('#categorie').DataTable({
responsive: true
});
$(document).on('click','.open_modal',function(){
var url = "/admin/categorie/modify";
var riga_id= $(this).val();
$.getJSON(url + '/' + riga_id, function (data) {
//success data
console.log(data[0]);
console.log(data[0].cat_name);
$('#H_cat_cat_name').val(data[0].cat_name);
$('#H_cat_id').val(data[0].id);
$('#myModal').modal('show');
});
});
$(document).on('click','.open_modal_new',function(){
$('#myModal_new').modal('show');
});
});

View File

@ -1,13 +1,6 @@
$(document).ready(function() {
$('#tab_progetti').DataTable({
responsive: true
fields: [
{
label:"Data",
type: "datetime"
}
]
});
});
@ -26,4 +19,4 @@ $.getJSON("progetti/coordinatori", {}, function(data) {
)
}
);
});
});

View File

@ -1,12 +1,6 @@
$(document).ready(function() {
$('#tab_progetti').DataTable({
responsive: true
fields: [
{
label:"Data",
type: "datetime"
}
]
});
$('#form').click(function() {
@ -41,4 +35,4 @@ $(document).ready(function() {
$('#myModal_addRow').modal('show');
// $('#form_new').attr('action', 'progetti/new');
});
});
});

42
public/js/nicepage.js vendored

File diff suppressed because one or more lines are too long

View File

@ -1,9 +1,7 @@
<li><a href="/admin"><i class="fa fa-dashboard fa-fw"></i>Riepilogo</a>
</li>
@can('conti')
<li><a href="#"><i class="fa fa-money fa-fw"></i>Spese/Incassi<span
class="fa arrow"></span></a>
<ul class="nav nav-second-level">
<li><a href="{{ route('movimenti'); }}">Lista Movimenti</a></li>
<li><a href="{{ route('categorie'); }}">Categorie</a></li>
@ -19,9 +17,7 @@
<li><a href="{{ route('importCR'); }}"><i
class="fa fa-upload fa-fw"></i>Importa Estratto CR</a></li>
</ul></li>
</ul> <!-- /.nav-second-level --></li>
@endcan @can('consumi')
<li><a href="#"><i class="fa fa-industry fa-fw"></i> Consumi <span
class="fa arrow"></span></a>
@ -32,10 +28,8 @@
<li><a href="{{ route('enel'); }}"><i class="fa fa-flash fa-fw"></i>Energia
Elettrica</a></li>
</ul></li>
@endcan @can('automobili')
<li><a href="{{ route('auto_list'); }}"><i class="fa fa-car fa-fw"></i>
Automobili <span class="fa arrow"></span></a></li>
@endcan @can('contatti')
<li><a href="#"><i class="fa fa-phone-square fa-fw"></i> Contatti <span
class="fa arrow"></span></a>
@ -46,21 +40,15 @@
<li><a href="{{ route('newContact'); }}"><i class="fa fa-plus fa-fw"></i>Nuovo
contatto</a></li>
</ul></li>
@endcan @can('progetti')
<li><a href="{{ route('progetti'); }}"><i class="fa fa-list fa-fw"></i>
Progetti <span class="fa arrow"></span></a></li>
@endcan @can('amministrazione')
<li><a href="#"><i class="fa fa-gears fa-fw"></i>Amministrazione<span
class="fa arrow"></span></a>
<ul class="nav nav-second-level">
<li><a class="active" href="/admin/users/new">Nuovo Utente</a></li>
<!--
<li><a class="active" href="/admin/users/newRole">Gruppi</a></li>
<li><a class="active" href="/admin/users/newPermission">Permessi</a></li>
-->
<li><a class="active" href="/admin/users/assignRole">Assegna Ruoli</a></li>
<!--
<li><a href="/login">Login Page</a></li>
-->
<li><a class="active" href="#">Utenti</a></li>
<li><a class="active" href="/admin/group/new">Gruppi</a></li>
<li><a class="active" href="/admin/permesso/new">Permessi</a></li>
<li><a class="active" href="/admin/permesso/assign">Assegna Permessi
ai gruppi</a></li>
<li><a href="/login">Login Page</a></li>
</ul> <!-- /.nav-second-level --></li>
@endcan

View File

@ -7,15 +7,10 @@
<ul class="dropdown-menu dropdown-user">
<li><a href="#"><i class="fa fa-user fa-fw"></i> Profilo utente</a></li>
<li><a href="#"><i class="fa fa-gear fa-fw"></i> Impostazioni</a></li>
@role('admin')
<li class="divider"></li>
<li><a href="/admin/users/new"><i class="fa fa-gear fa-fw"></i> Gestisci Utenti</a></li>
@endrole
<li class="divider"></li>
<li><a href="https://github.com/fbarachino/bubofamily/issues/new/choose" target="new"><i class="fa fa-bug fa-fw"></i> Segnala un bug</a></li>
<li class="divider"></li>
<li><a href="{{ route('logout'); }}"><i class="fa fa-sign-out fa-fw"></i>
Logout</a></li>
</ul></li>
<!-- https://spatie.be/docs/laravel-permission/v5/basic-usage/new-app -->
<!-- /USERMENU -->

View File

@ -6,7 +6,6 @@
</div>
</div>
<div class="row">
@hasanyrole('user|admin')
<!-- WIDGET Bilancio -->
<div class="col-lg-4 col-md-8">
<div class="panel panel-primary">
@ -53,7 +52,6 @@
</a>
</div>
</div>
@endhasanyrole
</div>
@endsection

View File

@ -1,70 +0,0 @@
@extends('admin') @section('content')
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">Nuovo utente</h1>
</div>
</div>
<div class="container">
<!-- INIZIO CONTENUTO -->
<div class="row">
<form action="" method="post">
@csrf
<div class="row">
<div class="col-xs-6">
<label for="name" class="form-label">Nome</label> <input
type="text" class="form-control" id="name" name="name">
</div>
<div class="col-xs-6">
<label for="email" class="form-label">E-Mail</label> <input
type="text" class="form-control" id="email" name="email">
</div>
</div>
<div class="row">
<div class="col-xs-6">
<label for="password" class="form-label">Password</label> <input
type="password" class="form-control" id="password" name="password">
</div>
<div class="col-xs-6">
<label for="role" class="form-label">Ruolo</label> <select
class="form-control" id="role" name="role"> @foreach($ruoli as
$ruolo)
<option value="{{ $ruolo->id }}">{{$ruolo->name}}</option>
@endforeach
</select>
</div>
</div>
<div class="row">
<input type="submit" name="submit" value="Nuovo">
</div>
</form>
</div>
<div class="row">&nbsp;
</div>
<div class="row">
<div class="table-responsive">
<table class="table table-striped table-bordered table-hover"
id="users">
<thead>
<tr>
<th>Nome</th>
<th>Email</th>
<th>Azioni</th>
</tr>
</thead>
<tbody>
@foreach($users as $user)
<tr>
<td>{{ $user->name }}</td>
<td>{{ $user->email }}</td>
<td><a href="/admin/users/delete/{{ $user->id }}" class="button">Cancella</a></td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
<!-- FINE CONTENUTO -->
</div>
@endsection

View File

@ -0,0 +1,73 @@
<input type="hidden" value="{{ csrf_token() }}" name="_token" id="_token">
<div class="form-group">
<label for="group-name">Nome:</label>
<input type="text"
id="group-name"
minlength="3"
name="name"
placeholder="Informe o nome do novo grupo"
value="{{ isset($group) ? $group->name : old('name') }}"
class="form-control">
@if($errors->has('name'))
<span class="text-danger">{{ $errors->first('name') }}</span>
@endif
</div>
<div class="form-group">
<label for="group-slug">Slug do grupo:</label>
<input type="text"
id="group-slug"
minlength="3"
name="slug"
placeholder="Informe o nome do novo grupo"
value="{{ isset($group) ? $group->slug : old('slug') }}"
class="form-control">
@if($errors->has('slug'))
<span class="text-danger">{{ $errors->first('slug') }}</span>
@endif
</div>
<label for="group-description">Descrição:</label>
<div class="form-group">
<textarea name="description"
id="group-description"
placeholder="Informe a descrição deste grupo"
minlength="5"
class="form-control"
cols="30" rows="10">{{ isset($group) ? $group->description : old('description') }}</textarea>
@if($errors->has('description'))
<span class="text-danger">{{ $errors->first('description') }}</span>
@endif
</div>
<div class="form-group">
<label for="group-permissions">Permissões:</label>
<select name="permissions[]"
style="width: 100%"
multiple
id="group-permissions"
class="form-control">
@if(isset($group))
@foreach($permissions as $permission)
<option value="{{ $permission->id }}"
{{ ($group->hasPermission($permission->id) ? 'selected' : '') }}
@if(old('$permissions') != null)
{{ (in_array($permission->id, old('permissions')) ? 'selected' : '') }}
@endif
>
{{ $permission->name }}
</option>
@endforeach
@else
@foreach($permissions as $permission)
<option value="{{ $permission->id }}"
@if(old('permissions') != null)
{{ in_array($permission->id, old('permissions')) ? 'selected' : '' }}
@endif
>
{{ $permission->name }}
</option>
@endforeach
@endif
</select>
@if($errors->has('permissions'))
<span class="text-danger">{{ $errors->first('permissions') }}</span>
@endif
</div>

View File

@ -0,0 +1,56 @@
<div class="form-group">
<label for="users">Selecione o usuário</label>
<select name="user"
id="users"
class="form-control">
@if(isset($user))
@foreach($users as $u)
<option value="{{ $u->id }}"
@if(($u->id == $user->id) || ($u->id == old('user')))
selected
@endif
>
{{ $u->name }}
</option>
@endforeach
@else
@foreach($users as $u)
<option value="{{ $u->id }}" {{ $u->id == old('user') ? 'selected' : '' }}>
{{ $u->name }}
</option>
@endforeach
@endif
</select>
@if($errors->has('users'))
<small class="text-danger">{{ $errors->first('users') }}</small>
@endif
</div>
<div class="form-group">
<label for="groups">Selecione os grupos:</label>
<select name="groups[]"
multiple="multiple"
id="groups" class="form-control">
@if(isset($user))
@foreach($groups as $g)
<option value="{{ $g->id }}"
{{ $user->hasGroup($g) ? 'selected' : '' }}
@if(old('groups') != null)
{{ (in_array($g->id, old('groups')) ? 'selected' : '') }}
@endif
>
{{ $g->name }}
</option>
@endforeach
@else
@foreach($groups as $g)
<option value="{{ $g->id }}"
@if(old('groups') != null)
{{ in_array($g->id, old('groups')) ? 'selected' : '' }}
@endif
>
{{ $g->name }}
</option>
@endforeach
@endif
</select>
</div>

View File

@ -0,0 +1,59 @@
@csrf
<div class="form-group">
<label for="user">Selecione o usuário:</label>
<select name="user"
id="user"
class="form-control">
@if(isset($user))
@foreach($users as $u)
<option value="{{ $user->id }}"
@if(($u->id == $user->id) || ($u->id == old('user')))
selected
@endif
>
{{ $u->name }}</option>
@endforeach
@else
@foreach($users as $u)
<option value="{{ $u->id }}" {{ $u->id == old('user') ? 'selected' : '' }}>
{{ $u->name }}</option>
@endforeach
@endif
</select>
@if($errors->has('user'))
<small class="text-danger">{{ $errors->first('user') }}</small>
@endif
</div>
<div class="form-group">
<label for="user-permissions">Permissões:</label>
<select name="permissions[]"
style="width: 100%"
multiple
id="user-permissions"
class="form-control">
@if(isset($user))
@foreach($permissions as $permission)
<option value="{{ $permission->id }}"
{{ ($user->hasDirectPermission($permission->slug) ? 'selected' : '') }}
@if(old('$permissions') != null)
{{ (in_array($permission->id, old('permissions')) ? 'selected' : '') }}
@endif
>
{{ $permission->name }}
</option>
@endforeach
@else
@foreach($permissions as $permission)
<option value="{{ $permission->id }}"
@if(old('permissions') != null)
{{ in_array($permission->id, old('permissions')) ? 'selected' : '' }}
@endif
>
{{ $permission->name }}
</option>
@endforeach
@endif
</select>
@if($errors->has('permissions'))
<span class="text-danger">{{ $errors->first('permissions') }}</span>
@endif

View File

@ -0,0 +1,44 @@
@extends('admin')
@section('content')
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">Assegnazione Permessi</h1>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="panel panel-default">
<div class="panel-heading">
Assegnazione dei permessi ai gruppi
</div>
<div class="panel-body">
<form action="" method="POST">
@csrf
<div class="mb-3">
<label for="permesso" class="form-label">Permesso:</label>
<select name="permesso" id="permesso">
@foreach($permessi as $permesso)
<option value="{{ $permesso->name; }}">{{ $permesso->name; }}</option>
@endforeach
</select>
</div>
<div class="mb-3">
<label for="gruppo" class="form-label">Gruppo:</label>
<select name="gruppo" id="gruppo">
@foreach($gruppi as $gruppo)
<option value="{{ $gruppo->name; }}">{{ $gruppo->name; }}</option>
@endforeach
</select>
</div>
<input type="submit" value="submit">
</form>
</div>
</div>
</div>
</div>
@endsection

View File

@ -0,0 +1,67 @@
@extends('admin')
@section('content')
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">Gruppi</h1>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="panel panel-default">
<div class="panel-heading">
Inserimento dei gruppi
</div>
<div class="panel-body">
<form action="" method="POST">
@csrf
<div class="mb-3">
<label for="gruppo" class="form-label">Gruppo:</label>
<input type="text" class="form-control" name="gruppo" id="gruppo"/>
</div>
<div class="mb-3">
<label for="descrizione" class="form-label">Descrizione:</label>
<textarea name="descrizione" class="form-control" id="descrizione"></textarea>
</div>
<input type="submit" value="submit">
</form>
</div>
</div>
<div class="panel-heading">
Gruppi inseriti
</div>
<div class="panel-body">
<div class="table-responsive">
<table class="table table-striped table-bordered table-hover" id="tab_gruppi">
<thead>
<tr>
<th>Gruppo</th>
<th>Descrizione</th>
</tr>
</thead>
<tbody>
@foreach($gruppi as $gruppo)
<tr>
<td>{{ $gruppo->name ?? ''; }}</td>
<td>{{ $gruppo->description ?? ''; }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
@endsection
@section('script')
<script>
$(document).ready(function() {
$('#tab_gruppi').DataTable({
responsive: true
});
});
</script>
@endsection

View File

@ -0,0 +1,67 @@
@extends('admin')
@section('content')
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">Permessi</h1>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="panel panel-default">
<div class="panel-heading">
Inserimento dei permessi
</div>
<div class="panel-body">
<form action="" method="POST">
@csrf
<div class="mb-3">
<label for="permesso" class="form-label">Permesso:</label>
<input type="text" class="form-control" name="permesso" id="permesso"/>
</div>
<div class="mb-3">
<label for="descrizione" class="form-label">Descrizione:</label>
<textarea name="descrizione" class="form-control" id="descrizione"></textarea>
</div>
<input type="submit" value="submit">
</form>
</div>
</div>
<div class="panel-heading">
Permessi inseriti
</div>
<div class="panel-body">
<div class="table-responsive">
<table class="table table-striped table-bordered table-hover" id="tab_permessi">
<thead>
<tr>
<th>Permesso</th>
<th>Descrizione</th>
</tr>
</thead>
<tbody>
@foreach($permessi as $permesso)
<tr>
<td>{{ $permesso->name ?? ''; }}</td>
<td>{{ $permesso->description ?? ''; }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
@endsection
@section('script')
<script>
$(document).ready(function() {
$('#tab_permessi').DataTable({
responsive: true
});
});
</script>
@endsection

View File

@ -1,104 +1,132 @@
<!DOCTYPE html>
<html style="font-size: 16px;" lang="it"><head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="utf-8">
<meta name="keywords" content="Gestionale per la famiglia">
<meta name="description" content="">
<title>Gestionale di Famiglia</title>
<link rel="stylesheet" href="/css/nicepage.css" media="screen">
<link rel="stylesheet" href="/css/Page-2.css" media="screen">
<script class="u-script" type="text/javascript" src="/js/jquery-1.9.1.min.js" defer=""></script>
<script class="u-script" type="text/javascript" src="/js/nicepage.js" defer=""></script>
<meta name="generator" content="Nicepage 5.10.13, nicepage.com">
<link id="u-theme-google-font" rel="stylesheet" href="https://fonts.googleapis.com/css?family=Oswald:200,300,400,500,600,700|Open+Sans:300,300i,400,400i,500,500i,600,600i,700,700i,800,800i">
<link id="u-page-google-font" rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700,700i|Roboto+Condensed:300,300i,400,400i,700,700i|Oswald:200,300,400,500,600,700">
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Laravel</title>
<script type="application/ld+json">{
"@context": "http://schema.org",
"@type": "Organization",
"name": "",
"logo": "images/default-logo.png"
}</script>
<meta name="theme-color" content="#017189">
<meta property="og:title" content="Page 2">
<meta property="og:type" content="website">
<meta data-intl-tel-input-cdn-path="intlTelInput/"></head>
<body data-home-page="https://website5050367.nicepage.io/Page-2.html?version=1b11a401-169c-4f84-9a9e-fd1d979f95dd" data-home-page-title="Page 2" class="u-body u-xl-mode" data-lang="it"><!--<header class="u-clearfix u-header u-header" id="sec-ce6c"><div class="u-clearfix u-sheet u-valign-middle u-sheet-1">
<!--<a href="https://nicepage.com" class="u-image u-logo u-image-1">
<img src="images/default-logo.png" class="u-logo-image u-logo-image-1">
</a>
<nav class="u-menu u-menu-hamburger u-offcanvas u-menu-1" data-responsive-from="XL">
<div class="menu-collapse" style="font-size: 1rem; letter-spacing: 0px; font-weight: 700;">
<a class="u-button-style u-custom-active-border-color u-custom-border u-custom-border-color u-custom-borders u-custom-hover-border-color u-custom-left-right-menu-spacing u-custom-padding-bottom u-custom-text-active-color u-custom-text-color u-custom-text-hover-color u-custom-top-bottom-menu-spacing u-nav-link u-text-active-palette-1-base u-text-hover-palette-2-base" href="#">
<svg class="u-svg-link" viewBox="0 0 24 24"><use xlink:href="#menu-hamburger"></use></svg>
<svg class="u-svg-content" version="1.1" id="menu-hamburger" viewBox="0 0 16 16" x="0px" y="0px" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg"><g><rect y="1" width="16" height="2"></rect><rect y="7" width="16" height="2"></rect><rect y="13" width="16" height="2"></rect>
</g></svg>
</a>
</div>
<div class="u-custom-menu u-nav-container">
<ul class="u-nav u-spacing-0 u-unstyled u-nav-1">
<li class="u-nav-item">
<a class="u-border-2 u-border-active-grey-30 u-border-grey-30 u-border-hover-grey-30 u-border-no-bottom u-border-no-left u-border-no-top u-button-style u-nav-link u-text-active-palette-2-base u-text-grey-90 u-text-hover-palette-2-base" href="#" style="padding: 0px 20px;">home</a>
</li>
</ul>
</div>
<div class="u-custom-menu u-nav-container-collapse">
<div class="u-black u-container-style u-inner-container-layout u-opacity u-opacity-95 u-sidenav">
<div class="u-inner-container-layout u-sidenav-overflow">
<div class="u-menu-close"></div>
<ul class="u-align-center u-nav u-popupmenu-items u-unstyled u-nav-2"><li class="u-nav-item"><a class="u-button-style u-nav-link" href="#" style="padding: 10px 20px;">home</a>
</li></ul>
</div>
</div>
<div class="u-black u-menu-overlay u-opacity u-opacity-70"></div>
</div>
</nav>
</div</header>-->
<section class="u-clearfix u-image u-section-1" id="carousel_4bca">
<div class="u-clearfix u-sheet u-sheet-1">
<div class="u-clearfix u-layout-wrap u-layout-wrap-1">
<div class="u-layout">
<div class="u-layout-row">
<div class="u-container-style u-image u-layout-cell u-left-cell u-size-30 u-image-1">
<div class="u-container-layout u-container-layout-1"></div>
</div>
<div class="u-align-left u-container-style u-layout-cell u-right-cell u-size-30 u-layout-cell-2">
<div class="u-container-layout u-container-layout-2">
<h5 class="u-custom-font u-font-pt-sans u-text u-text-1">FAMILYBOOK</h5>
<h1 class="u-custom-font u-font-roboto-condensed u-text u-text-palette-2-base u-text-2">Gestionale di famiglia<br>
</h1>
<p class="u-text u-text-3">Un aiuto per gestire la contabilità, e non solo, per la famiglia</p>
<!-- Fonts -->
<link href="https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap" rel="stylesheet">
</p>
<a href="/admin/" class="u-black u-border-radius-0 u-btn u-btn-rectangle u-button-style u-custom-font u-font-oswald u-hover-palette-2-base u-btn-2">Accedi</a>
<!-- Styles -->
<style>
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}a{background-color:transparent}[hidden]{display:none}html{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}*,:after,:before{box-sizing:border-box;border:0 solid #e2e8f0}a{color:inherit;text-decoration:inherit}svg,video{display:block;vertical-align:middle}video{max-width:100%;height:auto}.bg-white{--bg-opacity:1;background-color:#fff;background-color:rgba(255,255,255,var(--bg-opacity))}.bg-gray-100{--bg-opacity:1;background-color:#f7fafc;background-color:rgba(247,250,252,var(--bg-opacity))}.border-gray-200{--border-opacity:1;border-color:#edf2f7;border-color:rgba(237,242,247,var(--border-opacity))}.border-t{border-top-width:1px}.flex{display:flex}.grid{display:grid}.hidden{display:none}.items-center{align-items:center}.justify-center{justify-content:center}.font-semibold{font-weight:600}.h-5{height:1.25rem}.h-8{height:2rem}.h-16{height:4rem}.text-sm{font-size:.875rem}.text-lg{font-size:1.125rem}.leading-7{line-height:1.75rem}.mx-auto{margin-left:auto;margin-right:auto}.ml-1{margin-left:.25rem}.mt-2{margin-top:.5rem}.mr-2{margin-right:.5rem}.ml-2{margin-left:.5rem}.mt-4{margin-top:1rem}.ml-4{margin-left:1rem}.mt-8{margin-top:2rem}.ml-12{margin-left:3rem}.-mt-px{margin-top:-1px}.max-w-6xl{max-width:72rem}.min-h-screen{min-height:100vh}.overflow-hidden{overflow:hidden}.p-6{padding:1.5rem}.py-4{padding-top:1rem;padding-bottom:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.pt-8{padding-top:2rem}.fixed{position:fixed}.relative{position:relative}.top-0{top:0}.right-0{right:0}.shadow{box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px 0 rgba(0,0,0,.06)}.text-center{text-align:center}.text-gray-200{--text-opacity:1;color:#edf2f7;color:rgba(237,242,247,var(--text-opacity))}.text-gray-300{--text-opacity:1;color:#e2e8f0;color:rgba(226,232,240,var(--text-opacity))}.text-gray-400{--text-opacity:1;color:#cbd5e0;color:rgba(203,213,224,var(--text-opacity))}.text-gray-500{--text-opacity:1;color:#a0aec0;color:rgba(160,174,192,var(--text-opacity))}.text-gray-600{--text-opacity:1;color:#718096;color:rgba(113,128,150,var(--text-opacity))}.text-gray-700{--text-opacity:1;color:#4a5568;color:rgba(74,85,104,var(--text-opacity))}.text-gray-900{--text-opacity:1;color:#1a202c;color:rgba(26,32,44,var(--text-opacity))}.underline{text-decoration:underline}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.w-5{width:1.25rem}.w-8{width:2rem}.w-auto{width:auto}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}@media (min-width:640px){.sm\:rounded-lg{border-radius:.5rem}.sm\:block{display:block}.sm\:items-center{align-items:center}.sm\:justify-start{justify-content:flex-start}.sm\:justify-between{justify-content:space-between}.sm\:h-20{height:5rem}.sm\:ml-0{margin-left:0}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:pt-0{padding-top:0}.sm\:text-left{text-align:left}.sm\:text-right{text-align:right}}@media (min-width:768px){.md\:border-t-0{border-top-width:0}.md\:border-l{border-left-width:1px}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (min-width:1024px){.lg\:px-8{padding-left:2rem;padding-right:2rem}}@media (prefers-color-scheme:dark){.dark\:bg-gray-800{--bg-opacity:1;background-color:#2d3748;background-color:rgba(45,55,72,var(--bg-opacity))}.dark\:bg-gray-900{--bg-opacity:1;background-color:#1a202c;background-color:rgba(26,32,44,var(--bg-opacity))}.dark\:border-gray-700{--border-opacity:1;border-color:#4a5568;border-color:rgba(74,85,104,var(--border-opacity))}.dark\:text-white{--text-opacity:1;color:#fff;color:rgba(255,255,255,var(--text-opacity))}.dark\:text-gray-400{--text-opacity:1;color:#cbd5e0;color:rgba(203,213,224,var(--text-opacity))}.dark\:text-gray-500{--tw-text-opacity:1;color:#6b7280;color:rgba(107,114,128,var(--tw-text-opacity))}}
</style>
<style>
body {
font-family: 'Nunito', sans-serif;
}
</style>
</head>
<body class="antialiased">
<div class="relative flex items-top justify-center min-h-screen bg-gray-100 dark:bg-gray-900 sm:items-center py-4 sm:pt-0">
@if (Route::has('login'))
<div class="hidden fixed top-0 right-0 px-6 py-4 sm:block">
@auth
<a href="{{ url('/home') }}" class="text-sm text-gray-700 dark:text-gray-500 underline">Home</a>
@else
<a href="{{ route('login') }}" class="text-sm text-gray-700 dark:text-gray-500 underline">Log in</a>
@if (Route::has('register'))
<a href="{{ route('register') }}" class="ml-4 text-sm text-gray-700 dark:text-gray-500 underline">Register</a>
@endif
@endauth
</div>
@endif
<div class="max-w-6xl mx-auto sm:px-6 lg:px-8">
<div class="flex justify-center pt-8 sm:justify-start sm:pt-0">
<svg viewBox="0 0 651 192" fill="none" xmlns="http://www.w3.org/2000/svg" class="h-16 w-auto text-gray-700 sm:h-20">
<g clip-path="url(#clip0)" fill="#EF3B2D">
<path d="M248.032 44.676h-16.466v100.23h47.394v-14.748h-30.928V44.676zM337.091 87.202c-2.101-3.341-5.083-5.965-8.949-7.875-3.865-1.909-7.756-2.864-11.669-2.864-5.062 0-9.69.931-13.89 2.792-4.201 1.861-7.804 4.417-10.811 7.661-3.007 3.246-5.347 6.993-7.016 11.239-1.672 4.249-2.506 8.713-2.506 13.389 0 4.774.834 9.26 2.506 13.459 1.669 4.202 4.009 7.925 7.016 11.169 3.007 3.246 6.609 5.799 10.811 7.66 4.199 1.861 8.828 2.792 13.89 2.792 3.913 0 7.804-.955 11.669-2.863 3.866-1.908 6.849-4.533 8.949-7.875v9.021h15.607V78.182h-15.607v9.02zm-1.431 32.503c-.955 2.578-2.291 4.821-4.009 6.73-1.719 1.91-3.795 3.437-6.229 4.582-2.435 1.146-5.133 1.718-8.091 1.718-2.96 0-5.633-.572-8.019-1.718-2.387-1.146-4.438-2.672-6.156-4.582-1.719-1.909-3.032-4.152-3.938-6.73-.909-2.577-1.36-5.298-1.36-8.161 0-2.864.451-5.585 1.36-8.162.905-2.577 2.219-4.819 3.938-6.729 1.718-1.908 3.77-3.437 6.156-4.582 2.386-1.146 5.059-1.718 8.019-1.718 2.958 0 5.656.572 8.091 1.718 2.434 1.146 4.51 2.674 6.229 4.582 1.718 1.91 3.054 4.152 4.009 6.729.953 2.577 1.432 5.298 1.432 8.162-.001 2.863-.479 5.584-1.432 8.161zM463.954 87.202c-2.101-3.341-5.083-5.965-8.949-7.875-3.865-1.909-7.756-2.864-11.669-2.864-5.062 0-9.69.931-13.89 2.792-4.201 1.861-7.804 4.417-10.811 7.661-3.007 3.246-5.347 6.993-7.016 11.239-1.672 4.249-2.506 8.713-2.506 13.389 0 4.774.834 9.26 2.506 13.459 1.669 4.202 4.009 7.925 7.016 11.169 3.007 3.246 6.609 5.799 10.811 7.66 4.199 1.861 8.828 2.792 13.89 2.792 3.913 0 7.804-.955 11.669-2.863 3.866-1.908 6.849-4.533 8.949-7.875v9.021h15.607V78.182h-15.607v9.02zm-1.432 32.503c-.955 2.578-2.291 4.821-4.009 6.73-1.719 1.91-3.795 3.437-6.229 4.582-2.435 1.146-5.133 1.718-8.091 1.718-2.96 0-5.633-.572-8.019-1.718-2.387-1.146-4.438-2.672-6.156-4.582-1.719-1.909-3.032-4.152-3.938-6.73-.909-2.577-1.36-5.298-1.36-8.161 0-2.864.451-5.585 1.36-8.162.905-2.577 2.219-4.819 3.938-6.729 1.718-1.908 3.77-3.437 6.156-4.582 2.386-1.146 5.059-1.718 8.019-1.718 2.958 0 5.656.572 8.091 1.718 2.434 1.146 4.51 2.674 6.229 4.582 1.718 1.91 3.054 4.152 4.009 6.729.953 2.577 1.432 5.298 1.432 8.162 0 2.863-.479 5.584-1.432 8.161zM650.772 44.676h-15.606v100.23h15.606V44.676zM365.013 144.906h15.607V93.538h26.776V78.182h-42.383v66.724zM542.133 78.182l-19.616 51.096-19.616-51.096h-15.808l25.617 66.724h19.614l25.617-66.724h-15.808zM591.98 76.466c-19.112 0-34.239 15.706-34.239 35.079 0 21.416 14.641 35.079 36.239 35.079 12.088 0 19.806-4.622 29.234-14.688l-10.544-8.158c-.006.008-7.958 10.449-19.832 10.449-13.802 0-19.612-11.127-19.612-16.884h51.777c2.72-22.043-11.772-40.877-33.023-40.877zm-18.713 29.28c.12-1.284 1.917-16.884 18.589-16.884 16.671 0 18.697 15.598 18.813 16.884h-37.402zM184.068 43.892c-.024-.088-.073-.165-.104-.25-.058-.157-.108-.316-.191-.46-.056-.097-.137-.176-.203-.265-.087-.117-.161-.242-.265-.345-.085-.086-.194-.148-.29-.223-.109-.085-.206-.182-.327-.252l-.002-.001-.002-.002-35.648-20.524a2.971 2.971 0 00-2.964 0l-35.647 20.522-.002.002-.002.001c-.121.07-.219.167-.327.252-.096.075-.205.138-.29.223-.103.103-.178.228-.265.345-.066.089-.147.169-.203.265-.083.144-.133.304-.191.46-.031.085-.08.162-.104.25-.067.249-.103.51-.103.776v38.979l-29.706 17.103V24.493a3 3 0 00-.103-.776c-.024-.088-.073-.165-.104-.25-.058-.157-.108-.316-.191-.46-.056-.097-.137-.176-.203-.265-.087-.117-.161-.242-.265-.345-.085-.086-.194-.148-.29-.223-.109-.085-.206-.182-.327-.252l-.002-.001-.002-.002L40.098 1.396a2.971 2.971 0 00-2.964 0L1.487 21.919l-.002.002-.002.001c-.121.07-.219.167-.327.252-.096.075-.205.138-.29.223-.103.103-.178.228-.265.345-.066.089-.147.169-.203.265-.083.144-.133.304-.191.46-.031.085-.08.162-.104.25-.067.249-.103.51-.103.776v122.09c0 1.063.568 2.044 1.489 2.575l71.293 41.045c.156.089.324.143.49.202.078.028.15.074.23.095a2.98 2.98 0 001.524 0c.069-.018.132-.059.2-.083.176-.061.354-.119.519-.214l71.293-41.045a2.971 2.971 0 001.489-2.575v-38.979l34.158-19.666a2.971 2.971 0 001.489-2.575V44.666a3.075 3.075 0 00-.106-.774zM74.255 143.167l-29.648-16.779 31.136-17.926.001-.001 34.164-19.669 29.674 17.084-21.772 12.428-43.555 24.863zm68.329-76.259v33.841l-12.475-7.182-17.231-9.92V49.806l12.475 7.182 17.231 9.92zm2.97-39.335l29.693 17.095-29.693 17.095-29.693-17.095 29.693-17.095zM54.06 114.089l-12.475 7.182V46.733l17.231-9.92 12.475-7.182v74.537l-17.231 9.921zM38.614 7.398l29.693 17.095-29.693 17.095L8.921 24.493 38.614 7.398zM5.938 29.632l12.475 7.182 17.231 9.92v79.676l.001.005-.001.006c0 .114.032.221.045.333.017.146.021.294.059.434l.002.007c.032.117.094.222.14.334.051.124.088.255.156.371a.036.036 0 00.004.009c.061.105.149.191.222.288.081.105.149.22.244.314l.008.01c.084.083.19.142.284.215.106.083.202.178.32.247l.013.005.011.008 34.139 19.321v34.175L5.939 144.867V29.632h-.001zm136.646 115.235l-65.352 37.625V148.31l48.399-27.628 16.953-9.677v33.862zm35.646-61.22l-29.706 17.102V66.908l17.231-9.92 12.475-7.182v33.841z"/>
</g>
</svg>
</div>
<div class="mt-8 bg-white dark:bg-gray-800 overflow-hidden shadow sm:rounded-lg">
<div class="grid grid-cols-1 md:grid-cols-2">
<div class="p-6">
<div class="flex items-center">
<svg fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24" class="w-8 h-8 text-gray-500"><path d="M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253"></path></svg>
<div class="ml-4 text-lg leading-7 font-semibold"><a href="https://laravel.com/docs" class="underline text-gray-900 dark:text-white">Documentation</a></div>
</div>
<div class="ml-12">
<div class="mt-2 text-gray-600 dark:text-gray-400 text-sm">
Laravel has wonderful, thorough documentation covering every aspect of the framework. Whether you are new to the framework or have previous experience with Laravel, we recommend reading all of the documentation from beginning to end.
</div>
</div>
</div>
<div class="p-6 border-t border-gray-200 dark:border-gray-700 md:border-t-0 md:border-l">
<div class="flex items-center">
<svg fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24" class="w-8 h-8 text-gray-500"><path d="M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z"></path><path d="M15 13a3 3 0 11-6 0 3 3 0 016 0z"></path></svg>
<div class="ml-4 text-lg leading-7 font-semibold"><a href="https://laracasts.com" class="underline text-gray-900 dark:text-white">Laracasts</a></div>
</div>
<div class="ml-12">
<div class="mt-2 text-gray-600 dark:text-gray-400 text-sm">
Laracasts offers thousands of video tutorials on Laravel, PHP, and JavaScript development. Check them out, see for yourself, and massively level up your development skills in the process.
</div>
</div>
</div>
<div class="p-6 border-t border-gray-200 dark:border-gray-700">
<div class="flex items-center">
<svg fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24" class="w-8 h-8 text-gray-500"><path d="M7 8h10M7 12h4m1 8l-4-4H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-3l-4 4z"></path></svg>
<div class="ml-4 text-lg leading-7 font-semibold"><a href="https://laravel-news.com/" class="underline text-gray-900 dark:text-white">Laravel News</a></div>
</div>
<div class="ml-12">
<div class="mt-2 text-gray-600 dark:text-gray-400 text-sm">
Laravel News is a community driven portal and newsletter aggregating all of the latest and most important news in the Laravel ecosystem, including new package releases and tutorials.
</div>
</div>
</div>
<div class="p-6 border-t border-gray-200 dark:border-gray-700 md:border-l">
<div class="flex items-center">
<svg fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24" class="w-8 h-8 text-gray-500"><path d="M3.055 11H5a2 2 0 012 2v1a2 2 0 002 2 2 2 0 012 2v2.945M8 3.935V5.5A2.5 2.5 0 0010.5 8h.5a2 2 0 012 2 2 2 0 104 0 2 2 0 012-2h1.064M15 20.488V18a2 2 0 012-2h3.064M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
<div class="ml-4 text-lg leading-7 font-semibold text-gray-900 dark:text-white">Vibrant Ecosystem</div>
</div>
<div class="ml-12">
<div class="mt-2 text-gray-600 dark:text-gray-400 text-sm">
Laravel's robust library of first-party tools and libraries, such as <a href="https://forge.laravel.com" class="underline">Forge</a>, <a href="https://vapor.laravel.com" class="underline">Vapor</a>, <a href="https://nova.laravel.com" class="underline">Nova</a>, and <a href="https://envoyer.io" class="underline">Envoyer</a> help you take your projects to the next level. Pair them with powerful open source libraries like <a href="https://laravel.com/docs/billing" class="underline">Cashier</a>, <a href="https://laravel.com/docs/dusk" class="underline">Dusk</a>, <a href="https://laravel.com/docs/broadcasting" class="underline">Echo</a>, <a href="https://laravel.com/docs/horizon" class="underline">Horizon</a>, <a href="https://laravel.com/docs/sanctum" class="underline">Sanctum</a>, <a href="https://laravel.com/docs/telescope" class="underline">Telescope</a>, and more.
</div>
</div>
</div>
</div>
</div>
<div class="flex justify-center mt-4 sm:items-center sm:justify-between">
<div class="text-center text-sm text-gray-500 sm:text-left">
<div class="flex items-center">
<svg fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24" stroke="currentColor" class="-mt-px w-5 h-5 text-gray-400">
<path d="M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 11-4 0 2 2 0 014 0z"></path>
</svg>
<a href="https://laravel.bigcartel.com" class="ml-1 underline">
Shop
</a>
<svg fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24" class="ml-4 -mt-px w-5 h-5 text-gray-400">
<path d="M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z"></path>
</svg>
<a href="https://github.com/sponsors/taylorotwell" class="ml-1 underline">
Sponsor
</a>
</div>
</div>
<div class="ml-4 text-center text-sm text-gray-500 sm:text-right sm:ml-0">
Laravel v{{ Illuminate\Foundation\Application::VERSION }} (PHP v{{ PHP_VERSION }})
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<footer class="u-align-center u-clearfix u-footer u-grey-80 u-footer" id="sec-6f1d"><div class="u-clearfix u-sheet u-sheet-1">
<p class="u-small-text u-text u-text-variant u-text-1">(C) 2023 - Flavio Barachino - all rights reserved&nbsp;</p>
</div></footer>
<section class="u-backlink u-clearfix u-grey-80">
<p class="u-text ">
<span>Image by </span>
<a class="u-link" href="https://www.freepik.com/photos/background" ">Freepik</a>
<span> - </span>
<a class="u-link" href="https://nicepage.com/website-templates" target="_blank">
<span>Website Templates</span>
</a>
<p class="u-text">
<span>created with</span>
</p>
<a class="u-link" href="" target="_blank">
<span>Website Builder Software</span>
</a>.
</section>
</body></html>
</body>
</html>

View File

@ -32,7 +32,6 @@ Route::get('/', [MovimentiController::class,'dashboard']);
Route::get('logout', function(){ Auth::logout(); return redirect('login'); })->name('logout');
// MOVIMENTI
Route::group(['middleware'=>['permission:conti']], function(){
Route::post('movimenti/spesa',[MovimentiController::class,'insMovimentiSpesa']);
Route::post('movimenti/entrata',[MovimentiController::class,'insMovimentiEntrata']);
Route::get('movimenti',[MovimentiController::class,'listMovimenti'])->name('movimenti');
@ -65,7 +64,6 @@ Route::group(['middleware'=>['permission:conti']], function(){
// Richiami di servizio da jquery
Route::get('service/catlist', [CategorieController::class,'apiList']);
Route::get('service/taglist', [TagController::class,'apiList']);
Route::get('service/rolesList', [Utenti::class,'listRoles']);
// TAGS
Route::get('tags', [TagController::class,'listTags'])->name('tags');
@ -73,17 +71,15 @@ Route::group(['middleware'=>['permission:conti']], function(){
Route::get('tags/modify/{id}', [TagController::class,'updateTag']);
Route::post('tags/modify', [TagController::class,'updatePostTag']);
Route::get('tags/delete/{id}',[TagController::class,'deleteTag']);
});
// CONSUMI
Route::group(['middleware'=>['permission:consumi']], function(){
Route::get('consumi/gas', [ContatoreGasController::class,'listLettureGas'])->name('gas');
Route::post('consumi/gas', [ContatoreGasController::class,'insLettureGas']);
Route::get('consumi/enel', [ContatoreEnElController::class,'listLettureEnel'])->name('enel');
Route::post('consumi/enel', [ContatoreEnElController::class,'insLettureEnel']);
});
// AUTOMOBILI
Route::group(['middleware'=>['permission:automobili']], function(){
Route::get('auto', [AutoController::class, 'index'])->name('auto_list');
Route::get('auto/new', [AutoController::class, 'newAuto'])->name('auto_new');
Route::post('auto/new', [AutoController::class, 'saveAuto'])->name('auto_save');
@ -101,9 +97,8 @@ Route::group(['middleware'=>['permission:automobili']], function(){
Route::post('auto/accessori', [AutoController::class, 'saveAccessori']);
Route::get('auto/operazioni', [AutoController::class, 'getOperazioni']);
Route::get('auto/operazioni/pdf', [AutoController::class, 'exportPdfOperazioni']);
});
// CONTATTI
Route::group(['middleware'=>['permission:contatti']], function(){
Route::get('contatti', [AnagraficaController::class, 'listContact'])->name('contatti');
Route::get('contatti/new', [AnagraficaController::class, 'newContact'])->name('newContact');
Route::post('contatti/new', [AnagraficaController::class, 'insContact']);
@ -111,25 +106,16 @@ Route::group(['middleware'=>['permission:contatti']], function(){
Route::get('contatti/scheda', [AnagraficaController::class, 'getScheda']);
Route::get('contatti/addOther', [AnagraficaController::class, 'insOtherContact']);
Route::post('contatti/addOther', [AnagraficaController::class, 'saveOtherContact']);
});
// GRUPPI E PERMESSI
Route::group(['middleware'=>['permission:amministrazione']], function(){
/*
Route::get('role/new/{ruolo}', [Utenti::class, 'createRole']);
Route::get('group/new', [Utenti::class, 'nuovoGruppo']);
Route::post('group/new', [Utenti::class, 'saveNuovoGruppo']);
Route::get('permesso/new/{permesso}', [Utenti::class, 'createPermission']);
Route::get('permesso/new', [Utenti::class, 'nuovoPermesso']);
Route::post('permesso/new', [Utenti::class, 'saveNuovoPermesso']);
Route::get('permesso/assign', [Utenti::class, 'vw_assignToGroup']);
Route::post('permesso/assign', [Utenti::class, 'assignPermissionToGroup']);
*/
Route::get('users/new',[Utenti::class,'addUser']);
Route::post('users/new',[Utenti::class,'createUser']);
Route::get('users/roles',[Utenti::class,'listRoles']);
Route::get('users/delete/{id}',[Utenti::class,'deleteUser']);
});
// PROGETTI
Route::group(['middleware'=>['permission:progetti']], function(){
Route::get('progetti', [ProgettiController::class, 'listaProgetto'])->name('progetti');
Route::post('progetti/new', [ProgettiController::class, 'salvaProgetto']);
Route::get('progetti/new', [ProgettiController::class, 'nuovoProgetto'])->name('nuovoProgetto');
@ -140,14 +126,11 @@ Route::group(['middleware'=>['permission:progetti']], function(){
Route::get('progetti/detail/edit/{id}', [RigaProgettoController::class, 'editRiga']);
Route::post('progetti/rigaupdate', [RigaProgettoController::class, 'updateRiga']);
Route::get('progetti/coordinatori', [ProgettiController::class, 'getCoordinatori']);
});
/// TEST ROUTES
Route::get('test/fullcalendar', [FullCalenderController::class, 'index']);
Route::post('test/fullcalendar', [FullCalenderController::class, 'ajax']);
Route::get('test/condominio',[CondominioController::class,'testPdf']);
Route::get('test/err403',[CondominioController::class,'err403']);
Route::get('test/user_role',[CondominioController::class,'user_role']);
Route::get('test/userclass',[Utenti::class,'userClass']);