Compare commits
68 Commits
user_role
...
d7fe1fcb81
| Author | SHA1 | Date | |
|---|---|---|---|
| d7fe1fcb81 | |||
| 8ff62254bf | |||
| fc675ce07b | |||
| 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 |
26
README.md
26
README.md
@@ -1,29 +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``` in ```.env```
|
||||
- inserire le informazioni del database (username,password,dbname)
|
||||
- lanciare ``` composer install ```
|
||||
- lanciare ``` php artisan migrate --seed```
|
||||
- di default si crea l'utente ``` admin ``` con password ```admin ``` per accedere la prima volta.
|
||||
|
||||
|
||||
## Sviluppatori (attualmente)
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
22
app/Http/Controllers/ContrattiController.php
Normal file
22
app/Http/Controllers/ContrattiController.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?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::getAllContratto()]);
|
||||
}
|
||||
|
||||
public function newContratto(Request $request)
|
||||
{
|
||||
Contratti::storeContratto($request);
|
||||
return redirect()->back();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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
|
||||
{
|
||||
@@ -19,28 +20,28 @@ class ProgettiController extends Controller
|
||||
'progetti'=>Progetti::getProgetti()
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
public function nuovoProgetto()
|
||||
{
|
||||
return view('progetti.new',['coordinatori'=>User::getUsers()]);
|
||||
}
|
||||
|
||||
|
||||
public function getCoordinatori()
|
||||
{
|
||||
return json_encode(User::getUsers());
|
||||
}
|
||||
|
||||
|
||||
public function salvaProgetto(Request $request)
|
||||
{
|
||||
Progetti::saveProgetto($request);
|
||||
return redirect(Route('progetti'));
|
||||
}
|
||||
|
||||
|
||||
public function deleteProgetto(Request $param) {
|
||||
Progetti::delProgetto($param['id']);
|
||||
return redirect(Route('progetti'));
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function dettaglioProgetto($id)
|
||||
{
|
||||
@@ -51,5 +52,27 @@ class ProgettiController extends Controller
|
||||
return view('progetti.dettaglio',['dettaglio'=>$progetto, 'righe'=>$righe, 'tot'=>$costo_tot]);
|
||||
//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();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -12,7 +12,7 @@ use App\Models\User;
|
||||
|
||||
class Utenti extends Controller
|
||||
{
|
||||
|
||||
|
||||
public function createRole($ruolo)
|
||||
{
|
||||
$role=Role::create(['name'=>$ruolo]);
|
||||
@@ -23,40 +23,87 @@ class Utenti extends Controller
|
||||
$permission=Permission::create(['name'=>$permesso]);
|
||||
return json_encode(Permission::all()->pluck('name'));
|
||||
}
|
||||
|
||||
|
||||
function userClass() {
|
||||
$user=new User();
|
||||
return get_class_methods($user);
|
||||
}
|
||||
|
||||
|
||||
// post del create user
|
||||
function createUser(Request $params){
|
||||
User::addUser($params);
|
||||
return redirect('/admin/users/new');
|
||||
}
|
||||
|
||||
|
||||
// mostra il form della creazione dell'utente
|
||||
function addUser(){
|
||||
$roles = Role::all();
|
||||
$users = User::all();
|
||||
return view('users.create',['ruoli'=>$roles,'users'=>$users]);
|
||||
}
|
||||
|
||||
|
||||
function listUser(){
|
||||
$users = User::all();
|
||||
return view('users.list',['users'=>$users]);
|
||||
return view('users.list',['users'=>$users]);
|
||||
}
|
||||
|
||||
|
||||
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()
|
||||
{
|
||||
$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');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
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;
|
||||
}
|
||||
50
app/Models/Avviso.php
Normal file
50
app/Models/Avviso.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
public static function getHAstatus()
|
||||
{
|
||||
/*$response = Http::withHeaders([
|
||||
'Authorization'=>' Bearer '.env('HA_TOKEN'),
|
||||
'Content-Type'=>' application/json',
|
||||
])->get('https://ha.lavorain.cloud/api/services',['domain']);
|
||||
return $response;
|
||||
// return dd($response);*/
|
||||
}
|
||||
|
||||
public static function getAnsaNews()
|
||||
{
|
||||
/*$xmlstring = Http::get('https://www.ansa.it/trentino/notizie/trentino_rss.xml');
|
||||
$xml_file = simplexml_load_string($xmlstring);
|
||||
$json = json_encode($xml_file );
|
||||
$array = json_decode($json,TRUE);
|
||||
dd($array); // return $array;*/
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -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 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($name){
|
||||
return DB::table('categories')->insert(['cat_name'=> $name]);
|
||||
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,
|
||||
]);
|
||||
|
||||
}
|
||||
|
||||
35
app/Models/Contratti.php
Normal file
35
app/Models/Contratti.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Contratti extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
protected $fillable=['numero','nome','datainizio','datatermine','fornitore','tipo','importo','scadenzapagamento','stato','note','filename'];
|
||||
public static function storeContratto($req){
|
||||
$filename=$req->file('filename')->store('Contratti');
|
||||
|
||||
self::create([
|
||||
'numero'=>$req['numero'],
|
||||
'nome'=>$req['nome'],
|
||||
'datainizio'=>$req['datainizio'],
|
||||
'datatermine'=>$req['datatermine'],
|
||||
'fornitore'=>$req['fornitore'],
|
||||
'tipo'=>$req['tipo'],
|
||||
'importo'=>$req['importo'],
|
||||
'scadenzapagamento'=>$req['scadenzapagamento'],
|
||||
'stato'=>$req['stato'],
|
||||
'note'=>$req['note'],
|
||||
'filename'=>$filename
|
||||
]);
|
||||
|
||||
}
|
||||
|
||||
public static function getAllContratto(){
|
||||
return self::all();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -16,6 +16,14 @@ class Documenti extends Model
|
||||
->count();
|
||||
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');
|
||||
@@ -27,6 +35,20 @@ class Documenti extends Model
|
||||
'filename'=>$filename,
|
||||
]);
|
||||
}
|
||||
|
||||
// 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)
|
||||
{
|
||||
@@ -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')
|
||||
@@ -20,15 +22,15 @@ class Movimenti extends Model
|
||||
->groupBy('movimentis.id','mov_data','mov_descrizione','mov_importo','cat_name','tag_name')
|
||||
->get();
|
||||
}
|
||||
|
||||
|
||||
public static function getSaldo($date) {
|
||||
return DB::table('movimentis')->whereYear('mov_data','=',$date)->sum('mov_importo');
|
||||
}
|
||||
|
||||
|
||||
public static function getSaldoTot() {
|
||||
return DB::table('movimentis')->sum('mov_importo');
|
||||
}
|
||||
|
||||
|
||||
public static function insSpesa($request) {
|
||||
DB::table('movimentis')->insert(
|
||||
[
|
||||
@@ -40,7 +42,7 @@ class Movimenti extends Model
|
||||
'mov_inserito_da'=>$request['userid'],
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
public static function insEntrata($request) {
|
||||
DB::table('movimentis')->insert(
|
||||
[
|
||||
@@ -52,7 +54,7 @@ class Movimenti extends Model
|
||||
'mov_inserito_da'=>$request['userid'],
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
public static function export() {
|
||||
return DB::table('movimentis')
|
||||
->join('categories','movimentis.mov_fk_categoria','=','categories.id')
|
||||
@@ -61,7 +63,7 @@ class Movimenti extends Model
|
||||
->orderBy('Data','asc')
|
||||
->get();
|
||||
}
|
||||
|
||||
|
||||
public static function reportSpesa($year,$month) {
|
||||
return DB::table('movimentis')
|
||||
->selectRaw('ABS(Sum(movimentis.mov_importo)) as resoconto, categories.cat_name,categories.id')
|
||||
@@ -72,7 +74,7 @@ class Movimenti extends Model
|
||||
->groupBy('cat_name','categories.id')
|
||||
->get();
|
||||
}
|
||||
|
||||
|
||||
public static function reportEntrate($year,$month) {
|
||||
return DB::table('movimentis')
|
||||
->selectRaw('ABS(Sum(movimentis.mov_importo)) as resoconto, categories.cat_name,categories.id')
|
||||
@@ -83,7 +85,7 @@ class Movimenti extends Model
|
||||
->groupBy('cat_name','categories.id')
|
||||
->get();
|
||||
}
|
||||
|
||||
|
||||
public static function getMovimentoById($id) {
|
||||
return DB::table('movimentis')
|
||||
->join('categories','movimentis.mov_fk_categoria','=','categories.id')
|
||||
@@ -91,7 +93,7 @@ class Movimenti extends Model
|
||||
->where('movimentis.id','=',$id)
|
||||
->get();
|
||||
}
|
||||
|
||||
|
||||
public static function updateMovimenti($request) {
|
||||
DB::table('movimentis')
|
||||
->where('id','=', $request['id'])
|
||||
@@ -104,13 +106,13 @@ class Movimenti extends Model
|
||||
'mov_inserito_da'=>$request['userid'],
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
public static function deleteMovimento($id) {
|
||||
DB::table('movimentis')
|
||||
->where('id','=', $id)
|
||||
->delete();
|
||||
}
|
||||
|
||||
|
||||
public static function listByCatMonth($month,$cat,$year) {
|
||||
return DB::table('movimentis')
|
||||
->join('categories','movimentis.mov_fk_categoria','=','categories.id')
|
||||
@@ -123,7 +125,7 @@ class Movimenti extends Model
|
||||
->groupBy('movimentis.id','mov_data','mov_descrizione','mov_importo','cat_name','tag_name')
|
||||
->get();
|
||||
}
|
||||
|
||||
|
||||
public static function listByCategory($cat) {
|
||||
return DB::table('movimentis')
|
||||
->join('categories','movimentis.mov_fk_categoria','=','categories.id')
|
||||
@@ -134,7 +136,7 @@ class Movimenti extends Model
|
||||
->groupBy('movimentis.id','mov_data','mov_descrizione','mov_importo','cat_name','tag_name')
|
||||
->get();
|
||||
}
|
||||
|
||||
|
||||
public static function getByTag($tag) {
|
||||
return DB::table('movimentis')
|
||||
->where('mov_fk_tags','=',$tag)
|
||||
@@ -151,12 +153,12 @@ class Movimenti extends Model
|
||||
$inputPath='/var/www/html/bubofamily/public/storage/'.$filename;
|
||||
$outputPath='/var/www/html/bubofamily/public/'.$filename;
|
||||
rename($inputPath,$outputPath);
|
||||
|
||||
|
||||
$collection = (new FastExcel)->import($filename, function ($line){
|
||||
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']))))),
|
||||
@@ -166,20 +168,21 @@ class Movimenti extends Model
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public static function importEstrattoCR($filename)
|
||||
{
|
||||
$inputPath='/var/www/html/bubofamily/public/storage/'.$filename;
|
||||
$outputPath='/var/www/html/bubofamily/public/'.$filename.'.csv';
|
||||
rename($inputPath,$outputPath);
|
||||
|
||||
|
||||
$collection = (new FastExcel)->configureCsv(';')->import($filename.'.csv', function ($line){
|
||||
if($line['VALUTA'])
|
||||
{
|
||||
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'])))),
|
||||
@@ -202,28 +206,48 @@ class Movimenti extends Model
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public static function getYearsFromMovimenti()
|
||||
{
|
||||
$anni=DB::table('movimentis')->select(DB::raw('DISTINCT YEAR(mov_data) as anno'))->get();
|
||||
// dd($anni); // for test purposes
|
||||
return $anni;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ use Illuminate\Support\Facades\DB;
|
||||
class Progetti extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
|
||||
public static function getProgetti() {
|
||||
return DB::table('progettis')
|
||||
->select(
|
||||
@@ -23,9 +23,9 @@ class Progetti extends Model
|
||||
'budget',
|
||||
'stato',
|
||||
'note')
|
||||
->join('users','progettis.fk_user','=','users.id')->get();
|
||||
->join('users','progettis.fk_user','=','users.id')->get();
|
||||
}
|
||||
|
||||
|
||||
public static function getProgettoById($id){
|
||||
return DB::table('progettis')->
|
||||
join('users','progettis.fk_user','=','users.id')->
|
||||
@@ -33,7 +33,7 @@ class Progetti extends Model
|
||||
where('progettis.id','=',$id)->
|
||||
get();
|
||||
}
|
||||
|
||||
|
||||
public static function saveProgetto($progetto){
|
||||
DB::table('progettis')->insert([
|
||||
'nome'=>$progetto['nome'],
|
||||
@@ -46,12 +46,35 @@ class Progetti extends Model
|
||||
'stato'=>$progetto['stato'],
|
||||
'note'=>$progetto['note']
|
||||
]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static function delProgetto($progetto_id)
|
||||
{
|
||||
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',
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -11,8 +11,6 @@ use Laravel\Sanctum\HasApiTokens;
|
||||
use Spatie\Permission\Traits\HasRoles;
|
||||
use Illuminate\Foundation\Auth\Access\Authorizable;
|
||||
|
||||
|
||||
|
||||
class User extends Authenticatable
|
||||
{
|
||||
use HasApiTokens, HasFactory, Notifiable, HasRoles,Authorizable;
|
||||
@@ -68,7 +66,7 @@ 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()
|
||||
@@ -86,8 +84,4 @@ class User extends Authenticatable
|
||||
])->assignRole($params['role']);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -30,4 +30,5 @@ class contatto extends Model
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -10,10 +10,8 @@
|
||||
"require" : {
|
||||
"php": "^7.3|^8.0",
|
||||
"barryvdh/laravel-dompdf": "^2.0",
|
||||
<<<<<<< HEAD
|
||||
"creativeorange/gravatar": "^1.0",
|
||||
"directorytree/ldaprecord": "^2.9",
|
||||
=======
|
||||
>>>>>>> 3ebca7bb4a04430aecf781bee6ba7b1a1ec56a41
|
||||
"fruitcake/laravel-cors": "^2.0",
|
||||
"guzzlehttp/guzzle": "^7.0.1",
|
||||
"laravel-notification-channels/telegram": "^2.0",
|
||||
|
||||
566
composer.lock
generated
566
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -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,7 @@ return [
|
||||
Illuminate\Translation\TranslationServiceProvider::class,
|
||||
Illuminate\Validation\ValidationServiceProvider::class,
|
||||
Illuminate\View\ViewServiceProvider::class,
|
||||
Creativeorange\Gravatar\GravatarServiceProvider::class,
|
||||
|
||||
|
||||
/*
|
||||
@@ -232,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,
|
||||
|
||||
],
|
||||
|
||||
|
||||
@@ -74,6 +74,7 @@ return [
|
||||
|
||||
'links' => [
|
||||
public_path('storage') => storage_path('app/public'),
|
||||
public_path('contratti') => storage_path('app/Contratti'),
|
||||
],
|
||||
|
||||
];
|
||||
|
||||
@@ -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');
|
||||
});
|
||||
*/
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,14 +13,14 @@ class ColumnsAnagrafica extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('anagraficas', function (Blueprint $table) {
|
||||
//
|
||||
$table->longText('ang_indirizzo');
|
||||
/*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');
|
||||
});
|
||||
});*/
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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,13 +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_name'=>'Stipendio',
|
||||
'cat_uscita'=>0,
|
||||
'cat_entrata'=>1]
|
||||
);
|
||||
DB::table('categories')->insert(
|
||||
['cat_name'=>'Utenze']
|
||||
[
|
||||
'cat_name'=>'Utenze',
|
||||
'cat_uscita'=>1,
|
||||
'cat_entrata'=>0]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
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');
|
||||
}
|
||||
}
|
||||
1
public/contratti
Symbolic link
1
public/contratti
Symbolic link
@@ -0,0 +1 @@
|
||||
/var/www/html/bubofamily/storage/app/Contratti
|
||||
4
public/js/app/altrocontatto.js
vendored
4
public/js/app/altrocontatto.js
vendored
@@ -1,6 +1,6 @@
|
||||
$(document).ready(function() {
|
||||
$('#automobili').DataTable({
|
||||
responsive: true
|
||||
responsive: true,
|
||||
fields: [
|
||||
{
|
||||
label:"Data",
|
||||
@@ -10,7 +10,7 @@ $(document).ready(function() {
|
||||
});
|
||||
|
||||
$('#contatti').DataTable({
|
||||
responsive: true
|
||||
responsive: true,
|
||||
fields: [
|
||||
{
|
||||
label:"Data",
|
||||
|
||||
21
public/js/app/auto.js
vendored
21
public/js/app/auto.js
vendored
@@ -1,12 +1,19 @@
|
||||
$(document).ready(function() {
|
||||
$('#listaAutomobili').DataTable({
|
||||
responsive: true
|
||||
});
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#automobili').DataTable({
|
||||
responsive: true
|
||||
fields: [
|
||||
{
|
||||
label:"Data",
|
||||
type: "datetime"
|
||||
}
|
||||
]
|
||||
responsive: true,
|
||||
columnDefs: [
|
||||
{
|
||||
target: 0,
|
||||
render: DataTable.render.date(),
|
||||
}
|
||||
],
|
||||
"order": [[0, "desc"]]
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
39
public/js/app/conti_categorie.js
vendored
39
public/js/app/conti_categorie.js
vendored
@@ -1,41 +1,50 @@
|
||||
$(document).ready(function() {
|
||||
$('#listrapportoS').DataTable({
|
||||
responsive: true,
|
||||
fields: [
|
||||
{
|
||||
label:"Data",
|
||||
type: "datetime"
|
||||
}
|
||||
]
|
||||
"responsive": true,
|
||||
"order": [[0, "asc"]]
|
||||
});
|
||||
|
||||
$('#listrapportoE').DataTable({
|
||||
responsive: true,
|
||||
fields: [
|
||||
{
|
||||
label:"Data",
|
||||
type: "datetime"
|
||||
}
|
||||
]
|
||||
"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);
|
||||
$('#H_cat_cat_name').val(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).on('click','.open_modal_new',function(){
|
||||
console.log('richiesto apertura form');
|
||||
$('#myModal_new').modal('show');
|
||||
|
||||
});
|
||||
|
||||
17
public/js/app/contratti.js
vendored
Normal file
17
public/js/app/contratti.js
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
$('#contratti').DataTable({
|
||||
responsive: true,
|
||||
fields: [
|
||||
{
|
||||
label:"Data",
|
||||
type: "datetime"
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
$(document).on('click','.open_modal_new',function(){
|
||||
console.log('richiesto apertura form');
|
||||
$('#myModal_new').modal('show');
|
||||
|
||||
});
|
||||
|
||||
$(".draggable").draggable();
|
||||
17
public/js/app/dashboard.js
vendored
17
public/js/app/dashboard.js
vendored
@@ -1,6 +1,13 @@
|
||||
// Rende spostabili le varie finestre
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#categorie').DataTable({
|
||||
responsive: true
|
||||
});
|
||||
});
|
||||
$( function() {
|
||||
$( ".resizable" ).resizable({
|
||||
handles: "se"
|
||||
});
|
||||
} );
|
||||
$(".draggable").draggable();
|
||||
/*$.get('https://www.ansa.it/trentino/notizie/trentino_rss.xml', function(content) {
|
||||
// Insert the content into the specified element
|
||||
$('#contenuto').html(content);
|
||||
});*/
|
||||
// Load the RSS feed
|
||||
|
||||
11
public/js/app/enel.js
vendored
11
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"]]
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
11
public/js/app/gas.js
vendored
11
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) {
|
||||
)
|
||||
});
|
||||
});
|
||||
|
||||
*/
|
||||
|
||||
15
public/js/app/progetti.js
vendored
15
public/js/app/progetti.js
vendored
@@ -1,13 +1,14 @@
|
||||
$(document).ready(function() {
|
||||
|
||||
$('#tab_progetti').DataTable({
|
||||
responsive: true
|
||||
fields: [
|
||||
{
|
||||
label:"Data",
|
||||
type: "datetime"
|
||||
}
|
||||
]
|
||||
"responsive": true,
|
||||
columnDefs: [
|
||||
{
|
||||
target: 1,
|
||||
render: DataTable.render.date(),
|
||||
}
|
||||
],
|
||||
"order": [[1, "desc"]]
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
19
public/js/app/rigaProgetti.js
vendored
19
public/js/app/rigaProgetti.js
vendored
@@ -1,14 +1,15 @@
|
||||
$(document).ready(function() {
|
||||
$('#tab_progetti').DataTable({
|
||||
responsive: true
|
||||
fields: [
|
||||
{
|
||||
label:"Data",
|
||||
type: "datetime"
|
||||
}
|
||||
]
|
||||
"responsive": true,
|
||||
columnDefs: [
|
||||
{
|
||||
target: 0,
|
||||
render: DataTable.render.date(),
|
||||
}
|
||||
],
|
||||
"order": [[0, "desc"]]
|
||||
});
|
||||
|
||||
});
|
||||
$('#form').click(function() {
|
||||
$('form').toggle();
|
||||
});
|
||||
@@ -41,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
@@ -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>
|
||||
@@ -71,7 +58,7 @@
|
||||
<div class="sidebar-nav navbar-collapse">
|
||||
<ul class="nav" id="side-menu">
|
||||
<li class="sidebar-search">
|
||||
<!-- input group
|
||||
<!-- input group
|
||||
<!--<div class="input-group custom-search-form">
|
||||
<input type="text" class="form-control" placeholder="Search...">
|
||||
<span class="input-group-btn">
|
||||
@@ -83,7 +70,7 @@
|
||||
<!-- /input-group -->
|
||||
</li>
|
||||
<!-- MENU -->
|
||||
@include('components.menu')
|
||||
@include('components.menu')
|
||||
<!-- / Menu -->
|
||||
</ul>
|
||||
</div>
|
||||
@@ -98,7 +85,7 @@
|
||||
@section('content')
|
||||
Contenuto
|
||||
@show
|
||||
|
||||
|
||||
</div>
|
||||
<!-- /.container-fluid -->
|
||||
</div>
|
||||
@@ -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
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">{{ $dettagli->marca; }} {{ $dettagli->modello; }} targa: {{ $dettagli->targa; }}</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container">
|
||||
<!-- Content here -->
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<a class="btn btn-primary" href="operazioni/pdf?id={{ $dettagli->id; }}">Esporta PDF</a>
|
||||
@@ -19,10 +19,10 @@
|
||||
<div class="panel-heading">
|
||||
Dettaglio auto {{ $dettagli->targa }}
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="panel-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered table-hover" id="">
|
||||
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Marca:</th>
|
||||
@@ -39,7 +39,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
<td>{{ $dettagli->marca; }}</td>
|
||||
<td>{{ $dettagli->modello; }}</td>
|
||||
@@ -53,9 +53,9 @@
|
||||
<td>{{ $km ?? ''; }}</td>
|
||||
<td>{{ $dettagli->note; }}</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@@ -69,10 +69,10 @@
|
||||
<div class="panel-heading">
|
||||
Revisioni auto {{ $dettagli->targa }}
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="panel-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered table-hover" id="revisione">
|
||||
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Data</th>
|
||||
@@ -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>
|
||||
@@ -103,7 +103,7 @@
|
||||
@endif
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@@ -111,7 +111,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- Fine Revisioni -->
|
||||
|
||||
|
||||
<!-- Manutenzioni -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
@@ -119,10 +119,10 @@
|
||||
<div class="panel-heading">
|
||||
Manutenzione auto {{ $dettagli->targa }}
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="panel-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered table-hover" id="manutenzione">
|
||||
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Data</th>
|
||||
@@ -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>
|
||||
@@ -143,7 +143,7 @@
|
||||
@endif
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@@ -151,7 +151,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- Fine Manutenzioni -->
|
||||
|
||||
|
||||
<!-- Accessori -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
@@ -159,10 +159,10 @@
|
||||
<div class="panel-heading">
|
||||
Accessori/Ricambi auto {{ $dettagli->targa }}
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="panel-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered table-hover" id="accessori">
|
||||
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Data</th>
|
||||
@@ -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>
|
||||
@@ -183,7 +183,7 @@
|
||||
@endif
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@@ -191,7 +191,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- Fine Accessori -->
|
||||
|
||||
|
||||
<!-- Rifornimenti -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
@@ -199,10 +199,10 @@
|
||||
<div class="panel-heading">
|
||||
Rifornimenti auto {{ $dettagli->targa }}
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="panel-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered table-hover" id="">
|
||||
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Data</th>
|
||||
@@ -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>
|
||||
@@ -227,7 +227,7 @@
|
||||
@endif
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@@ -235,7 +235,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- Fine Rifornimenti -->
|
||||
|
||||
|
||||
<!-- -->
|
||||
</div>
|
||||
|
||||
|
||||
@@ -30,10 +30,10 @@ table{
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<body>
|
||||
<div class="container">
|
||||
<!-- Content here -->
|
||||
|
||||
|
||||
<span class="titolo"><h1>Scheda {{ $dettagli->marca; }} {{ $dettagli->modello; }} - {{ $dettagli->targa; }}</h1></span>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
@@ -41,14 +41,14 @@ table{
|
||||
<div class="panel-heading">
|
||||
Dettaglio
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="panel-body">
|
||||
<div class="table-responsive">
|
||||
<table class="intestazione_doc" id="">
|
||||
<tr>
|
||||
<th>Marca:</th><td>{{ $dettagli->marca; }}</td>
|
||||
<th>Modello:</th><td>{{ $dettagli->modello; }}</td>
|
||||
<th>Targa:</th> <td>{{ $dettagli->targa; }}</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Alimentazione:</th><td>{{ $dettagli->alimentazione; }}</td>
|
||||
@@ -78,10 +78,10 @@ table{
|
||||
<div class="panel-heading">
|
||||
Revisioni
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="panel-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered table-hover" id="revisione">
|
||||
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Data</th>
|
||||
@@ -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>
|
||||
@@ -108,7 +108,7 @@ table{
|
||||
@endif
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@@ -116,18 +116,18 @@ table{
|
||||
</div>
|
||||
</div>
|
||||
<!-- Fine Revisioni -->
|
||||
<br><hr>
|
||||
<br><hr>
|
||||
<!-- Manutenzioni -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
Manutenzione
|
||||
Manutenzione
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="panel-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered table-hover" id="manutenzione">
|
||||
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Data</th>
|
||||
@@ -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>
|
||||
@@ -148,7 +148,7 @@ table{
|
||||
@endif
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@@ -164,10 +164,10 @@ table{
|
||||
<div class="panel-heading">
|
||||
Accessori/Ricambi
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="panel-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered table-hover" id="accessori">
|
||||
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Data</th>
|
||||
@@ -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>
|
||||
@@ -188,7 +188,7 @@ table{
|
||||
@endif
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@@ -204,10 +204,10 @@ table{
|
||||
<div class="panel-heading">
|
||||
Rifornimenti
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="panel-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered table-hover" id="">
|
||||
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Data</th>
|
||||
@@ -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>
|
||||
@@ -232,7 +232,7 @@ table{
|
||||
@endif
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered table-hover"
|
||||
id="automobili">
|
||||
id="listaAutomobili">
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -147,7 +147,7 @@
|
||||
type="text" class="form-control" id="note" name="note">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -21,7 +21,13 @@
|
||||
</ul></li>
|
||||
|
||||
</ul> <!-- /.nav-second-level --></li>
|
||||
@endcan @can('consumi')
|
||||
@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>
|
||||
|
||||
@@ -31,7 +37,8 @@
|
||||
</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>
|
||||
@@ -49,7 +56,14 @@
|
||||
@endcan @can('progetti')
|
||||
<li><a href="{{ route('progetti'); }}"><i class="fa fa-list fa-fw"></i>
|
||||
Progetti <span class="fa arrow"></span></a></li>
|
||||
@endcan @can('amministrazione')
|
||||
|
||||
@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">
|
||||
@@ -58,9 +72,10 @@
|
||||
<li><a class="active" href="/admin/users/newRole">Gruppi</a></li>
|
||||
<li><a class="active" href="/admin/users/newPermission">Permessi</a></li>
|
||||
-->
|
||||
<li><a class="active" href="/admin/users/assignRole">Assegna Ruoli</a></li>
|
||||
<!--
|
||||
<li><a href="/login">Login Page</a></li>
|
||||
<li><a class="active" href="/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,10 @@
|
||||
<ul class="dropdown-menu dropdown-user">
|
||||
<li><a href="#"><i class="fa fa-user fa-fw"></i> Profilo utente</a></li>
|
||||
<li><a href="#"><i class="fa fa-gear fa-fw"></i> Impostazioni</a></li>
|
||||
@role('admin')
|
||||
@can('amministrazione')
|
||||
<li class="divider"></li>
|
||||
<li><a href="/admin/users/new"><i class="fa fa-gear fa-fw"></i> Gestisci Utenti</a></li>
|
||||
@endrole
|
||||
@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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
{
|
||||
@endphp
|
||||
|
||||
<td><a href="/admin/movimenti/report/movimenti_categoria?cat={{$categoria->id}}&month={{$index+1}}">{{ $matrice[$cat][$index] }}</a></td>
|
||||
<td><a href="/admin/movimenti/report/movimenti_categoria?cat={{$categoria->id}}&month={{$index+1}}&year={{ $anno ?? date('Y') }}">{{ $matrice[$cat][$index] }}</a></td>
|
||||
@php
|
||||
$index++;
|
||||
}
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
<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')}}&year={{ date('Y') }}">{{ $dato->cat_name; }}</a> </td>
|
||||
<td>{{ $dato->resoconto; }}</td>
|
||||
|
||||
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@@ -55,9 +55,9 @@
|
||||
<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')}}&year={{ date('Y')}}">{{ $dato->cat_name; }}</a> </td>
|
||||
<td>{{ $dato->resoconto; }}</td>
|
||||
|
||||
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@@ -67,9 +67,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@endsection
|
||||
@section('script')
|
||||
<script src="/js/app/conti_categorie.js"></script>
|
||||
@endsection
|
||||
|
||||
136
resources/views/contratti/lista.blade.php
Normal file
136
resources/views/contratti/lista.blade.php
Normal file
@@ -0,0 +1,136 @@
|
||||
@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">
|
||||
<button class="btn btn-warning btn-detail open_modal_new">Nuovo Contratto</button>
|
||||
<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>{{date_format(date_create($contratto->datainizio),'d/m/Y')}}</td>
|
||||
<td>{{date_format(date_create($contratto->datatermine),'d/m/Y')}}</td>
|
||||
<td>{{$contratto->fornitore}}</td>
|
||||
<td>{{$contratto->tipo}}</td>
|
||||
<td>{{$contratto->importo}}</td>
|
||||
<td>{{$contratto->stato}}</td>
|
||||
<td><a href="/storage/{{$contratto->filename}}" target="new">{{$contratto->filename}}</a></td>
|
||||
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<!-- Footer del pannello -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- MODAL -->
|
||||
<div class="modal fade" id="myModal_new" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog draggable" role="document">
|
||||
<div class="modal-content">
|
||||
<form action="" method="POST" enctype="multipart/form-data">
|
||||
@csrf
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Nuovo contratto</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<label for="numero" class="form-label">Numero</label>
|
||||
<input type="text" class="form-control" id="numero" name="numero" size="50">
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label for="nome" class="form-label">Nome Contratto</label>
|
||||
<input type="text" class="form-control" id="nome" name="nome" size="50">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<label for="datainizio" class="form-label">Data Inizio</label>
|
||||
<input type="date" class="form-control" id="datainizio" name="datainizio" size="50">
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label for="datatermine" class="form-label">Data Termine Contratto</label>
|
||||
<input type="date" class="form-control" id="datatermine" name="datatermine" size="50">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<label for="fornitore" class="form-label">Fornitore</label>
|
||||
<input type="text" class="form-control" id="fornitore" name="fornitore" size="50">
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label for="tipo" class="form-label">Tipo Contratto</label>
|
||||
<input type="text" class="form-control" id="tipo" name="tipo" size="50">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<label for="scadenzapagamento" class="form-label">Scadenza Pagamento</label>
|
||||
<input type="text" class="form-control" id="scadenzapagamento" name="scadenzapagamento" size="50">
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label for="importo" class="form-label">Importo</label>
|
||||
<input type="text" class="form-control" id="importo" name="importo" size="50">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<label for="stato" class="form-label">Stato</label>
|
||||
<input type="text" class="form-control" id="stato" name="stato" size="50">
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label for="filename" class="form-label">File</label>
|
||||
<input type="file" class="form-control" id="filename" name="filename" size="50">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<label for="note" class="form-label">Note</label>
|
||||
<textarea name="note" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
|
||||
<!-- FINE FORM INSERIMENTO NUOVO CONTRATTO -->
|
||||
</div>
|
||||
</form>
|
||||
</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
|
||||
@@ -15,7 +15,7 @@
|
||||
<!-- Fonts -->
|
||||
<link rel="dns-prefetch" href="//fonts.gstatic.com">
|
||||
<link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet">
|
||||
|
||||
<link rel="stylesheet" href="//code.jquery.com/ui/1.13.2/themes/base/jquery-ui.css">
|
||||
<!-- Styles -->
|
||||
<link href="{{ asset('css/app.css') }}" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
@extends('admin')
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">Riepilogo</h1>
|
||||
@@ -8,16 +9,16 @@
|
||||
<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>
|
||||
@@ -30,9 +31,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,11 +99,103 @@
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</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>
|
||||
<div class="row">
|
||||
<div class="col-lg-3 col-md-8 draggable">
|
||||
<div class="panel panel-yellow">
|
||||
<div class="panel-heading">
|
||||
<div class="row">Notizie</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<!--<ul class="contenuto">
|
||||
|
||||
|
||||
</ul>-->
|
||||
</div>
|
||||
<div class=panel-footer></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endcan
|
||||
|
||||
@endsection
|
||||
|
||||
@section('script')
|
||||
<script src="/js/app/dashboard.js"></script>
|
||||
@endsection
|
||||
<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>
|
||||
@@ -78,9 +78,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@endsection
|
||||
@section('script')
|
||||
<script src="/js/app/enel.js"></script>
|
||||
@endsection
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
Nuova lettura Gas
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
|
||||
|
||||
<form action="" method="POST">
|
||||
@csrf
|
||||
<div class="mb-3">
|
||||
@@ -38,7 +38,7 @@
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="panel-heading">
|
||||
Letture Gas
|
||||
@@ -57,7 +57,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
@php $dateprec=NULL; @endphp
|
||||
|
||||
|
||||
@foreach($lettureGas as $lettura)
|
||||
@php
|
||||
if (!is_null($dateprec))
|
||||
@@ -65,13 +65,13 @@
|
||||
$diffdate=date_diff(
|
||||
date_create_from_format('Y-m-d',$lettura->gas_date),
|
||||
date_create_from_format('Y-m-d',$dateprec)
|
||||
)->format('%a');
|
||||
)->format('%a');
|
||||
$differenza=($lettura->gas_lettura)-$lettprec;
|
||||
$mediagg=($differenza/$diffdate);
|
||||
}
|
||||
@endphp
|
||||
<tr>
|
||||
<td>{{ $lettura->gas_date; }}</td>
|
||||
<td>{{ $lettura->gas_date }}</td>
|
||||
<td>{{ $lettura->gas_lettura; }}</td>
|
||||
@if(!is_null($dateprec))
|
||||
<td>{{ $diffdate ?? '' }}</td>
|
||||
@@ -83,9 +83,9 @@
|
||||
<td></td>
|
||||
@endif
|
||||
</tr>
|
||||
|
||||
|
||||
@php
|
||||
$dateprec=$lettura->gas_date;
|
||||
$dateprec=$lettura->gas_date;
|
||||
$lettprec=$lettura->gas_lettura;
|
||||
@endphp
|
||||
@endforeach
|
||||
@@ -96,9 +96,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@endsection
|
||||
@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
|
||||
@@ -138,7 +138,7 @@
|
||||
</div>
|
||||
|
||||
<!-- MODAL EDIT Riga-->
|
||||
<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">
|
||||
<form method="POST" action="/admin/progetti/rigaupdate">
|
||||
<div class="modal-dialog" role="document">
|
||||
@@ -182,8 +182,8 @@
|
||||
|
||||
<div class="modal-footer">
|
||||
<div class="col-xs-12">
|
||||
<input type="hidden" name="fk_id_progetto" id="id_progetto_u">
|
||||
<input type="hidden" name="idriga" id="idriga">
|
||||
<input type="hidden" name="fk_id_progetto" id="id_progetto_u">
|
||||
<input type="hidden" name="idriga" id="idriga">
|
||||
<input type="submit" name="Submit" class="form-control" value="Aggiorna">
|
||||
|
||||
</div>
|
||||
|
||||
@@ -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>
|
||||
@@ -78,7 +83,7 @@
|
||||
<!-- TODO: Da vedere funzione di select in js -->
|
||||
<select name="coordinatore" class="form-control selectpicker"
|
||||
id="coordinatore" data-live-search="true"
|
||||
data-live-search-placeholder="Cerca">
|
||||
data-live-search-placeholder="Cerca">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -142,4 +147,4 @@
|
||||
<!-- /MODAL -->
|
||||
@endsection @section('script')
|
||||
<script src="/js/app/progetti.js"></script>
|
||||
@endsection
|
||||
@endsection
|
||||
|
||||
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
|
||||
@@ -15,6 +15,10 @@ use App\Http\Controllers\AutoController;
|
||||
use App\Http\Controllers\AnagraficaController;
|
||||
use App\Http\Controllers\Utenti;
|
||||
use App\Http\Controllers\ProgettiController;
|
||||
use App\Http\Controllers\TaskController;
|
||||
use App\Http\Controllers\AvvisoController;
|
||||
use App\Http\Controllers\ContrattiController;
|
||||
use App\Mail\myTestEmail;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@@ -48,6 +52,8 @@ Route::group(['middleware'=>['permission:conti']], function(){
|
||||
Route::get('movimenti/report/movimenti_categoria', [MovimentiController::class,'listMovPerCateg']);
|
||||
Route::get('movimenti/report/movimentibycat', [MovimentiController::class,'listMovbyCat']);
|
||||
Route::get('movimenti/docs', [DocumentiController::class,'fileForm'])->name('documenti');
|
||||
// {issue #5}
|
||||
// Route::get('movimenti/docs', [DocumentiController::class,'fileMovimentiForm'])->name('documenti');
|
||||
Route::post('movimenti/docs', [DocumentiController::class,'storeFile']);
|
||||
Route::get('movimenti/import', [MovimentiController::class,'importFile'])->name('importING');
|
||||
Route::post('movimenti/import', [MovimentiController::class,'importEC_ING']);
|
||||
@@ -66,6 +72,8 @@ Route::group(['middleware'=>['permission:conti']], function(){
|
||||
Route::get('service/catlist', [CategorieController::class,'apiList']);
|
||||
Route::get('service/taglist', [TagController::class,'apiList']);
|
||||
Route::get('service/rolesList', [Utenti::class,'listRoles']);
|
||||
Route::get('service/catlistSpesa', [CategorieController::class,'apiListSpesa']);
|
||||
Route::get('service/catlistEntrata', [CategorieController::class,'apiListEntrata']);
|
||||
|
||||
// TAGS
|
||||
Route::get('tags', [TagController::class,'listTags'])->name('tags');
|
||||
@@ -115,19 +123,17 @@ Route::group(['middleware'=>['permission:contatti']], function(){
|
||||
|
||||
// GRUPPI E PERMESSI
|
||||
Route::group(['middleware'=>['permission:amministrazione']], function(){
|
||||
/*
|
||||
Route::get('role/new/{ruolo}', [Utenti::class, 'createRole']);
|
||||
Route::post('group/new', [Utenti::class, 'saveNuovoGruppo']);
|
||||
Route::get('permesso/new/{permesso}', [Utenti::class, 'createPermission']);
|
||||
Route::post('permesso/new', [Utenti::class, 'saveNuovoPermesso']);
|
||||
Route::get('permesso/assign', [Utenti::class, 'vw_assignToGroup']);
|
||||
Route::post('permesso/assign', [Utenti::class, 'assignPermissionToGroup']);
|
||||
*/
|
||||
|
||||
Route::get('users/new',[Utenti::class,'addUser']);
|
||||
Route::post('users/new',[Utenti::class,'createUser']);
|
||||
Route::get('users/roles',[Utenti::class,'listRoles']);
|
||||
Route::get('users/delete/{id}',[Utenti::class,'deleteUser']);
|
||||
Route::get('users/givepermission',[Utenti::class,'givePermissionToUser']);
|
||||
Route::post('users/givepermission',[Utenti::class,'assignPermission']);
|
||||
Route::get('users/giverole',[Utenti::class,'giveRoleToUser']);
|
||||
Route::post('users/giverole',[Utenti::class,'assignRole']);
|
||||
});
|
||||
|
||||
// PROGETTI
|
||||
Route::group(['middleware'=>['permission:progetti']], function(){
|
||||
Route::get('progetti', [ProgettiController::class, 'listaProgetto'])->name('progetti');
|
||||
@@ -140,14 +146,39 @@ Route::group(['middleware'=>['permission:progetti']], function(){
|
||||
Route::get('progetti/detail/edit/{id}', [RigaProgettoController::class, 'editRiga']);
|
||||
Route::post('progetti/rigaupdate', [RigaProgettoController::class, 'updateRiga']);
|
||||
Route::get('progetti/coordinatori', [ProgettiController::class, 'getCoordinatori']);
|
||||
Route::get('progetti/close',[ProgettiController::class, 'chiudiProgetto']);
|
||||
Route::get('progetti/reopen',[ProgettiController::class, 'riapriProgetto']);
|
||||
Route::get('progetti/print',[ProgettiController::class,'stampaPDFProgetto']);
|
||||
});
|
||||
|
||||
// TASKS
|
||||
Route::group(['middleware'=>['permission:tasks']], function(){
|
||||
Route::get('tasks', [TaskController::class, 'Task'])->name('tasks');
|
||||
Route::post('task/new',[TaskController::class, 'newTask']);
|
||||
Route::get('service/getUsers', [Utenti::class,'getUsers']);
|
||||
});
|
||||
|
||||
|
||||
// CONTRATTI
|
||||
Route::group(['middleware'=>['permission:contratti']], function(){
|
||||
Route::get('contratti', [ContrattiController::class, 'Contratti'])->name('contratti');
|
||||
Route::post('contratti', [ContrattiController::class, 'newContratto']);
|
||||
});
|
||||
|
||||
Route::group(['middleware'=>['permission:avvisi']], function(){
|
||||
Route::post('avvisi/new',[AvvisoController::class,'saveAvviso'])->name('newAvviso');
|
||||
});
|
||||
// -- ONLY FOR TEST -- TO BE REMOVED //
|
||||
|
||||
/// TEST ROUTES
|
||||
Route::get('test/fullcalendar', [FullCalenderController::class, 'index']);
|
||||
Route::post('test/fullcalendar', [FullCalenderController::class, 'ajax']);
|
||||
Route::get('test/condominio',[CondominioController::class,'testPdf']);
|
||||
Route::get('test/err403',[CondominioController::class,'err403']);
|
||||
Route::get('test/err403',[CondominioController::class,'err403'])->name('errore-403');
|
||||
Route::get('test/user_role',[CondominioController::class,'user_role']);
|
||||
Route::get('test/userclass',[Utenti::class,'userClass']);
|
||||
|
||||
Route::get('testmail',function(){
|
||||
$name='Flavio';
|
||||
Mail::to('git@lavorain.cloud')->send(new myTestEmail($name));
|
||||
});
|
||||
|
||||
@@ -20,6 +20,9 @@ use App\Http\Controllers\MovimentiController;
|
||||
Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
|
||||
return $request->user();
|
||||
});
|
||||
|
||||
Route::group(['middleware'=>['permission:conti']], function(){
|
||||
Route::get('categories', [CategorieController::class,'apiList']);
|
||||
Route::get('tags', [TagController::class,'apiList']);
|
||||
Route::get('movements', [MovimentiController::class,'apiList']);
|
||||
Route::get('movements', [MovimentiController::class,'apiList']);
|
||||
});
|
||||
@@ -24,5 +24,5 @@ Route::get('/', function () {
|
||||
Auth::routes(['register' => false]); // Production only
|
||||
// Auth::routes(); //development mode
|
||||
Route::get('/calendar', [TagController::class,'calendartest'])->name('calendar');
|
||||
Route::get('/home', [App\Http\Controllers\HomeController::class, 'index'])->name('home');
|
||||
// Route::get('/home', [App\Http\Controllers\HomeController::class, 'index'])->name('home');
|
||||
Route::get('/home', [App\Http\Controllers\HomeController::class, 'index'])->name('home');
|
||||
|
||||
Reference in New Issue
Block a user