Compare commits
98 Commits
v0.1.0-alp
...
0.1.1.a
| Author | SHA1 | Date | |
|---|---|---|---|
| 9cf1f9a388 | |||
| 109ead8daa | |||
| 60e9f77d2c | |||
| 2b8a9c0d4d | |||
| a174a31b0d | |||
| 717e1be95d | |||
| 0668026eb7 | |||
| bd6d7046db | |||
| d3629f1e75 | |||
| a827342a30 | |||
| 8381aa068d | |||
| 58e9344180 | |||
| b5eb6c383b | |||
| 48606856c4 | |||
| 9f0c93c921 | |||
| 8dff2e0853 | |||
| 0f382d4182 | |||
| 0050c3547e | |||
| 350c5737b7 | |||
| fabf85ffb5 | |||
| 4f9378899b | |||
| 031e4957b4 | |||
| 957cc88a3f | |||
| 6a26529bbf | |||
| ff39c80f27 | |||
| e4f3834488 | |||
| beec4b8dce | |||
| a773b825d0 | |||
| b3df3f0b47 | |||
| 8d0576099c | |||
| 69b93bc3f6 | |||
| 75761353ca | |||
| ea11579670 | |||
| 1e2b85910c | |||
| c020fe86f0 | |||
| 03449a5c27 | |||
| 1318b50fcc | |||
| d3f0695866 | |||
| 4850b5bbef | |||
| 0ee7d4d363 | |||
| 83ccd7ec19 | |||
| 920584d779 | |||
| 54b2dda9ea | |||
| f90974ba09 | |||
| 36a863eafd | |||
| 7f80290ff8 | |||
| 3dc54235c5 | |||
| 8f5ccad560 | |||
| 7a85f2280a | |||
| d5f4d5c827 | |||
| b82ec0adc0 | |||
| fcbe1e1a4e | |||
| 66157c3477 | |||
|
|
792d1a0580 | ||
|
|
84c0eaa48b | ||
| 30cf03bd7d | |||
| dd62afe67c | |||
| f22943403a | |||
| 2ed8ede5f0 | |||
| 20f050044b | |||
| dab7869fdf | |||
| 19ea72be6c | |||
| 7183e9d96c | |||
| d3729c6fe3 | |||
| a8a25063ac | |||
| 9952c06c71 | |||
| c78fa832a2 | |||
| 3ebca7bb4a | |||
| 91608dcb7d | |||
| 235508dd15 | |||
| b05d49b72b | |||
| d554066dd5 | |||
| f172afdfc8 | |||
| 2af799240c | |||
| d8a8e363d2 | |||
| a9136cb13f | |||
| ce5527ecde | |||
| 8fc2b6ae83 | |||
| 401a061aeb | |||
| 33f6d84f4f | |||
| ca4a7a9fc3 | |||
| 9f7bab7688 | |||
| d616b5c2e9 | |||
| 2f1678684e | |||
| 2fdb5ec721 | |||
| c865d6f205 | |||
| d036e2f0d9 | |||
| a03157062f | |||
| 11b62f5a44 | |||
| 27f74bd726 | |||
| 4ca2bc11d2 | |||
| 96f95220a1 | |||
| 4f44841e8a | |||
| 9a14f95ad7 | |||
| b7bf393f3b | |||
| 1504919945 | |||
| bebac2cd6d | |||
| 2021efb8b8 |
34
README.md
34
README.md
@@ -1,37 +1,21 @@
|
||||
# Gestionale di Famiglia
|
||||
Piccolo sistema di gestione famigliare.
|
||||
# Gestionale per le famiglie
|
||||
Piccolo sistema di gestione.
|
||||
Al momento sono presenti:
|
||||
|
||||
- Gestione delle Entrate e uscite con possibilità di inserimento delle foto degli scontrini ed eventuali documenti in PDF.
|
||||
- Possibilità di importare gli estratti conto da un file excel o csv.
|
||||
- Un sistema di gestione delle letture dei contatori per il GAS e per l'Energia elettrica
|
||||
- Un sistema di gestione delle autovetture e relative operazioni effettuate su di esse.
|
||||
- Un sistema di gestione delle letture dei contatori per il GAS e per l'Energia elettrica [Da rivedere]
|
||||
- Un sistema di gestione delle autovetture e relative operazioni effettuate su di esse. [Da rivedere]
|
||||
- Una rubrica telefonica e degli indirizzi
|
||||
- Una gestione dei progetti (ancora in sviluppo)
|
||||
- Una gestione degli utenti e dei gruppi e relativi permessi.
|
||||
- Una gestione dei progetti (ancora in sviluppo) [Da rivedere]
|
||||
- Una gestione degli utenti e dei gruppi e relativi permessi. [Da migliorare]
|
||||
|
||||
*Sviluppato in php, mysql, jquery su framework Laravel*.
|
||||
|
||||
|
||||
## Installazione
|
||||
- clonare il repository
|
||||
- copiare il file .env.example
|
||||
- inserire le informazioni del database (username,password,dbname)
|
||||
- lanciare >composer install
|
||||
- lanciare php artisan migrate
|
||||
- lanciare i seeds (categorie e utenti di default)
|
||||
|
||||
|
||||
## Sviluppatori
|
||||
## Sviluppatori (attualmente)
|
||||
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.
|
||||
|
||||
Scrivici con le tue proposte, le tue critiche, i tuoi suggerimenti.
|
||||
Gestionale <bubofamily@lavorain.cloud>
|
||||
|
||||
10
app/Http/Controllers/AssociazioneController.php
Normal file
10
app/Http/Controllers/AssociazioneController.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class AssociazioneController extends Controller
|
||||
{
|
||||
//
|
||||
}
|
||||
16
app/Http/Controllers/AvvisoController.php
Normal file
16
app/Http/Controllers/AvvisoController.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Models\Avviso;
|
||||
|
||||
class AvvisoController extends Controller
|
||||
{
|
||||
//
|
||||
public function saveAvviso(Request $request)
|
||||
{
|
||||
Avviso::newAvviso($request);
|
||||
return redirect()->back();
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,7 @@ class CategorieController extends Controller
|
||||
|
||||
public static function insCategorie(Request $request)
|
||||
{
|
||||
Categorie::inserisci($request['cat_name']);
|
||||
Categorie::inserisci($request);
|
||||
return view('conti.categorie.list',['categorie'=>Categorie::list()]);
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ class CategorieController extends Controller
|
||||
|
||||
public function updatePostCategorie(Request $request)
|
||||
{
|
||||
Categorie::updateNameById($request['id'],$request['cat_name']);
|
||||
Categorie::updateNameById($request);
|
||||
return redirect(route('categorie'));
|
||||
}
|
||||
|
||||
@@ -48,4 +48,16 @@ class CategorieController extends Controller
|
||||
$categorie = Categorie::getById($id);
|
||||
return json_encode($categorie);
|
||||
}
|
||||
|
||||
public function apiListSpesa()
|
||||
{
|
||||
$categorie=Categorie::listSpesa();
|
||||
return json_encode($categorie);
|
||||
}
|
||||
|
||||
public function apiListEntrata()
|
||||
{
|
||||
$categorie=Categorie::listEntrata();
|
||||
return json_encode($categorie);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,4 +23,6 @@ class CondominioController extends Controller
|
||||
{
|
||||
abort(403);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
15
app/Http/Controllers/ContrattiController.php
Normal file
15
app/Http/Controllers/ContrattiController.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Models\Contratti;
|
||||
|
||||
class ContrattiController extends Controller
|
||||
{
|
||||
//
|
||||
public function contratti()
|
||||
{
|
||||
return view('contratti.lista',['data'=>Contratti::all()]);
|
||||
}
|
||||
}
|
||||
@@ -28,4 +28,21 @@ class DocumentiController extends Controller
|
||||
'documenti'=>$documenti
|
||||
]);
|
||||
}
|
||||
|
||||
/*
|
||||
// {issue #5} Proposta cambiamento per generalizzazione documenti
|
||||
// NB: cambiare anche in routes/admin.php il riferimento alla funzione da richiamare
|
||||
public function fileMovimentiForm(Request $request){
|
||||
$documenti = Documenti::getList($request->input('id'),'Movimenti');
|
||||
return view('conti.documenti.insert', [
|
||||
'id'=>$request['id']),
|
||||
'documenti'=>$documenti
|
||||
]);
|
||||
}
|
||||
*/
|
||||
|
||||
public function listaDocumenti()
|
||||
{
|
||||
return view('documenti.lista',['data'=>Documenti::all()]);
|
||||
}
|
||||
}
|
||||
|
||||
10
app/Http/Controllers/GruppiController.php
Normal file
10
app/Http/Controllers/GruppiController.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class GruppiController extends Controller
|
||||
{
|
||||
//
|
||||
}
|
||||
@@ -5,8 +5,12 @@ namespace App\Http\Controllers;
|
||||
use App\Models\Categorie;
|
||||
use App\Models\Movimenti;
|
||||
use App\Models\tag;
|
||||
use App\Models\Task;
|
||||
use App\Models\Avviso;
|
||||
// use App\Http\Controllers\Auth;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Rap2hpoutre\FastExcel\FastExcel;
|
||||
|
||||
class MovimentiController extends Controller
|
||||
@@ -37,11 +41,21 @@ class MovimentiController extends Controller
|
||||
|
||||
public static function dashboard()
|
||||
{
|
||||
$bilancio=Movimenti::getSaldo(date('Y'));
|
||||
/*$bilancio=Movimenti::getSaldo(date('Y'));*/
|
||||
$entrate=Movimenti::getEntrate(date('Y'));
|
||||
$uscite=Movimenti::getUscite(date('Y'));
|
||||
$saldo=Movimenti::getSaldoTot();
|
||||
$mieiTasks=Task::getTaskAssignedToUser(Auth::id());
|
||||
// $TasksAssegnati=Task::getTaskAssignedByUser(Auth::id());
|
||||
$avvisi=Avviso::getAvvisi();
|
||||
|
||||
return view('layouts.dashboard',[
|
||||
'bilancio'=>$bilancio,
|
||||
'entrate'=>$entrate,
|
||||
'uscite'=>$uscite,
|
||||
'saldo'=>$saldo,
|
||||
'mieitask' => $mieiTasks,
|
||||
// 'assegnati' => $TasksAssegnati,
|
||||
'avvisi'=>$avvisi,
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -49,7 +63,7 @@ class MovimentiController extends Controller
|
||||
{
|
||||
Movimenti::insSpesa($request);
|
||||
$mov=Movimenti::getList();
|
||||
$categorie=Categorie::list();
|
||||
$categorie=Categorie::listSpesa();
|
||||
$tags=tag::getList();
|
||||
return view('conti.movimenti.list',
|
||||
[
|
||||
@@ -64,7 +78,7 @@ class MovimentiController extends Controller
|
||||
{
|
||||
Movimenti::insEntrata($request);
|
||||
$mov=Movimenti::getList();
|
||||
$categorie=Categorie::list();
|
||||
$categorie=Categorie::listEntrata();
|
||||
$tags=tag::getList();
|
||||
return view('conti.movimenti.list',
|
||||
[
|
||||
@@ -81,7 +95,7 @@ class MovimentiController extends Controller
|
||||
foreach ($movimenti as $movimento)
|
||||
{
|
||||
$lista[]=[
|
||||
'Data'=>$movimento->Data,
|
||||
'Data'=> date_format(date_create($movimento->Data),'d/m/Y'),
|
||||
'Categoria'=>$movimento->Categoria,
|
||||
'Tag'=>$movimento->Tag,
|
||||
'Descrizione'=>$movimento->Descrizione,
|
||||
@@ -119,30 +133,16 @@ class MovimentiController extends Controller
|
||||
]);
|
||||
}
|
||||
|
||||
/*public function updateMovimenti(Request $request)
|
||||
{
|
||||
$id=$request['id'];
|
||||
$mov=Movimenti::getMovimentoById($id);
|
||||
$categorie=Categorie::list();
|
||||
$tags=tag::getList();
|
||||
return view('conti.movimenti.update',
|
||||
[
|
||||
'categorie'=> $categorie,
|
||||
'movimenti'=> $mov,
|
||||
'tags'=>$tags,
|
||||
]);
|
||||
}*/
|
||||
|
||||
public function updatePostMovimenti(Request $request)
|
||||
{
|
||||
Movimenti::updateMovimenti($request);
|
||||
return redirect(route('movimenti'));
|
||||
return redirect()->back();
|
||||
}
|
||||
|
||||
public function deleteMovimenti(Request $request)
|
||||
{
|
||||
Movimenti::deleteMovimento($request['id']);
|
||||
return redirect(route('movimenti'));
|
||||
return redirect()->back();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ use App\Models\User;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Models\RigaProgetto;
|
||||
use function GuzzleHttp\json_encode;
|
||||
use Barryvdh\DomPDF\Facade\Pdf;
|
||||
|
||||
class ProgettiController extends Controller
|
||||
{
|
||||
@@ -52,4 +53,26 @@ class ProgettiController extends Controller
|
||||
//dd($righe);
|
||||
}
|
||||
|
||||
public function chiudiProgetto(Request $id)
|
||||
{
|
||||
Progetti::chiudiProgetto($id['id']);
|
||||
return redirect(Route('progetti'));
|
||||
}
|
||||
|
||||
public function riapriProgetto(Request $id)
|
||||
{
|
||||
Progetti::riapriProgetto($id['id']);
|
||||
return redirect(Route('progetti'));
|
||||
}
|
||||
|
||||
public function stampaPDFProgetto(Request $id)
|
||||
{
|
||||
$progetto_id=$id['id'];
|
||||
$progetto = Progetti::getProgettoById($progetto_id);
|
||||
$righe = RigaProgetto::getRigheProgetto($progetto_id);
|
||||
$costo_tot=RigaProgetto::getCostoRighe($progetto_id);
|
||||
$pdf=Pdf::loadview('progetti.PDF.scheda',['dettaglio'=>$progetto,'righe'=>$righe, 'tot'=>$costo_tot]);
|
||||
return $pdf->stream();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
10
app/Http/Controllers/RivistaController.php
Normal file
10
app/Http/Controllers/RivistaController.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class RivistaController extends Controller
|
||||
{
|
||||
//
|
||||
}
|
||||
40
app/Http/Controllers/TaskController.php
Normal file
40
app/Http/Controllers/TaskController.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Models\Task;
|
||||
|
||||
class TaskController extends Controller
|
||||
{
|
||||
//
|
||||
public function listTask()
|
||||
{
|
||||
return Task::all();
|
||||
// debug
|
||||
// return get_class_methods($this);
|
||||
}
|
||||
|
||||
public function Task()
|
||||
{
|
||||
return view('tasks.list',['tasks'=>$this->listTask()]);
|
||||
}
|
||||
|
||||
public function newTask(Request $data)
|
||||
{
|
||||
Task::create([
|
||||
'titolo'=>$data['titolo'],
|
||||
'descrizione'=>$data['descrizione'],
|
||||
'assegnato_a'=>$data['assegnato_a'],
|
||||
'creato_da'=>$data['creato_da'],
|
||||
'termine_il'=>$data['termine_il'],
|
||||
'creato_il'=>$data['creato_il'],
|
||||
'chiuso_il'=>$data['chiuso_il'],
|
||||
'stato'=>$data['stato'],
|
||||
]);
|
||||
return redirect()->back();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -4,58 +4,106 @@ namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Junges\ACL\Models\Group;
|
||||
use Junges\ACL\Models\Permission;
|
||||
// use Junges\ACL\Models\Group;
|
||||
// use Junges\ACL\Models\Permission;
|
||||
use Spatie\Permission\Models\Role;
|
||||
use Spatie\Permission\Models\Permission;
|
||||
use App\Models\User;
|
||||
|
||||
class Utenti extends Controller
|
||||
{
|
||||
//
|
||||
public function nuovoGruppo()
|
||||
|
||||
public function createRole($ruolo)
|
||||
{
|
||||
return view('vendor.junges.form_addGroup',['gruppi'=>Utenti::getGruppi()]);
|
||||
$role=Role::create(['name'=>$ruolo]);
|
||||
return json_encode(Role::all()->pluck('name'));
|
||||
}
|
||||
|
||||
public function saveNuovoGruppo(Request $request)
|
||||
{
|
||||
$group=Group::create(['name' => $request['gruppo'],'description'=>$request['descrizione']]);
|
||||
return view('vendor.junges.form_addGroup',['gruppi'=>Utenti::getGruppi()]);
|
||||
function createPermission($permesso){
|
||||
$permission=Permission::create(['name'=>$permesso]);
|
||||
return json_encode(Permission::all()->pluck('name'));
|
||||
}
|
||||
|
||||
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()]);
|
||||
function userClass() {
|
||||
$user=new User();
|
||||
return get_class_methods($user);
|
||||
}
|
||||
|
||||
public function getPermessi()
|
||||
{
|
||||
return DB::table('permissions')->orderBy('name')->get();
|
||||
// post del create user
|
||||
function createUser(Request $params){
|
||||
User::addUser($params);
|
||||
return redirect('/admin/users/new');
|
||||
}
|
||||
|
||||
public function getGruppi()
|
||||
{
|
||||
return DB::table('groups')->orderBy('name')->get();
|
||||
// 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 vw_assignToGroup()
|
||||
{
|
||||
return view('vendor.junges.assignPermissionToGroup',[
|
||||
'permessi'=>Utenti::getPermessi(),
|
||||
'gruppi'=>Utenti::getGruppi(),
|
||||
]);
|
||||
function listUser(){
|
||||
$users = User::all();
|
||||
return view('users.list',['users'=>$users]);
|
||||
}
|
||||
|
||||
public function assignPermissionToGroup(Request $request)
|
||||
function getUsers(){
|
||||
return User::getUsers();
|
||||
}
|
||||
|
||||
function listRoles(){
|
||||
$roles = Role::all();
|
||||
return $roles;
|
||||
}
|
||||
|
||||
function deleteUser($id) {
|
||||
User::destroy($id);
|
||||
|
||||
return redirect('/admin/users/new');
|
||||
}
|
||||
|
||||
function givePermissionToUser()
|
||||
{
|
||||
$group=Group::findByName($request['gruppo']);
|
||||
$group->assignPermission($request['permesso']);
|
||||
return view('vendor.junges.assignPermissionToGroup',[
|
||||
'permessi'=>Utenti::getPermessi(),
|
||||
'gruppi'=>Utenti::getGruppi(),
|
||||
]);
|
||||
$users=User::all();
|
||||
$permissions=Permission::all();
|
||||
return view('users.assignperm',['users'=>$users,'permissions'=>$permissions]);
|
||||
}
|
||||
|
||||
function assignPermission(Request $request)
|
||||
{
|
||||
//$user=User::getUserbyId($request['user']);
|
||||
$user=User::findOrFail($request['user']);
|
||||
foreach($request['permesso'] as $key => $value){
|
||||
if($value=='true')
|
||||
{
|
||||
$key=str_replace('\'','',$key);
|
||||
$user->givePermissionTo($key);
|
||||
// $permission['allowed'][]=$key;
|
||||
}
|
||||
else
|
||||
{
|
||||
$key=str_replace('\'','',$key);
|
||||
$user->revokePermissionTo($key);
|
||||
// $permission['denied'][]=$key;
|
||||
}
|
||||
|
||||
}
|
||||
return redirect('/admin/users/givepermission');
|
||||
}
|
||||
|
||||
function giveRoleToUser()
|
||||
{
|
||||
$users=User::all();
|
||||
$roles=Role::all();
|
||||
return view('users.assignrole',['users'=>$users,'roles'=>$roles]);
|
||||
}
|
||||
|
||||
function assignRole(Request $request)
|
||||
{
|
||||
//$user=User::getUserbyId($request['user']);
|
||||
$user=User::findOrFail($request['user']);
|
||||
$user->assignRole($request['role']);
|
||||
return redirect('/admin/users/giverole');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -63,6 +63,8 @@ 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,
|
||||
];
|
||||
}
|
||||
|
||||
39
app/Mail/myTestEmail.php
Normal file
39
app/Mail/myTestEmail.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace App\Mail;
|
||||
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
|
||||
class myTestEmail extends Mailable
|
||||
{
|
||||
use Queueable, SerializesModels;
|
||||
public $email;
|
||||
/**
|
||||
* Create a new message instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($email)
|
||||
{
|
||||
//
|
||||
$this->email=$email;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Build the message.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function build()
|
||||
{
|
||||
$name='none';
|
||||
return $this
|
||||
->subject('Email di Test')
|
||||
->markdown('mail.test',['name' => $name]);
|
||||
}
|
||||
}
|
||||
11
app/Models/Associazione.php
Normal file
11
app/Models/Associazione.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Associazione extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
}
|
||||
28
app/Models/Avviso.php
Normal file
28
app/Models/Avviso.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Avviso extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable=['avviso','creato_il', 'creato_da', 'urgente'];
|
||||
|
||||
public static function newAvviso($data)
|
||||
{
|
||||
self::create([
|
||||
'avviso'=>$data['avviso'],
|
||||
'creato_da'=>$data['creato_da'],
|
||||
'creato_il'=>date('Y-m-d'),
|
||||
'urgente'=>$data['urgente'],
|
||||
]);
|
||||
}
|
||||
|
||||
public static function getAvvisi()
|
||||
{
|
||||
return self::all();
|
||||
}
|
||||
}
|
||||
@@ -17,17 +17,49 @@ class Categorie extends Model
|
||||
|
||||
public static function list()
|
||||
{
|
||||
return DB::table('categories')->orderBy('cat_name')->get();
|
||||
return self::all();
|
||||
}
|
||||
|
||||
public static function inserisci($name){
|
||||
return DB::table('categories')->insert(['cat_name'=> $name]);
|
||||
public static function listSpesa()
|
||||
{
|
||||
return DB::table('categories')->where('cat_uscita','=',1)->orderBy('cat_name')->get();
|
||||
}
|
||||
|
||||
public static function listEntrata()
|
||||
{
|
||||
return DB::table('categories')->where('cat_entrata','=',1)->orderBy('cat_name')->get();
|
||||
}
|
||||
|
||||
public static function inserisci($request){
|
||||
if ($request['cat_entrata']==='on')
|
||||
{
|
||||
$entrata=1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$entrata=0;
|
||||
}
|
||||
|
||||
if ($request['cat_uscita']==='on')
|
||||
{
|
||||
$uscita=1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$uscita=0;
|
||||
}
|
||||
|
||||
return DB::table('categories')->insert([
|
||||
'cat_name'=> $request['cat_name'],
|
||||
'cat_entrata'=>$entrata,
|
||||
'cat_uscita'=>$uscita
|
||||
]);
|
||||
}
|
||||
|
||||
public static function deleteById($id){
|
||||
DB::table('categories')
|
||||
->where('id','=', $id)
|
||||
->delete();
|
||||
DB::table('categories')
|
||||
->where('id','=', $id)
|
||||
->delete();
|
||||
}
|
||||
|
||||
public static function getById($id) {
|
||||
@@ -36,11 +68,31 @@ class Categorie extends Model
|
||||
->get();
|
||||
}
|
||||
|
||||
public static function updateNameById($id,$name) {
|
||||
public static function updateNameById($request) {
|
||||
if ($request['cat_entrata']==='on')
|
||||
{
|
||||
$entrata=1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$entrata=0;
|
||||
}
|
||||
|
||||
if ($request['cat_uscita']==='on')
|
||||
{
|
||||
$uscita=1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$uscita=0;
|
||||
}
|
||||
|
||||
DB::table('categories')
|
||||
->where('id','=', $id)
|
||||
->where('id','=', $request['id'])
|
||||
->update([
|
||||
'cat_name' => $name,
|
||||
'cat_name' => $request['cat_name'],
|
||||
'cat_entrata' => $entrata,
|
||||
'cat_uscita'=>$uscita,
|
||||
]);
|
||||
|
||||
}
|
||||
|
||||
11
app/Models/Contratti.php
Normal file
11
app/Models/Contratti.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Contratti extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
}
|
||||
@@ -17,6 +17,14 @@ class Documenti extends Model
|
||||
return $quanti;
|
||||
}
|
||||
|
||||
// Proposta modifica {issue #5} gitea (generalizzazione del documento)
|
||||
/*
|
||||
public static function countDocument($id,$entity)
|
||||
{
|
||||
return self::where('entita','=',$entity)->where('entita_id','=',$id)->count();
|
||||
}
|
||||
*/
|
||||
|
||||
public static function store($req) {
|
||||
$movimento_id=$req->input('id');
|
||||
$filename=$req->file('filename')->store('Documenti');
|
||||
@@ -28,6 +36,20 @@ class Documenti extends Model
|
||||
]);
|
||||
}
|
||||
|
||||
// Proposta modifica {issue #5} gitea (generalizzazione del documento)
|
||||
/*
|
||||
public static function store($req) {
|
||||
$movimento_id=$req->input('id');
|
||||
$filename=$req->file('filename')->store('Documenti');
|
||||
self::create([
|
||||
'entità'=>$req['entita'], // aggiunto per determinare il tipo di entità a cui si riferisce il documento
|
||||
'entita_id'=>$req['entita_id'], // aggiunto per identificare il record al quale associare il documento (al posto di id_movimento)
|
||||
'descrizione'=>$req['descrizione'],
|
||||
'filename'=>$filename
|
||||
]);
|
||||
}
|
||||
*/
|
||||
|
||||
public static function getList($id)
|
||||
{
|
||||
return DB::table('documentis')
|
||||
@@ -35,4 +57,11 @@ class Documenti extends Model
|
||||
->get();
|
||||
}
|
||||
|
||||
// Proposta modifica issue {#5 gitea} (generalizzazione del documento)
|
||||
/*
|
||||
public static function getList($id,$entity)
|
||||
{
|
||||
self::where('entita','=',$entity)->where('entita_id','=',$id)->get();
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
11
app/Models/Gruppi.php
Normal file
11
app/Models/Gruppi.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Gruppi extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
}
|
||||
@@ -10,6 +10,8 @@ use Rap2hpoutre\FastExcel\FastExcel;
|
||||
class Movimenti extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
protected $dates = ['mov_data'];
|
||||
protected $casts = [ 'mov_data'=>'datetime'];
|
||||
|
||||
public static function getList() {
|
||||
return DB::table('movimentis')
|
||||
@@ -156,7 +158,7 @@ class Movimenti extends Model
|
||||
if($line['Data valuta'])
|
||||
{
|
||||
self::insEntrata([
|
||||
'mov_data'=>self::dateFormat(0,$line['Data valuta']),
|
||||
'mov_data'=>$line['Data valuta'],
|
||||
'mov_fk_categoria'=>1,
|
||||
'mov_descrizione'=>$line['Descrizione operazione'],
|
||||
'mov_importo'=>trim(str_replace(',','.',(str_replace('.','',str_replace('€', '', $line['Importo']))))),
|
||||
@@ -179,7 +181,8 @@ class Movimenti extends Model
|
||||
if($line['DARE']<>'')
|
||||
{
|
||||
$dati=[
|
||||
'mov_data'=>self::dateFormat(0,$line['VALUTA']),
|
||||
'mov_data'=>self::dateFormat(0,$line['VALUTA']), // date_format(date_create($movimento->mov_data),'d/m/Y'
|
||||
// 'mov_data'=>date_format(date_create($line['VALUTA']),'Y-m-d'),
|
||||
'mov_fk_categoria'=>1,
|
||||
'mov_descrizione'=>$line['DESCRIZIONE OPERAZIONE'],
|
||||
'mov_importo'=>'-'.trim(str_replace(',','.',(str_replace('.','',$line['DARE'])))),
|
||||
@@ -191,6 +194,7 @@ class Movimenti extends Model
|
||||
{
|
||||
$dati=[
|
||||
'mov_data'=>self::dateFormat(0,$line['VALUTA']),
|
||||
//'mov_data'=>date_format(date_create($line['VALUTA']),'Y-m-d'),
|
||||
'mov_fk_categoria'=>1,
|
||||
'mov_descrizione'=>$line['DESCRIZIONE OPERAZIONE'],
|
||||
'mov_importo'=>trim(str_replace(',','.',(str_replace('.','',$line['AVERE'])))),
|
||||
@@ -213,17 +217,37 @@ class Movimenti extends Model
|
||||
|
||||
private static function dateFormat($type,$string)
|
||||
{
|
||||
|
||||
// $string=(string)$string;
|
||||
if($type)
|
||||
{
|
||||
$string=$string->format('Y-m-d');
|
||||
// $string=$string->format('Y-m-d');
|
||||
list($year,$month,$day) = explode('-',$string);
|
||||
return $day.'/'.$month.'/'.$year;
|
||||
} else {
|
||||
$string=$string->format('d/m/Y');
|
||||
// $string=$string->format('d/m/Y');
|
||||
list($day,$month,$year) =explode('/',$string);
|
||||
return $year.'-'.$month.'-'.$day;
|
||||
}
|
||||
}
|
||||
|
||||
public static function getEntrate($year)
|
||||
{
|
||||
$entrate_anno=DB::table('movimentis')
|
||||
->where('mov_importo','>',0)
|
||||
->whereYear('mov_data', '=' , $year)
|
||||
->sum('mov_importo');
|
||||
//->get();
|
||||
return $entrate_anno;
|
||||
}
|
||||
|
||||
public static function getUscite($year)
|
||||
{
|
||||
$uscite_anno=DB::table('movimentis')
|
||||
->where('mov_importo','<',0)
|
||||
->whereYear('mov_data', '=' , $year)
|
||||
->sum('mov_importo');
|
||||
//->get();
|
||||
return ($uscite_anno);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -54,4 +54,27 @@ class Progetti extends Model
|
||||
DB::table('progettis')->delete($progetto_id);
|
||||
}
|
||||
|
||||
public static function chiudiProgetto($progetto_id)
|
||||
{
|
||||
// chiude il progetto e lo rende non cancellabile e non più editabile
|
||||
// potrà solo essere esportato in PDF
|
||||
DB::table('progettis')
|
||||
->where('id','=', $progetto_id)
|
||||
->update([
|
||||
'stato'=>'chiuso',
|
||||
'data_fine'=>date('Y-m-d'),
|
||||
]);
|
||||
|
||||
}
|
||||
|
||||
public static function riapriProgetto($progetto_id)
|
||||
{
|
||||
DB::table('progettis')
|
||||
->where('id','=', $progetto_id)
|
||||
->update([
|
||||
'stato'=>'aperto',
|
||||
'data_fine'=>null,
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
11
app/Models/Rivista.php
Normal file
11
app/Models/Rivista.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Rivista extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
}
|
||||
46
app/Models/Task.php
Normal file
46
app/Models/Task.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Task extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable=['titolo','descrizione','creato_da','assegnato_a','creato_il','termine_il','chiuso_il','stato'];
|
||||
|
||||
public function getAllTasks()
|
||||
{
|
||||
return self::all();
|
||||
}
|
||||
|
||||
//
|
||||
public static function getTaskAssignedToUser($userid)
|
||||
{
|
||||
return self::where('assegnato_a',$userid)->get();
|
||||
}
|
||||
|
||||
//
|
||||
public static function getTaskAssignedByUser($userid)
|
||||
{
|
||||
return self::where('creato_da',$userid)->get();
|
||||
}
|
||||
|
||||
public static function saveTask($collection)
|
||||
{
|
||||
self::create(
|
||||
[
|
||||
'titolo' => $collection['titolo'],
|
||||
'descrizione'=>$collection['descrizione'],
|
||||
'creato_da'=>$collection['creato_da'],
|
||||
'assegnato_a'=>$collection['assegnato_a'],
|
||||
'creato_il'=>date('Y-m-d'),
|
||||
'termine_il'=>$collection['termine_il'],
|
||||
'stato'=>'Aperto',
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,21 +2,18 @@
|
||||
|
||||
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 LdapRecord\Laravel\Auth\Authenticatable;
|
||||
use LdapRecord\Laravel\Auth\AuthenticatesWithLdap;
|
||||
use Junges\ACL\Concerns\HasGroups;
|
||||
|
||||
use Spatie\Permission\Traits\HasRoles;
|
||||
use Illuminate\Foundation\Auth\Access\Authorizable;
|
||||
|
||||
class User extends Authenticatable
|
||||
{
|
||||
use HasApiTokens, HasFactory, Notifiable, AuthenticateswithLdap, HasGroups, SoftDeletes;
|
||||
use HasApiTokens, HasFactory, Notifiable, HasRoles,Authorizable;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
@@ -27,6 +24,7 @@ class User extends Authenticatable
|
||||
'name',
|
||||
'email',
|
||||
'password',
|
||||
'user_role',
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -48,6 +46,8 @@ class User extends Authenticatable
|
||||
'email_verified_at' => 'datetime',
|
||||
];
|
||||
|
||||
protected $guard_name = 'web';
|
||||
|
||||
public function getLdapDomainColumn()
|
||||
{
|
||||
return 'domain';
|
||||
@@ -66,13 +66,22 @@ class User extends Authenticatable
|
||||
|
||||
public static function getUserById($id)
|
||||
{
|
||||
return DB::table('users')->where('id','=',$id)->get();
|
||||
return DB::table('users')->where('id','=',$id)->first();
|
||||
}
|
||||
|
||||
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']);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,5 +26,10 @@ class AuthServiceProvider extends ServiceProvider
|
||||
$this->registerPolicies();
|
||||
|
||||
//
|
||||
Gate::before(function ($user, $ability) {
|
||||
if ($user->hasRole('admin')) {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
"require" : {
|
||||
"php": "^7.3|^8.0",
|
||||
"barryvdh/laravel-dompdf": "^2.0",
|
||||
"creativeorange/gravatar": "^1.0",
|
||||
"directorytree/ldaprecord": "^2.9",
|
||||
"directorytree/ldaprecord-laravel": "^2.5",
|
||||
"fruitcake/laravel-cors": "^2.0",
|
||||
"guzzlehttp/guzzle": "^7.0.1",
|
||||
"laravel-notification-channels/telegram": "^2.0",
|
||||
@@ -20,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" : {
|
||||
|
||||
1500
composer.lock
generated
1500
composer.lock
generated
File diff suppressed because it is too large
Load Diff
106
config/acl.php
106
config/acl.php
@@ -1,106 +0,0 @@
|
||||
<?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'
|
||||
]
|
||||
];
|
||||
@@ -80,7 +80,7 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'locale' => 'en',
|
||||
'locale' => 'it',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@@ -106,7 +106,7 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'faker_locale' => 'en_US',
|
||||
'faker_locale' => 'it_IT',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@@ -161,6 +161,8 @@ return [
|
||||
Illuminate\Translation\TranslationServiceProvider::class,
|
||||
Illuminate\Validation\ValidationServiceProvider::class,
|
||||
Illuminate\View\ViewServiceProvider::class,
|
||||
Creativeorange\Gravatar\GravatarServiceProvider::class,
|
||||
|
||||
|
||||
/*
|
||||
* Package Service Providers...
|
||||
@@ -174,6 +176,7 @@ return [
|
||||
// App\Providers\BroadcastServiceProvider::class,
|
||||
App\Providers\EventServiceProvider::class,
|
||||
App\Providers\RouteServiceProvider::class,
|
||||
Spatie\Permission\PermissionServiceProvider::class,
|
||||
|
||||
],
|
||||
|
||||
@@ -230,6 +233,7 @@ return [
|
||||
'Validator' => Illuminate\Support\Facades\Validator::class,
|
||||
'View' => Illuminate\Support\Facades\View::class,
|
||||
'FastExcel' => Rap2hpoutre\FastExcel\Facades\FastExcel::class,
|
||||
'Gravatar' => Creativeorange\Gravatar\Facade\Gravatar::class,
|
||||
|
||||
],
|
||||
|
||||
|
||||
@@ -60,26 +60,14 @@ return [
|
||||
*/
|
||||
|
||||
'providers' => [
|
||||
'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' => [
|
||||
'driver' => 'eloquent',
|
||||
'model' => App\Models\User::class,
|
||||
],
|
||||
|
||||
'users' => [
|
||||
/*'users' => [
|
||||
'driver' => 'database',
|
||||
'table' => 'users',
|
||||
],
|
||||
],*/
|
||||
],
|
||||
|
||||
/*
|
||||
|
||||
161
config/permission.php
Normal file
161
config/permission.php
Normal file
@@ -0,0 +1,161 @@
|
||||
<?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',
|
||||
],
|
||||
];
|
||||
@@ -20,6 +20,18 @@ class CreateDocumentisTable extends Migration
|
||||
$table->string('descrizione');
|
||||
$table->string('filename');
|
||||
});
|
||||
|
||||
/*
|
||||
{issue #5} GITEA - proposta modifica
|
||||
Schema::create('documentis', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->string('entita');
|
||||
$table->bigInteger('entita_id');
|
||||
$table->string('descrizione');
|
||||
$table->string('filename');
|
||||
});
|
||||
*/
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
<?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']);
|
||||
}
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
<?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']);
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class ColumnUsersRoles extends Migration
|
||||
class ColumnsAnagrafica extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
@@ -13,11 +13,14 @@ class ColumnUsersRoles extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
//
|
||||
$table->softDeletes();
|
||||
$table->string('user_role',25)->default('user')->nullable(false);
|
||||
});
|
||||
/*Schema::table('anagraficas', function (Blueprint $table) {
|
||||
/* //
|
||||
// $table->longText('ang_indirizzo');
|
||||
$table->string('ang_CAP');
|
||||
$table->string('ang_Citta');
|
||||
$table->string('ang_Provincia');
|
||||
$table->string('ang_telefono');
|
||||
});*/
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -27,10 +30,8 @@ class ColumnUsersRoles extends Migration
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
Schema::table('anagraficas', function (Blueprint $table) {
|
||||
//
|
||||
$table->dropColumn('user_role');
|
||||
$table->dropSoftDeletes();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateRivistasTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('rivistas', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('rivistas');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateAssociazionesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('associaziones', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('associaziones');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateGruppisTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('gruppis', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('gruppis');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class UpdateCategoriesAddingSpesaEntrata extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
//
|
||||
Schema::table('categories', function (Blueprint $table) {
|
||||
|
||||
$table->smallInteger('cat_entrata')->after('cat_name')->default(0);
|
||||
$table->smallInteger('cat_uscita')->after('cat_entrata')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
Schema::table('categories', function (Blueprint $table) {
|
||||
$table->dropColumn('cat_entrata');
|
||||
$table->dropColumn('cat_uscita');
|
||||
});
|
||||
}
|
||||
}
|
||||
39
database/migrations/2023_07_14_123253_create_tasks_table.php
Normal file
39
database/migrations/2023_07_14_123253_create_tasks_table.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateTasksTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('tasks', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->string('titolo',255);
|
||||
$table->longText('descrizione')->nullable();
|
||||
$table->bigInteger('creato_da');
|
||||
$table->bigInteger('assegnato_a');
|
||||
$table->date('creato_il');
|
||||
$table->date('termine_il');
|
||||
$table->date('chiuso_il');
|
||||
$table->enum('stato', ['Aperto', 'Chiuso'])->nullable()->default('Aperto');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('tasks');
|
||||
}
|
||||
}
|
||||
42
database/migrations/2023_07_14_123350_subtask.php
Normal file
42
database/migrations/2023_07_14_123350_subtask.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class Subtask extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
//
|
||||
Schema::create('subtasks', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
// $table->bigInteger('tasks_id');
|
||||
$table->foreignId('tasks_id')->onDelete('cascade');
|
||||
$table->string('titolo',255);
|
||||
$table->longText('descrizione')->nullable();
|
||||
$table->bigInteger('creato_da');
|
||||
$table->bigInteger('assegnato_a');
|
||||
$table->date('creato_il');
|
||||
$table->date('termine_il');
|
||||
$table->date('chiuso_il');
|
||||
$table->enum('stato', ['Aperto', 'Chiuso'])->nullable()->default('Aperto');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateAvvisosTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('avvisos', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->longtext('avviso');
|
||||
$table->date('creato_il')->nullable()->default(date('Y-m-d'));
|
||||
$table->bigInteger('creato_da');
|
||||
$table->boolean('urgente')->nullable()->default(false);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('avvisos');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateContrattisTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('contrattis', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->string('numero', 100)->nullable();
|
||||
$table->string('nome', 100);
|
||||
$table->date('datainizio');
|
||||
$table->date('datatermine');
|
||||
$table->string('fornitore', 100)->default('text');
|
||||
$table->string('tipo', 100)->default('utenze');
|
||||
$table->decimal('importo', 5, 2);
|
||||
$table->date('scadenzapagamento');
|
||||
$table->string('stato', 100)->default('attivo');
|
||||
$table->longText('note')->nullable();
|
||||
$table->string('filename',255)->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('contrattis');
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,23 @@ class CategorieSeeder extends Seeder
|
||||
{
|
||||
// Inserisce le categorie necessarie
|
||||
DB::table('categories')->insert(
|
||||
['cat_name'=>'Automobili']
|
||||
[
|
||||
'cat_name'=>'Automobili',
|
||||
'cat_uscita'=>1,
|
||||
'cat_entrata'=>0,
|
||||
]
|
||||
);
|
||||
DB::table('categories')->insert(
|
||||
[
|
||||
'cat_name'=>'Stipendio',
|
||||
'cat_uscita'=>0,
|
||||
'cat_entrata'=>1]
|
||||
);
|
||||
DB::table('categories')->insert(
|
||||
[
|
||||
'cat_name'=>'Utenze',
|
||||
'cat_uscita'=>1,
|
||||
'cat_entrata'=>0]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ class DatabaseSeeder extends Seeder
|
||||
UserSeeder::class,
|
||||
TagSeeder::class,
|
||||
CategorieSeeder::class,
|
||||
RoleSeeder::class,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
84
database/seeders/OnlySeeder.php
Normal file
84
database/seeders/OnlySeeder.php
Normal file
@@ -0,0 +1,84 @@
|
||||
<?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 OnlySeeder 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');
|
||||
// Il ruolo admin ha già tutti i permessi da middleware
|
||||
|
||||
$admin = User::create([
|
||||
'name'=>'Amministratore',
|
||||
'email'=>'admin@localhost.local',
|
||||
'password'=>Hash::make('admin'),
|
||||
])->assignRole('admin');
|
||||
|
||||
$user = User::create([
|
||||
'name'=>'Utente',
|
||||
'email'=>'user@localhost.local',
|
||||
'password'=>Hash::make('user'),
|
||||
])->assignRole('user');
|
||||
|
||||
$guest = User::create([
|
||||
'name'=>'Guest',
|
||||
'email'=>'guest@localhost.local',
|
||||
'password'=>Hash::make('guest'),
|
||||
])->assignRole('guest');
|
||||
}
|
||||
}
|
||||
83
database/seeders/RoleSeeder.php
Normal file
83
database/seeders/RoleSeeder.php
Normal file
@@ -0,0 +1,83 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
||||
@@ -18,5 +18,8 @@ class TagSeeder extends Seeder
|
||||
DB::table('tags')->insert(
|
||||
['tag_name'=>'System']
|
||||
);
|
||||
DB::table('tags')->insert(
|
||||
['tag_name'=>'da verificare']
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,9 +20,11 @@ class UserSeeder extends Seeder
|
||||
DB::table('users')->insert(
|
||||
[
|
||||
'name'=>'SystemUser',
|
||||
'email'=>env('SYSADMIN_MAIL'),
|
||||
'email'=>'system@localhost.local',
|
||||
'password'=>Hash::make(Str::random(16)),
|
||||
|
||||
]
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
152
public/css/Blog-Template.css
vendored
Normal file
152
public/css/Blog-Template.css
vendored
Normal file
@@ -0,0 +1,152 @@
|
||||
.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
Normal file
186
public/css/Page-2.css
vendored
Normal file
@@ -0,0 +1,186 @@
|
||||
.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;
|
||||
}
|
||||
}
|
||||
87
public/css/Post-Template.css
vendored
Normal file
87
public/css/Post-Template.css
vendored
Normal file
@@ -0,0 +1,87 @@
|
||||
.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
Normal file
41239
public/css/nicepage.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
BIN
public/images/0fd3416c.jpeg
Normal file
BIN
public/images/0fd3416c.jpeg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 36 KiB |
BIN
public/images/68f64b9d.jpeg
Normal file
BIN
public/images/68f64b9d.jpeg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 41 KiB |
BIN
public/images/8ad73f3c.jpeg
Normal file
BIN
public/images/8ad73f3c.jpeg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 28 KiB |
BIN
public/images/aw.jpg
Normal file
BIN
public/images/aw.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 38 KiB |
BIN
public/images/default-logo.png
Normal file
BIN
public/images/default-logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
BIN
public/images/s-min.jpg
Normal file
BIN
public/images/s-min.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 124 KiB |
19
public/js/app/altrocontatto.js
vendored
19
public/js/app/altrocontatto.js
vendored
@@ -1,10 +1,21 @@
|
||||
$(document).ready(function() {
|
||||
$('#automobili').DataTable({
|
||||
responsive: true
|
||||
responsive: true,
|
||||
fields: [
|
||||
{
|
||||
label:"Data",
|
||||
type: "datetime"
|
||||
}
|
||||
]
|
||||
});
|
||||
});
|
||||
$(document).ready(function() {
|
||||
|
||||
$('#contatti').DataTable({
|
||||
responsive: true
|
||||
responsive: true,
|
||||
fields: [
|
||||
{
|
||||
label:"Data",
|
||||
type: "datetime"
|
||||
}
|
||||
]
|
||||
});
|
||||
});
|
||||
15
public/js/app/auto.js
vendored
15
public/js/app/auto.js
vendored
@@ -1,6 +1,19 @@
|
||||
$(document).ready(function() {
|
||||
$('#listaAutomobili').DataTable({
|
||||
responsive: true
|
||||
});
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#automobili').DataTable({
|
||||
responsive: true
|
||||
responsive: true,
|
||||
columnDefs: [
|
||||
{
|
||||
target: 0,
|
||||
render: DataTable.render.date(),
|
||||
}
|
||||
],
|
||||
"order": [[0, "desc"]]
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
66
public/js/app/conti_categorie.js
vendored
66
public/js/app/conti_categorie.js
vendored
@@ -1,33 +1,51 @@
|
||||
$(document).ready(function() {
|
||||
$('#listrapportoS').DataTable({
|
||||
responsive: true
|
||||
"responsive": true,
|
||||
"order": [[0, "asc"]]
|
||||
});
|
||||
});
|
||||
$(document).ready(function() {
|
||||
|
||||
$('#listrapportoE').DataTable({
|
||||
responsive: true
|
||||
"responsive": true,
|
||||
"order": [[0, "asc"]]
|
||||
});
|
||||
|
||||
$('#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
|
||||
$('#cat_entrata').prop('checked', false);
|
||||
$('#cat_uscita').prop('checked', false);
|
||||
|
||||
|
||||
console.log(data[0]);
|
||||
console.log(data[0].cat_name);
|
||||
|
||||
|
||||
|
||||
if (data[0].cat_uscita === 1)
|
||||
{
|
||||
// $('.myCheckbox').prop('checked', true);
|
||||
$('#cat_uscita').prop('checked', true);
|
||||
}
|
||||
if (data[0].cat_entrata ===1)
|
||||
{
|
||||
$('#cat_entrata').prop('checked', true);
|
||||
}
|
||||
$('#H_cat_id').val(data[0].id);
|
||||
$('#H_cat_cat_name').val(data[0].cat_name);
|
||||
$('#myModal').modal('show');
|
||||
});
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#categorie').DataTable({
|
||||
responsive: true
|
||||
});
|
||||
$(document).on('click','.open_modal_new',function(){
|
||||
console.log('richiesto apertura form');
|
||||
$('#myModal_new').modal('show');
|
||||
|
||||
$(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');
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
10
public/js/app/contratti.js
vendored
Normal file
10
public/js/app/contratti.js
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
$('#contratti').DataTable({
|
||||
responsive: true,
|
||||
fields: [
|
||||
{
|
||||
label:"Data",
|
||||
type: "datetime"
|
||||
}
|
||||
]
|
||||
});
|
||||
$(".draggable").draggable();
|
||||
8
public/js/app/dashboard.js
vendored
8
public/js/app/dashboard.js
vendored
@@ -1,6 +1,8 @@
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#categorie').DataTable({
|
||||
responsive: true
|
||||
});
|
||||
|
||||
});
|
||||
// Rende spostabili le varie finestre
|
||||
$(".draggable").draggable();
|
||||
|
||||
|
||||
|
||||
9
public/js/app/enel.js
vendored
9
public/js/app/enel.js
vendored
@@ -1,5 +1,12 @@
|
||||
$(document).ready(function() {
|
||||
$('#listaLettureEnel').DataTable({
|
||||
responsive: true
|
||||
"responsive": true,
|
||||
columnDefs: [
|
||||
{
|
||||
target: 0,
|
||||
render: DataTable.render.date(),
|
||||
}
|
||||
],
|
||||
"order": [[0, "desc"]]
|
||||
});
|
||||
});
|
||||
9
public/js/app/gas.js
vendored
9
public/js/app/gas.js
vendored
@@ -1,5 +1,12 @@
|
||||
$(document).ready(function() {
|
||||
$('#listaLettureGas').DataTable({
|
||||
responsive: true
|
||||
"responsive": true,
|
||||
columnDefs: [
|
||||
{
|
||||
target: 0,
|
||||
render: DataTable.render.date(),
|
||||
}
|
||||
],
|
||||
"order": [[0, "desc"]]
|
||||
});
|
||||
});
|
||||
94
public/js/app/movimenti.js
vendored
94
public/js/app/movimenti.js
vendored
@@ -1,10 +1,18 @@
|
||||
$(document).ready(function() {
|
||||
$('#listamovimenti').DataTable({
|
||||
"responsive": true,
|
||||
columnDefs: [
|
||||
{
|
||||
target: 0,
|
||||
render: DataTable.render.date(),
|
||||
}
|
||||
],
|
||||
"order": [[0, "desc"]]
|
||||
});
|
||||
});
|
||||
|
||||
$(".draggable").draggable();
|
||||
|
||||
var d = new Date();
|
||||
|
||||
var month = d.getMonth()+1;
|
||||
@@ -17,55 +25,101 @@ var strDate = d.getFullYear() + '-' +
|
||||
|
||||
$(document).on('click', '.open_modal_spesa', function() {
|
||||
console.log(strDate);
|
||||
$('#form').find('input[type="text"], textarea, input[type="number"],input[type="date"]').val("");
|
||||
$("#categoria").empty();
|
||||
$("#tags").empty();
|
||||
$('#form').find('input[type="text"], textarea, input[type="number"],input[type="date"],option').val("");
|
||||
$('#form').find('input[type="date"]').val(strDate);
|
||||
$('#myModal').modal('show');
|
||||
$('.modal-title').text(' Nuovo movimento in uscita');
|
||||
$('#form').attr('action', '/admin/movimenti/spesa');
|
||||
$.getJSON("/admin/service/catlistSpesa", {}, function(cats) {
|
||||
$.each(cats, function(i, cat) {
|
||||
$("select[name='mov_fk_categoria']").append(
|
||||
new Option(cat.cat_name, cat.id)
|
||||
)
|
||||
}
|
||||
);
|
||||
});
|
||||
$.getJSON("/admin/service/taglist", {}, function(tags) {
|
||||
$.each(tags, function(i, tag) {
|
||||
$("select[name='mov_fk_tags']").append(
|
||||
new Option(tag.tag_name, tag.id)
|
||||
)
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click', '.open_modal_entrata', function() {
|
||||
console.log(strDate);
|
||||
$('#form').find('input[type="text"], textarea, input[type="number"]').val("");
|
||||
$("#categoria").empty();
|
||||
$("#tags").empty();
|
||||
$('#form').find('input[type="text"], textarea, input[type="number"],option').val("");
|
||||
$('#form').find('input[type="date"]').val(strDate);
|
||||
$('#myModal').modal('show');
|
||||
$('.modal-title').text('Nuovo movimento in entrata');
|
||||
$('#form').attr('action', '/admin/movimenti/entrata');
|
||||
$.getJSON("/admin/service/catlistEntrata", {}, function(data) {
|
||||
$.each(data, function(i, item) {
|
||||
$("select[name='mov_fk_categoria']").append(
|
||||
new Option(item.cat_name, item.id)
|
||||
)
|
||||
}
|
||||
);
|
||||
});
|
||||
$.getJSON("/admin/service/taglist", {}, function(data) {
|
||||
$.each(data, function(i, item) {
|
||||
$("select[name='mov_fk_tags']").append(
|
||||
new Option(item.tag_name, item.id)
|
||||
)
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click', '.open_modal_modifica', function() {
|
||||
var url = "/admin/movimenti/modify";
|
||||
var riga_id = $(this).val();
|
||||
$("#categoria").empty();
|
||||
$("#tags").empty();
|
||||
$.getJSON(url + '/' + riga_id, function(data) {
|
||||
// success data
|
||||
console.log(data[0]);
|
||||
$.getJSON("/admin/service/taglist", {}, function(tags) {
|
||||
$.each(tags, function(i, tag) {
|
||||
$("select[name='mov_fk_tags']").append(
|
||||
new Option(tag.tag_name, tag.id)
|
||||
)
|
||||
$('#tags')
|
||||
.find('option:contains(' + data[0].tag_name + ')')
|
||||
.prop('selected', true)
|
||||
.trigger('change');
|
||||
});
|
||||
});
|
||||
$.getJSON("/admin/service/catlist", {}, function(cats) {
|
||||
$.each(cats, function(i, cat) {
|
||||
$("select[name='mov_fk_categoria']").append(
|
||||
new Option(cat.cat_name, cat.id)
|
||||
)
|
||||
$('#categoria')
|
||||
.find('option:contains(' + data[0].cat_name + ')')
|
||||
.prop('selected', true)
|
||||
.trigger('change');
|
||||
}
|
||||
);
|
||||
});
|
||||
$('.modal-title').text('Modifica movimento');
|
||||
$('#data').val(data[0].mov_data);
|
||||
$('#descrizione').val(data[0].mov_descrizione);
|
||||
$('#importo').val(data[0].mov_importo);
|
||||
$('#tags')
|
||||
.find('option:contains(' + data[0].tag_name + ')')
|
||||
.prop('selected', true)
|
||||
.trigger('change');
|
||||
$('#categoria')
|
||||
.find('option:contains(' + data[0].cat_name + ')')
|
||||
.prop('selected', true)
|
||||
.trigger('change');
|
||||
|
||||
$('#myModal').modal('show');
|
||||
// $('.panel-heading').text('Modifica movimento');
|
||||
$('#form').attr('action', '/admin/movimenti/modify');
|
||||
$('#form').append('<input type="hidden" name="id" value="' + riga_id + '">');
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$.getJSON("/admin/service/catlist", {}, function(data) {
|
||||
$.each(data, function(i, item) {
|
||||
$("select[name='mov_fk_categoria']").append(
|
||||
new Option(item.cat_name, item.id)
|
||||
)
|
||||
}
|
||||
);
|
||||
});
|
||||
/*
|
||||
|
||||
$.getJSON("/admin/service/taglist", {}, function(data) {
|
||||
$.each(data, function(i, item) {
|
||||
@@ -74,3 +128,5 @@ $.getJSON("/admin/service/taglist", {}, function(data) {
|
||||
)
|
||||
});
|
||||
});
|
||||
|
||||
*/
|
||||
|
||||
10
public/js/app/progetti.js
vendored
10
public/js/app/progetti.js
vendored
@@ -1,6 +1,14 @@
|
||||
$(document).ready(function() {
|
||||
|
||||
$('#tab_progetti').DataTable({
|
||||
responsive: true
|
||||
"responsive": true,
|
||||
columnDefs: [
|
||||
{
|
||||
target: 1,
|
||||
render: DataTable.render.date(),
|
||||
}
|
||||
],
|
||||
"order": [[1, "desc"]]
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
13
public/js/app/rigaProgetti.js
vendored
13
public/js/app/rigaProgetti.js
vendored
@@ -1,8 +1,15 @@
|
||||
$(document).ready(function() {
|
||||
$('#tab_progetti').DataTable({
|
||||
responsive: true
|
||||
"responsive": true,
|
||||
columnDefs: [
|
||||
{
|
||||
target: 0,
|
||||
render: DataTable.render.date(),
|
||||
}
|
||||
],
|
||||
"order": [[0, "desc"]]
|
||||
});
|
||||
|
||||
});
|
||||
$('#form').click(function() {
|
||||
$('form').toggle();
|
||||
});
|
||||
@@ -35,4 +42,4 @@ $(document).ready(function() {
|
||||
$('#myModal_addRow').modal('show');
|
||||
// $('#form_new').attr('action', 'progetti/new');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
127
public/js/app/task.js
vendored
Normal file
127
public/js/app/task.js
vendored
Normal file
@@ -0,0 +1,127 @@
|
||||
$(document).ready(function() {
|
||||
$('#listatask').DataTable({
|
||||
"responsive": true,
|
||||
columnDefs: [
|
||||
{
|
||||
target: 0,
|
||||
render: DataTable.render.date(),
|
||||
}
|
||||
],
|
||||
"order": [[0, "desc"]]
|
||||
});
|
||||
});
|
||||
$(".draggable").draggable();
|
||||
var d = new Date();
|
||||
|
||||
var month = d.getMonth()+1;
|
||||
var day = d.getDate();
|
||||
|
||||
var strDate = d.getFullYear() + '-' +
|
||||
(month<10 ? '0' : '') + month + '-' +
|
||||
(day<10 ? '0' : '') + day;
|
||||
|
||||
|
||||
$(document).on('click', '.open_modal_new', function() {
|
||||
console.log(strDate);
|
||||
$("#titolo").empty();
|
||||
$("#descrizione").empty();
|
||||
$('#form').find('input[type="text"], textarea, input[type="number"],input[type="date"],option').val("");
|
||||
$('#form').find('input[type="date"]').val(strDate);
|
||||
$('#myModal').modal('show');
|
||||
$('.modal-title').text(' Nuova attività');
|
||||
$('#form').attr('action', '/admin/task/new');
|
||||
$.getJSON("/admin/service/getUsers", {}, function(users) {
|
||||
$.each(users, function(i, users) {
|
||||
$("select[name='assegnato_a']").append(
|
||||
new Option(users.name, users.id)
|
||||
)
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
/*
|
||||
$(document).on('click', '.open_modal_entrata', function() {
|
||||
console.log(strDate);
|
||||
$("#titolo").empty();
|
||||
$("#tags").empty();
|
||||
$('#form').find('input[type="text"], textarea, input[type="number"],option').val("");
|
||||
$('#form').find('input[type="date"]').val(strDate);
|
||||
$('#myModal_new').modal('show');
|
||||
$('.modal-title').text('Nuovo movimento in entrata');
|
||||
$('#form').attr('action', '/admin/movimenti/entrata');
|
||||
$.getJSON("/admin/service/catlistEntrata", {}, function(data) {
|
||||
$.each(data, function(i, item) {
|
||||
$("select[name='mov_fk_categoria']").append(
|
||||
new Option(item.cat_name, item.id)
|
||||
)
|
||||
}
|
||||
);
|
||||
});
|
||||
$.getJSON("/admin/service/taglist", {}, function(data) {
|
||||
$.each(data, function(i, item) {
|
||||
$("select[name='mov_fk_tags']").append(
|
||||
new Option(item.tag_name, item.id)
|
||||
)
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click', '.open_modal_modifica', function() {
|
||||
var url = "/admin/movimenti/modify";
|
||||
var riga_id = $(this).val();
|
||||
$("#categoria").empty();
|
||||
$("#tags").empty();
|
||||
$.getJSON(url + '/' + riga_id, function(data) {
|
||||
// success data
|
||||
console.log(data[0]);
|
||||
$.getJSON("/admin/service/taglist", {}, function(tags) {
|
||||
$.each(tags, function(i, tag) {
|
||||
$("select[name='mov_fk_tags']").append(
|
||||
new Option(tag.tag_name, tag.id)
|
||||
)
|
||||
$('#tags')
|
||||
.find('option:contains(' + data[0].tag_name + ')')
|
||||
.prop('selected', true)
|
||||
.trigger('change');
|
||||
});
|
||||
});
|
||||
$.getJSON("/admin/service/catlist", {}, function(cats) {
|
||||
$.each(cats, function(i, cat) {
|
||||
$("select[name='mov_fk_categoria']").append(
|
||||
new Option(cat.cat_name, cat.id)
|
||||
)
|
||||
$('#categoria')
|
||||
.find('option:contains(' + data[0].cat_name + ')')
|
||||
.prop('selected', true)
|
||||
.trigger('change');
|
||||
}
|
||||
);
|
||||
});
|
||||
$('.modal-title').text('Modifica movimento');
|
||||
$('#data').val(data[0].mov_data);
|
||||
$('#descrizione').val(data[0].mov_descrizione);
|
||||
$('#importo').val(data[0].mov_importo);
|
||||
|
||||
$('#myModal').modal('show');
|
||||
// $('.panel-heading').text('Modifica movimento');
|
||||
$('#form').attr('action', '/admin/movimenti/modify');
|
||||
$('#form').append('<input type="hidden" name="id" value="' + riga_id + '">');
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
/*
|
||||
|
||||
$.getJSON("/admin/service/taglist", {}, function(data) {
|
||||
$.each(data, function(i, item) {
|
||||
$("select[name='mov_fk_tags']").append(
|
||||
new Option(item.tag_name, item.id)
|
||||
)
|
||||
});
|
||||
});
|
||||
|
||||
*/
|
||||
0
public/js/momentjs.js
vendored
Normal file
0
public/js/momentjs.js
vendored
Normal file
42
public/js/nicepage.js
vendored
Normal file
42
public/js/nicepage.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -7,7 +7,7 @@
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
<title>BuBo Family - made with <3 - </title>
|
||||
<title>{{env('APP_NAME')}}</title>
|
||||
|
||||
<!-- Bootstrap Core CSS -->
|
||||
<link href="/css/bootstrap.min.css" rel="stylesheet">
|
||||
@@ -20,22 +20,9 @@
|
||||
|
||||
<!-- Custom Fonts -->
|
||||
<link href="/css/font-awesome.min.css" rel="stylesheet" type="text/css">
|
||||
<!-- Latest compiled and minified CSS
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-select@1.13.14/dist/css/bootstrap-select.min.css">
|
||||
-->
|
||||
<!-- Latest compiled and minified JavaScript
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap-select@1.13.14/dist/js/bootstrap-select.min.js"></script>-->
|
||||
|
||||
<!-- (Optional) Latest compiled and minified JavaScript translation files
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap-select@1.13.14/dist/js/i18n/defaults-*.min.js"></script>-->
|
||||
|
||||
|
||||
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
<!-- Datatables with datetime and locales -->
|
||||
<link href="https://cdn.datatables.net/v/dt/dt-1.13.4/date-1.4.1/r-2.4.1/sb-1.4.2/sp-2.1.2/datatables.min.css" rel="stylesheet"/>
|
||||
@section('head_additional')
|
||||
@show
|
||||
</head>
|
||||
@@ -108,19 +95,22 @@
|
||||
<!-- /#wrapper -->
|
||||
|
||||
<!-- jQuery -->
|
||||
<script src="/js/jquery.min.js"></script>
|
||||
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.13.1/jquery-ui.min.js"></script>
|
||||
<!-- Bootstrap Core JavaScript -->
|
||||
<script src="/js/bootstrap.min.js"></script>
|
||||
|
||||
<!-- Metis Menu Plugin JavaScript -->
|
||||
<script src="/js/metisMenu.min.js"></script>
|
||||
|
||||
<!-- DataTables JavaScript -->
|
||||
<script src="https://cdn.datatables.net/v/dt/dt-1.13.4/date-1.4.1/r-2.4.1/sb-1.4.2/sp-2.1.2/datatables.min.js"></script>
|
||||
<!-- DataTables JavaScript
|
||||
<script src="/js/dataTables/jquery.dataTables.min.js"></script>
|
||||
<script src="/js/dataTables/dataTables.bootstrap.min.js"></script>
|
||||
<script src="/js/dataTables/dataTables.bootstrap.min.js"></script>-->
|
||||
|
||||
<!-- Custom Theme JavaScript -->
|
||||
|
||||
<script src="/js/momentjs.js"></script>
|
||||
<script src="/js/startmin.js"></script>
|
||||
@section('script')
|
||||
@show
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
@foreach($operazione as $operazioni)
|
||||
@if ($operazioni->type =='revisione')
|
||||
<tr>
|
||||
<td>{{ $operazioni->data; }}</td>
|
||||
<td>{{ date_format(date_create($operazioni->data),'d/m/Y'); }}</td>
|
||||
<td>{{ $operazioni->km; }}</td>
|
||||
@if($revisione[$operazioni->id][0]->superata >0)
|
||||
<td>Superata</td>
|
||||
@@ -135,7 +135,7 @@
|
||||
@foreach($operazione as $operazioni)
|
||||
@if ($operazioni->type =='manutenzione')
|
||||
<tr>
|
||||
<td>{{ $operazioni->data; }}</td>
|
||||
<td>{{ date_format(date_create($operazioni->data),'d/m/Y'); }}</td>
|
||||
<td>{{ $operazioni->km; }}</td>
|
||||
<td>{{ $manutenzione[$operazioni->id][0]->descrizione; }}</td>
|
||||
<td>{{ $operazioni->importo; }}</td>
|
||||
@@ -175,7 +175,7 @@
|
||||
@foreach($operazione as $operazioni)
|
||||
@if ($operazioni->type=='accessori')
|
||||
<tr>
|
||||
<td>{{ $operazioni->data; }}</td>
|
||||
<td>{{ date_format(date_create($operazioni->data),'d/m/Y'); }}</td>
|
||||
<td>{{ $operazioni->km; }}</td>
|
||||
<td>{{ $accessori[$operazioni->id][0]->descrizione; }}</td>
|
||||
<td>{{ $operazioni->importo; }}</td>
|
||||
@@ -217,7 +217,7 @@
|
||||
@foreach($operazione as $operazioni)
|
||||
@if ($operazioni->type =='rifornimento')
|
||||
<tr>
|
||||
<td>{{ $operazioni->data; }}</td>
|
||||
<td>{{ date_format(date_create($operazioni->data),'d/m/Y'); }}</td>
|
||||
<td>{{ $operazioni->km; }}</td>
|
||||
<td>{{ $rifornimento[$operazioni->id][0]->distributore; }}</td>
|
||||
<td>{{ $rifornimento[$operazioni->id][0]->eurolitro; }}</td>
|
||||
|
||||
@@ -97,7 +97,7 @@ table{
|
||||
@foreach($operazione as $operazioni)
|
||||
@if ($operazioni->type =='revisione')
|
||||
<tr>
|
||||
<td>{{ $operazioni->data; }}</td>
|
||||
<td>{{ date_format(date_create($operazioni->data),'d/m/Y'); }}</td>
|
||||
<td>{{ $operazioni->km; }}</td>
|
||||
<td>{{ $revisione[$operazioni->id][0]->superata; }}</td>
|
||||
<td>{{ $revisione[$operazioni->id][0]->centrorevisione; }}</td>
|
||||
@@ -140,7 +140,7 @@ table{
|
||||
@foreach($operazione as $operazioni)
|
||||
@if ($operazioni->type =='manutenzione')
|
||||
<tr>
|
||||
<td>{{ $operazioni->data; }}</td>
|
||||
<td>{{ date_format(date_create($operazioni->data),'d/m/Y'); }}</td>
|
||||
<td>{{ $operazioni->km; }}</td>
|
||||
<td>{{ $manutenzione[$operazioni->id][0]->descrizione; }}</td>
|
||||
<td>{{ $operazioni->importo; }}</td>
|
||||
@@ -180,7 +180,7 @@ table{
|
||||
@foreach($operazione as $operazioni)
|
||||
@if ($operazioni->type=='accessori')
|
||||
<tr>
|
||||
<td>{{ $operazioni->data; }}</td>
|
||||
<td>{{ date_format(date_create($operazioni->data),'d/m/Y'); }}</td>
|
||||
<td>{{ $operazioni->km; }}</td>
|
||||
<td>{{ $accessori[$operazioni->id][0]->descrizione; }}</td>
|
||||
<td>{{ $operazioni->importo; }}</td>
|
||||
@@ -222,7 +222,7 @@ table{
|
||||
@foreach($operazione as $operazioni)
|
||||
@if ($operazioni->type =='rifornimento')
|
||||
<tr>
|
||||
<td>{{ $operazioni->data; }}</td>
|
||||
<td>{{ date_format(date_create($operazioni->data),'d/m/Y'); }}</td>
|
||||
<td>{{ $operazioni->km; }}</td>
|
||||
<td>{{ $rifornimento[$operazioni->id][0]->distributore; }}</td>
|
||||
<td>{{ $rifornimento[$operazioni->id][0]->eurolitro; }}</td>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered table-hover"
|
||||
id="automobili">
|
||||
id="listaAutomobili">
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
<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>
|
||||
@@ -17,7 +19,15 @@
|
||||
<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('contratti')
|
||||
<li><a href="{{ route('contratti'); }}"><i class="fa fa-list fa-fw"></i>
|
||||
Contratti <span class="fa arrow"></span></a>
|
||||
</li>
|
||||
@endcan
|
||||
@can('consumi')
|
||||
<li><a href="#"><i class="fa fa-industry fa-fw"></i> Consumi <span
|
||||
class="fa arrow"></span></a>
|
||||
|
||||
@@ -27,9 +37,12 @@
|
||||
</li>
|
||||
<li><a href="{{ route('enel'); }}"><i class="fa fa-flash fa-fw"></i>Energia
|
||||
Elettrica</a></li>
|
||||
</ul></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>
|
||||
|
||||
@@ -40,15 +53,29 @@
|
||||
<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('tasks')
|
||||
<li><a href="{{ route('tasks'); }}"><i class="fa fa-list fa-fw"></i>
|
||||
Attività <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="#">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 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/givepermission">Assegna Permessi</a></li>
|
||||
<li><a class="active" href="/admin/users/giverole">Assegna Ruoli</a></li>
|
||||
<!--
|
||||
<li><a href="/login">Login Page</a></li>
|
||||
-->
|
||||
</ul> <!-- /.nav-second-level --></li>
|
||||
@endcan
|
||||
|
||||
@@ -7,10 +7,15 @@
|
||||
<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>
|
||||
@can('amministrazione')
|
||||
<li class="divider"></li>
|
||||
<li><a href="/admin/users/new"><i class="fa fa-gear fa-fw"></i> Gestisci Utenti</a></li>
|
||||
@endcan
|
||||
<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 -->
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Categoria</th>
|
||||
<th>Classificazione</th>
|
||||
<th>Azione</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -30,6 +31,14 @@
|
||||
<td><a
|
||||
href="movimenti/report/movimentibycat?cat={{ $categoria->id }}">{{
|
||||
$categoria->cat_name; }}</a></td>
|
||||
<td>
|
||||
@if($categoria->cat_entrata == 1)
|
||||
Entrata ,
|
||||
@endif
|
||||
@if($categoria->cat_uscita == 1)
|
||||
Uscita
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<button class="btn btn-warning btn-detail open_modal"
|
||||
value="{{$categoria->id}}">Edit</button> <a
|
||||
@@ -47,38 +56,54 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- MODAL MODIFICA -->
|
||||
<div class="modal fade" id="myModal" tabindex="-1" role="dialog"
|
||||
aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Modifica Categoria</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<form action="/admin/categorie/modify" method="POST">
|
||||
@csrf <label for="H_cat_cat_name" class="form-label">Categoria</label>
|
||||
<input type="text" class="form-control" id="H_cat_cat_name"
|
||||
size="50" name="cat_name" value="" size="50">
|
||||
|
||||
<!-- MODAL MODIFICA -->
|
||||
<div class="modal fade" id="myModal" tabindex="-1" role="dialog"
|
||||
aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<form action="/admin/categorie/modify" method="POST">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Modifica Categoria</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
|
||||
@csrf
|
||||
<label for="H_cat_cat_name" class="form-label">Categoria</label>
|
||||
<input type="text" class="form-control" id="H_cat_cat_name" size="50" name="cat_name">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" role="switch" id="cat_entrata" name="cat_entrata" >
|
||||
<label class="form-check-label" for="cat_entrata">Entrata</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" role="switch" id="cat_uscita" name="cat_uscita">
|
||||
<label class="form-check-label" for="cat_uscita">Uscita</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<input type="hidden" name="id" id="H_cat_id">
|
||||
<button type="submit" class="btn btn-primary">Modifica</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<input type="hidden" name="id" id="H_cat_id">
|
||||
<button type="submit" class="btn btn-primary">Modifica</button>
|
||||
</div>
|
||||
</form>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- FINE MODAL MODIFICA -->
|
||||
<!-- MODAL INSERIMENTO -->
|
||||
<div class="modal fade" id="myModal_new" tabindex="-1" role="dialog"
|
||||
aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<!-- FINE MODAL MODIFICA -->
|
||||
<!-- MODAL INSERIMENTO -->
|
||||
<div class="modal fade" id="myModal_new" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
@@ -89,11 +114,26 @@
|
||||
<div class="col-md-8">
|
||||
<!-- FORM INSERIMENTO NUOVA CATEGORIA -->
|
||||
<form action="" method="POST">
|
||||
@csrf <label for="categoria" class="form-label">Categoria</label>
|
||||
@csrf
|
||||
<label for="categoria" class="form-label">Categoria</label>
|
||||
<input type="text" class="form-control" id="categoria"
|
||||
name="cat_name" size="50">
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" role="switch" id="cat_entrata" name="cat_entrata" >
|
||||
<label class="form-check-label" for="cat_entrata">Entrata</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" role="switch" id="cat_uscita" name="cat_uscita">
|
||||
<label class="form-check-label" for="cat_uscita">Uscita</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
@@ -103,11 +143,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- FINE MODAL INSERIMENTO -->
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- /.col-lg-12 -->
|
||||
|
||||
@endsection
|
||||
|
||||
@@ -21,6 +21,10 @@
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<input type="hidden" name="movimenti_id" value="{{ $id }}">
|
||||
<!-- {issue #5}
|
||||
<input type="hidden" name="entita" value="Movimenti">
|
||||
<input type="hidden" name="entita_id" value="{{$id}}">
|
||||
-->
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -31,8 +31,9 @@
|
||||
<tbody>
|
||||
@foreach( $movimenti as $movimento )
|
||||
<tr>
|
||||
<td>{{ $movimento->mov_data; }}</td>
|
||||
<td>{{ $movimento->cat_name; }}</td>
|
||||
<!-- <td>{{ date_format(date_create($movimento->mov_data),'d/m/Y'); }}</td>-->
|
||||
<td>{{ $movimento->mov_data}}</td>
|
||||
<td>{{ $movimento->cat_name; }}</td>
|
||||
<td>{{ $movimento->mov_descrizione; }}</td>
|
||||
<td>€ {{ $movimento->mov_importo; }}</td>
|
||||
<td>
|
||||
@@ -58,9 +59,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- MODAL NEW -->
|
||||
<div class="modal fade" id="myModal" tabindex="-1" role="dialog"
|
||||
<div class="modal fade " id="myModal" tabindex="-1" role="dialog"
|
||||
aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-dialog draggable" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Nuovo movimento</h4>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<tbody>
|
||||
@foreach( $dataSpesa as $dato )
|
||||
<tr>
|
||||
<td><a href="movimenti/report/movimenti_categoria?cat={{ $dato->id }}&month={{ $_GET['Month'] ?? date('m')}}">{{ $dato->cat_name; }}</a> </td>
|
||||
<td><a href="/admin/movimenti/report/movimenti_categoria?cat={{ $dato->id }}&month={{ $_GET['Month'] ?? date('m')}}">{{ $dato->cat_name; }}</a> </td>
|
||||
<td>{{ $dato->resoconto; }}</td>
|
||||
|
||||
</tr>
|
||||
@@ -55,7 +55,7 @@
|
||||
<tbody>
|
||||
@foreach( $dataEntrate as $dato )
|
||||
<tr>
|
||||
<td><a href="movimenti/report/movimenti_categoria?cat={{ $dato->id }}&month={{ $_GET['Month'] ?? date('m')}}">{{ $dato->cat_name; }}</a> </td>
|
||||
<td><a href="/admin/movimenti/report/movimenti_categoria?cat={{ $dato->id }}&month={{ $_GET['Month'] ?? date('m')}}">{{ $dato->cat_name; }}</a> </td>
|
||||
<td>{{ $dato->resoconto; }}</td>
|
||||
|
||||
</tr>
|
||||
@@ -72,4 +72,3 @@
|
||||
@section('script')
|
||||
<script src="/js/app/conti_categorie.js"></script>
|
||||
@endsection
|
||||
|
||||
55
resources/views/contratti/lista.blade.php
Normal file
55
resources/views/contratti/lista.blade.php
Normal file
@@ -0,0 +1,55 @@
|
||||
@extends('admin')
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">Lista dei Contratti</h1>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
Lista contratti
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<table class="table table-striped table-bordered table-hover" id="contratti" data-page-length='25'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Numero contratto</th>
|
||||
<th>Data Contratto</th>
|
||||
<th>Data Termine</th>
|
||||
<th>Fornitore</th>
|
||||
<th>Tipo contratto</th>
|
||||
<th>Importo</th>
|
||||
<th>Stato</th>
|
||||
<th>Documento</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($data as $contratto)
|
||||
<tr>
|
||||
<td>{{$contratto->numero}}</td>
|
||||
<td>{{$contratto->datainizio}}</td>
|
||||
<td>{{$contratto->datatermine}}</td>
|
||||
<td>{{$contratto->fornitore}}</td>
|
||||
<td>{{$contratto->tipo}}</td>
|
||||
<td>{{$contratto->importo}}</td>
|
||||
<td>{{$contratto->stato}}</td>
|
||||
<td>{{$contratto->filename}}</td>
|
||||
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<!-- Footer del pannello -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@section('script')
|
||||
<script src="/js/app/contratti.js"></script>
|
||||
@endsection
|
||||
26
resources/views/documenti/lista.blade.php
Normal file
26
resources/views/documenti/lista.blade.php
Normal file
@@ -0,0 +1,26 @@
|
||||
@extends('admin')
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">Lista dei Documenti</h1>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
Lista documenti
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<!-- Corpo del pannello -->
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<!-- Footer del pannello -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@section('script')
|
||||
<script src="/js/app/documenti.js"></script>
|
||||
@endsection
|
||||
@@ -6,17 +6,18 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@hasanyrole('user|admin')
|
||||
<!-- WIDGET Bilancio -->
|
||||
<div class="col-lg-4 col-md-8">
|
||||
<div class="panel panel-primary">
|
||||
<div class="col-lg-3 col-md-8 draggable">
|
||||
<div class="panel panel-success">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<i class="fa fa-balance-scale fa-5x"></i>
|
||||
<i class="fa fa-plus-square fa-5x"></i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="huge">{{ $bilancio }}</div>
|
||||
<div>Bilancio attuale anno {{ date('Y') }}</div>
|
||||
<div class="huge">{{ $entrate }}</div>
|
||||
<div>Entrate attuale anno {{ date('Y') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -29,9 +30,55 @@
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- WIDGET Bilancio -->
|
||||
<div class="col-lg-3 col-md-8 draggable">
|
||||
<div class="panel panel-danger">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<i class="fa fa-minus-square fa-5x"></i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="huge">{{ $uscite }}</div>
|
||||
<div>Uscite attuale anno {{ date('Y') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a href="{{ route('budget');}}">
|
||||
<div class="panel-footer">
|
||||
<span class="pull-left">Report annuo</span>
|
||||
<span class="pull-right"><i class="fa fa-arrow-circle-right"></i></span>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- WIDGET -->
|
||||
<div class="col-lg-4 col-md-8">
|
||||
<div class="panel panel-green">
|
||||
<div class="col-lg-3 col-md-8 draggable">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<i class="fa fa-balance-scale fa-5x"></i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="huge">{{ $entrate + $uscite }}</div>
|
||||
<div>Saldo attuale nell'anno</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a href="{{ route('budget'); }}">
|
||||
<div class="panel-footer">
|
||||
<span class="pull-left">Report annuo</span>
|
||||
<span class="pull-right"><i class="fa fa-arrow-circle-right"></i></span>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3 col-md-8 draggable">
|
||||
<div class="panel panel-yellow">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
@@ -52,9 +99,83 @@
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@endhasanyrole
|
||||
|
||||
</div>
|
||||
|
||||
@can('tasks')
|
||||
<!-- Se ha i permessi task -->
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-md-8 draggable">
|
||||
<div class="chat-panel panel panel-default">
|
||||
<div class="panel-heading">
|
||||
Attività da svolgere
|
||||
</div>
|
||||
<div class="panel-body" id="mieitask">
|
||||
<ul class="chat">
|
||||
@foreach($mieitask as $task)
|
||||
<span class="chat-img pull-left">
|
||||
<!-- rendere immagine dinamica -->
|
||||
<img src="{{ Gravatar::get(App\Models\User::getUserById($task->assegnato_a)->email)}}" width="32" class="img-circle">
|
||||
</span>
|
||||
<div class="chat-body clearfix">
|
||||
<li class="left clearfix">
|
||||
@if($task->stato==='Chiuso')
|
||||
<s>
|
||||
<a href="#{{ $task->id }}"> {{ $task->titolo }}</a>
|
||||
</s><br>
|
||||
<h6>{{$task->descrizione}}</h6>
|
||||
@else
|
||||
<b><a href="#{{ $task->id }}"> {{ $task->titolo }}</a></b><br>
|
||||
<h6>{{$task->descrizione}}</h6>
|
||||
@endif
|
||||
</li>
|
||||
</div>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-8 draggable">
|
||||
<div class="chat-panel panel panel-default" >
|
||||
<div class="panel-heading">
|
||||
<i class="fa fa-arrow-circle-right"></i> Avvisi e informazioni
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<ul class="chat">
|
||||
@foreach($avvisi as $avviso)
|
||||
<span class="chat-img pull-left">
|
||||
<!-- rendere immagine dinamica -->
|
||||
<img src="{{ Gravatar::get(App\Models\User::getUserById($avviso->creato_da)->email)}}" width="32" class="img-circle">
|
||||
</span>
|
||||
<div class="chat-body clearfix">
|
||||
<li class="left clearfix">
|
||||
|
||||
<a href="#{{ $avviso->id }}"><i>{{date_format(date_create($avviso->creato_il),'d/m/Y')}}</i> - {{ $avviso->avviso }}</a>
|
||||
|
||||
</li>
|
||||
</div>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<form action="{{ Route('newAvviso') }}" method="POST">
|
||||
@csrf
|
||||
<label for="avviso" class="form-label">Nuovo Avviso:</label>
|
||||
<textarea class="form-control" name="avviso"></textarea>
|
||||
<input type="hidden" name="creato_da" value="{{ Auth::user()->id }}">
|
||||
<input type="submit" name="submit" class="button btn-primary">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endcan
|
||||
@endsection
|
||||
|
||||
@section('script')
|
||||
<script src="/js/app/dashboard.js"></script>
|
||||
<script src="js/app/dashboard.js"></script>
|
||||
@endsection
|
||||
@@ -62,7 +62,7 @@
|
||||
<tbody>
|
||||
@foreach($lettureEnel as $lettura)
|
||||
<tr>
|
||||
<td>{{ $lettura->enel_date; }}</td>
|
||||
<td>{{ $lettura->enel_date }}</td>
|
||||
<td>{{ $lettura->enel_A; }}</td>
|
||||
<td>{{ $lettura->enel_R; }}</td>
|
||||
<td>{{ $lettura->enel_F1; }}</td>
|
||||
@@ -83,4 +83,3 @@
|
||||
@section('script')
|
||||
<script src="/js/app/enel.js"></script>
|
||||
@endsection
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
}
|
||||
@endphp
|
||||
<tr>
|
||||
<td>{{ $lettura->gas_date; }}</td>
|
||||
<td>{{ $lettura->gas_date }}</td>
|
||||
<td>{{ $lettura->gas_lettura; }}</td>
|
||||
@if(!is_null($dateprec))
|
||||
<td>{{ $diffdate ?? '' }}</td>
|
||||
@@ -101,4 +101,3 @@
|
||||
@section('script')
|
||||
<script src="/js/app/gas.js"></script>
|
||||
@endsection
|
||||
|
||||
9
resources/views/mail/test.blade.php
Normal file
9
resources/views/mail/test.blade.php
Normal file
@@ -0,0 +1,9 @@
|
||||
@component('mail::message')
|
||||
|
||||
Ciao {{ Auth::user()->name ?? $name }},
|
||||
Hai configurato correttamente la posta elettronica!
|
||||
|
||||
|
||||
Buona giornata,<br>
|
||||
{{ config('app.name') }}
|
||||
@endcomponent
|
||||
93
resources/views/progetti/PDF/scheda.blade.php
Normal file
93
resources/views/progetti/PDF/scheda.blade.php
Normal file
@@ -0,0 +1,93 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Scheda Progetto</title>
|
||||
|
||||
<style type="text/css">
|
||||
* {
|
||||
font-family: Verdana, Arial, sans-serif;
|
||||
}
|
||||
table{
|
||||
font-size: x-small;
|
||||
}
|
||||
tfoot tr td{
|
||||
font-weight: bold;
|
||||
font-size: x-small;
|
||||
}
|
||||
.gray {
|
||||
background-color: lightgray
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
@foreach($tot as $totale) @endforeach @foreach($dettaglio ?? '' as $progetto)
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<!-- <td valign="top"><img src="{{asset('images/meteor-logo.png')}}" alt="" width="150"/></td> -->
|
||||
<td>
|
||||
<h3>Progetto: #{{$progetto->id}}:{{$progetto->nome}}</h3>
|
||||
|
||||
<p> {{$progetto->descrizione}}</p>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
<hr>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td><strong>Creato il:</strong> {{ date('d/m/Y',strtotime($progetto->data_creazione)) }}</td>
|
||||
<td><strong>Inizio:</strong> {{ date('d/m/Y',strtotime($progetto->data_inizio)) }}</td>
|
||||
<td><strong>Termine:</strong> {{ date('d/m/Y',strtotime($progetto->data_fine)) }}</td>
|
||||
<td><strong>Stato:</strong> {{ $progetto->stato }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Budget iniziale:</strong> {{ $progetto->budget }}</td>
|
||||
<td><strong>Costi sostenuti:</strong> {{ $totale->costo}}</td>
|
||||
<td><strong>Scostamento:</strong>{{ $progetto->budget - $totale->costo}}</td>
|
||||
<td><strong>Coordinatore:</strong> {{ $progetto->name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4" class="gray">DESCRIZIONE:</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4">{{ $progetto->note }}</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
@endforeach
|
||||
<br/>
|
||||
|
||||
<table width="100%">
|
||||
<thead style="background-color: lightgray;">
|
||||
<tr>
|
||||
<th>Data</th>
|
||||
<th>Descrizione</th>
|
||||
<th>Ore</th>
|
||||
<th>Costi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($righe as $riga)
|
||||
<tr>
|
||||
<td>{{ date('d/m/Y',strtotime($riga->data)) }}</td>
|
||||
<td>{{ $riga->descrizione }}</td>
|
||||
<td>{{ $riga->ore }}</td>
|
||||
<td>{{ $riga->prezzo }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2"></td>
|
||||
<td align="right">Totale</td>
|
||||
<td align="right" class="gray">{{ $totale->costo}} €</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -86,7 +86,7 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-10">
|
||||
<div class="row p-3">
|
||||
<button class="btn btn-primary open_modal_addRow">Nuova riga</button>
|
||||
@if($progetto->stato !='chiuso')<button class="btn btn-primary open_modal_addRow">Nuova riga</button>@endif
|
||||
</div>
|
||||
<div class="row">
|
||||
<table class="table table-striped table-bordered table-hover"
|
||||
@@ -107,11 +107,11 @@
|
||||
<td>{{ $riga->descrizione }}</td>
|
||||
<td>{{ $riga->ore }}</td>
|
||||
<td>{{ $riga->prezzo }}</td>
|
||||
<td><a
|
||||
<td>@if($progetto->stato !='chiuso')<a
|
||||
href="/admin/progetti/delete_row/{{ $riga->id }}/return/{{ $progetto->id }}"
|
||||
class="btn btn-danger">X</a>
|
||||
<button class="btn btn-warning btn-detail open_modal"
|
||||
value="{{$riga->id}}">Edit</button></td>
|
||||
value="{{$riga->id}}">Edit</button>@endif</td>
|
||||
|
||||
</tr>
|
||||
@else
|
||||
|
||||
@@ -38,12 +38,17 @@
|
||||
<tr>
|
||||
<td><a href="progetti/detail/{{ $progetto->progetto }}">{{
|
||||
$progetto->nome; }}</a></td>
|
||||
<td>{{ $progetto->data_creazione; }}</td>
|
||||
<td>{{ $progetto->data_creazione}}</td>
|
||||
<td>{{ $progetto->stato; }}</td>
|
||||
<td>{{ $progetto->name; }}</td>
|
||||
<td>{{ $progetto->budget; }}</td>
|
||||
<td><a href="progetti/delete?id={{ $progetto->progetto }}"
|
||||
class="btn btn-danger">Cancella</a></td>
|
||||
<td>@if($progetto->stato != 'chiuso')<a href="progetti/delete?id={{ $progetto->progetto }}"
|
||||
class="btn btn-danger">Cancella</a> <a href="progetti/close?id={{ $progetto->progetto }}"
|
||||
class="btn btn-danger">Chiudi</a>@endif
|
||||
@if($progetto->stato == 'chiuso')<a href="progetti/reopen?id={{ $progetto->progetto }}"
|
||||
class="btn btn-danger">Riapri</a>@endif
|
||||
<a href="progetti/print?id={{ $progetto->progetto }}"
|
||||
class="btn btn-primary">Stampa PDF</a></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
104
resources/views/tasks/list.blade.php
Normal file
104
resources/views/tasks/list.blade.php
Normal file
@@ -0,0 +1,104 @@
|
||||
@extends('admin')
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">Lista Attività</h1>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="container">
|
||||
<!-- Content here -->
|
||||
<div class="row">
|
||||
<div class="col-xs-12 ">
|
||||
<button class="btn btn-primary open_modal_new "><i
|
||||
class="fa fa-pencil-square-o fw"></i>Nuova Attività</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class ="row">
|
||||
<div class="col">
|
||||
<div class="panel panel-default ">
|
||||
<div class="panel panel-heading">
|
||||
Tutte le Attività
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<ul class="chat">
|
||||
@foreach($tasks as $task)
|
||||
<li class="left" clearfix>
|
||||
<span class="chat-img pull-left">
|
||||
<!-- rendere immagine dinamica -->
|
||||
<img src="{{ Gravatar::get(App\Models\User::getUserById($task->assegnato_a)->email )}}" width="32" class="img-circle">
|
||||
</span>
|
||||
<div class="chat-body clearfix">
|
||||
{{ $task->titolo}}
|
||||
</div>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- HIDDEN -->
|
||||
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog draggable" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Nuova Attività</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
<!-- FORM INSERIMENTO NUOVA ATTIVITA -->
|
||||
<form action="" method="POST" id="form">
|
||||
@csrf
|
||||
<label for="titolo" class="form-label">Titolo:</label>
|
||||
<input type="text" class="form-control" id="titolo"
|
||||
name="titolo" size="50">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
<label for="descrizione" class="form-label">Descrizione:</label>
|
||||
<textarea class="form-control" name="descrizione" id="descrizione"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<label for="assegnato_a" class="form-label">Assegna a:</label>
|
||||
<!-- SELECT USER -->
|
||||
<select name="assegnato_a" id="assegnato_a" class="form-control">
|
||||
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<!-- Data termine datetimepicker -->
|
||||
<label for="termine_il" class="form-label">Termine:</label>
|
||||
<input type="date" name="termine_il" class="form-control" value="{{ date('Y-m-d'); }}" id="termine_il">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<input type="hidden" name="creato_da" value="{{ Auth::user()->id }}">
|
||||
<input type="hidden" name="stato" value="Aperto">
|
||||
<input type="hidden" name="creato_il" value="{{ date('Y-m-d'); }}">
|
||||
<input type="hidden" name="chiuso_il" value="{{ date('Y-m-d'); }}">
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</form>
|
||||
<!-- FINE FORM INSERIMENTO NUOVA CATEGORIA -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@endsection
|
||||
@section('script')
|
||||
<script src="/js/app/task.js"></script>
|
||||
@endsection
|
||||
47
resources/views/users/assignperm.blade.php
Normal file
47
resources/views/users/assignperm.blade.php
Normal file
@@ -0,0 +1,47 @@
|
||||
@extends('admin')
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">Assegnazione permessi</h1>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
Nuova assegnazione permessi
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<!-- Form -->
|
||||
<form action="" method="POST">
|
||||
<select name="user" class="form-control">
|
||||
@foreach($users as $user)
|
||||
<option value="{{$user->id}}"> {{$user->name}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Permesso</th>
|
||||
<th>Azione</th>
|
||||
</tr>
|
||||
@foreach($permissions as $perm)
|
||||
<tr>
|
||||
<td>{{$perm->name}}</td>
|
||||
<td>
|
||||
Attiva<input type="radio" name="permesso['{{$perm->name}}']" value="true">
|
||||
|
||||
Disattiva <input type="radio" name="permesso['{{$perm->name}}']" value="false">
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
@csrf
|
||||
<input type="Submit" name="submit" value="associa">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
38
resources/views/users/assignrole.blade.php
Normal file
38
resources/views/users/assignrole.blade.php
Normal file
@@ -0,0 +1,38 @@
|
||||
@extends('admin')
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">Assegnazione permessi</h1>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
Nuova assegnazione permessi
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<!-- Form -->
|
||||
<form action="" method="POST">
|
||||
<select name="user" class="form-control">
|
||||
@foreach($users as $user)
|
||||
<option value="{{$user->id}}"> {{$user->name}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<select name="role" class="form-control">
|
||||
@foreach($roles as $role)
|
||||
<option value="{{$role->name}}">{{$role->name}}</td>
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
@csrf
|
||||
<input type="Submit" name="submit" value="associa">
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user