8 Commits

14 changed files with 226 additions and 83 deletions

View File

@@ -3,8 +3,13 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use App\Models\Contratti;
class ContrattiController extends Controller class ContrattiController extends Controller
{ {
// //
public function contratti()
{
return view('contratti.lista',['data'=>Contratti::all()]);
}
} }

View File

@@ -29,6 +29,18 @@ class DocumentiController extends Controller
]); ]);
} }
/*
// {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() public function listaDocumenti()
{ {
return view('documenti.lista',['data'=>Documenti::all()]); return view('documenti.lista',['data'=>Documenti::all()]);

View File

@@ -16,6 +16,14 @@ class Documenti extends Model
->count(); ->count();
return $quanti; 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) { public static function store($req) {
$movimento_id=$req->input('id'); $movimento_id=$req->input('id');
@@ -27,6 +35,20 @@ class Documenti extends Model
'filename'=>$filename, '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) public static function getList($id)
{ {
@@ -35,4 +57,11 @@ class Documenti extends Model
->get(); ->get();
} }
// Proposta modifica issue {#5 gitea} (generalizzazione del documento)
/*
public static function getList($id,$entity)
{
self::where('entita','=',$entity)->where('entita_id','=',$id)->get();
}
*/
} }

View File

@@ -158,7 +158,7 @@ class Movimenti extends Model
if($line['Data valuta']) if($line['Data valuta'])
{ {
self::insEntrata([ self::insEntrata([
'mov_data'=>self::dateFormat(0,$line['Data valuta']), 'mov_data'=>$line['Data valuta'],
'mov_fk_categoria'=>1, 'mov_fk_categoria'=>1,
'mov_descrizione'=>$line['Descrizione operazione'], 'mov_descrizione'=>$line['Descrizione operazione'],
'mov_importo'=>trim(str_replace(',','.',(str_replace('.','',str_replace('€', '', $line['Importo']))))), 'mov_importo'=>trim(str_replace(',','.',(str_replace('.','',str_replace('€', '', $line['Importo']))))),
@@ -217,7 +217,7 @@ class Movimenti extends Model
private static function dateFormat($type,$string) private static function dateFormat($type,$string)
{ {
// $string=(string)$string;
if($type) if($type)
{ {
// $string=$string->format('Y-m-d'); // $string=$string->format('Y-m-d');

140
composer.lock generated
View File

@@ -2405,16 +2405,16 @@
}, },
{ {
"name": "maennchen/zipstream-php", "name": "maennchen/zipstream-php",
"version": "3.0.2", "version": "3.1.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/maennchen/ZipStream-PHP.git", "url": "https://github.com/maennchen/ZipStream-PHP.git",
"reference": "b46726e666b5d2ad32959ae9492ee1034e798162" "reference": "b8174494eda667f7d13876b4a7bfef0f62a7c0d1"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/b46726e666b5d2ad32959ae9492ee1034e798162", "url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/b8174494eda667f7d13876b4a7bfef0f62a7c0d1",
"reference": "b46726e666b5d2ad32959ae9492ee1034e798162", "reference": "b8174494eda667f7d13876b4a7bfef0f62a7c0d1",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -2470,7 +2470,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/maennchen/ZipStream-PHP/issues", "issues": "https://github.com/maennchen/ZipStream-PHP/issues",
"source": "https://github.com/maennchen/ZipStream-PHP/tree/3.0.2" "source": "https://github.com/maennchen/ZipStream-PHP/tree/3.1.0"
}, },
"funding": [ "funding": [
{ {
@@ -2482,7 +2482,7 @@
"type": "open_collective" "type": "open_collective"
} }
], ],
"time": "2023-04-19T19:51:03+00:00" "time": "2023-06-21T14:59:35+00:00"
}, },
{ {
"name": "markbaker/complex", "name": "markbaker/complex",
@@ -2762,16 +2762,16 @@
}, },
{ {
"name": "nesbot/carbon", "name": "nesbot/carbon",
"version": "2.67.0", "version": "2.68.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/briannesbitt/Carbon.git", "url": "https://github.com/briannesbitt/Carbon.git",
"reference": "c1001b3bc75039b07f38a79db5237c4c529e04c8" "reference": "4f991ed2a403c85efbc4f23eb4030063fdbe01da"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/c1001b3bc75039b07f38a79db5237c4c529e04c8", "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/4f991ed2a403c85efbc4f23eb4030063fdbe01da",
"reference": "c1001b3bc75039b07f38a79db5237c4c529e04c8", "reference": "4f991ed2a403c85efbc4f23eb4030063fdbe01da",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -2860,7 +2860,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-05-25T22:09:47+00:00" "time": "2023-06-20T18:29:04+00:00"
}, },
{ {
"name": "nette/schema", "name": "nette/schema",
@@ -3013,16 +3013,16 @@
}, },
{ {
"name": "nikic/php-parser", "name": "nikic/php-parser",
"version": "v4.15.5", "version": "v4.16.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/nikic/PHP-Parser.git", "url": "https://github.com/nikic/PHP-Parser.git",
"reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e" "reference": "19526a33fb561ef417e822e85f08a00db4059c17"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/11e2663a5bc9db5d714eedb4277ee300403b4a9e", "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/19526a33fb561ef417e822e85f08a00db4059c17",
"reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e", "reference": "19526a33fb561ef417e822e85f08a00db4059c17",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -3063,9 +3063,9 @@
], ],
"support": { "support": {
"issues": "https://github.com/nikic/PHP-Parser/issues", "issues": "https://github.com/nikic/PHP-Parser/issues",
"source": "https://github.com/nikic/PHP-Parser/tree/v4.15.5" "source": "https://github.com/nikic/PHP-Parser/tree/v4.16.0"
}, },
"time": "2023-05-19T20:20:00+00:00" "time": "2023-06-25T14:52:30+00:00"
}, },
{ {
"name": "opis/closure", "name": "opis/closure",
@@ -4828,16 +4828,16 @@
}, },
{ {
"name": "spatie/db-dumper", "name": "spatie/db-dumper",
"version": "3.3.1", "version": "3.4.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/spatie/db-dumper.git", "url": "https://github.com/spatie/db-dumper.git",
"reference": "3b9fd47899bf6a59d3452392121c9ce675d55d34" "reference": "bbd5ae0f331d47e6534eb307e256c11a65c8e24a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/spatie/db-dumper/zipball/3b9fd47899bf6a59d3452392121c9ce675d55d34", "url": "https://api.github.com/repos/spatie/db-dumper/zipball/bbd5ae0f331d47e6534eb307e256c11a65c8e24a",
"reference": "3b9fd47899bf6a59d3452392121c9ce675d55d34", "reference": "bbd5ae0f331d47e6534eb307e256c11a65c8e24a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -4875,7 +4875,7 @@
"spatie" "spatie"
], ],
"support": { "support": {
"source": "https://github.com/spatie/db-dumper/tree/3.3.1" "source": "https://github.com/spatie/db-dumper/tree/3.4.0"
}, },
"funding": [ "funding": [
{ {
@@ -4887,7 +4887,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2023-05-02T11:05:31+00:00" "time": "2023-06-27T08:34:52+00:00"
}, },
{ {
"name": "spatie/laravel-backup", "name": "spatie/laravel-backup",
@@ -5044,16 +5044,16 @@
}, },
{ {
"name": "spatie/laravel-permission", "name": "spatie/laravel-permission",
"version": "5.10.1", "version": "5.10.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/spatie/laravel-permission.git", "url": "https://github.com/spatie/laravel-permission.git",
"reference": "d08b3ffc5870cce4a47a39f22174947b33c191ae" "reference": "671e46e079cbd4990a98427daaa09f4977b57ca9"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/spatie/laravel-permission/zipball/d08b3ffc5870cce4a47a39f22174947b33c191ae", "url": "https://api.github.com/repos/spatie/laravel-permission/zipball/671e46e079cbd4990a98427daaa09f4977b57ca9",
"reference": "d08b3ffc5870cce4a47a39f22174947b33c191ae", "reference": "671e46e079cbd4990a98427daaa09f4977b57ca9",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -5114,7 +5114,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/spatie/laravel-permission/issues", "issues": "https://github.com/spatie/laravel-permission/issues",
"source": "https://github.com/spatie/laravel-permission/tree/5.10.1" "source": "https://github.com/spatie/laravel-permission/tree/5.10.2"
}, },
"funding": [ "funding": [
{ {
@@ -5122,7 +5122,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2023-04-12T17:08:32+00:00" "time": "2023-07-04T13:38:13+00:00"
}, },
{ {
"name": "spatie/laravel-signal-aware-command", "name": "spatie/laravel-signal-aware-command",
@@ -5927,16 +5927,16 @@
}, },
{ {
"name": "symfony/http-foundation", "name": "symfony/http-foundation",
"version": "v5.4.24", "version": "v5.4.25",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/http-foundation.git", "url": "https://github.com/symfony/http-foundation.git",
"reference": "3c59f97f6249ce552a44f01b93bfcbd786a954f5" "reference": "f66be2706075c5f6325d2fe2b743a57fb5d23f6b"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/3c59f97f6249ce552a44f01b93bfcbd786a954f5", "url": "https://api.github.com/repos/symfony/http-foundation/zipball/f66be2706075c5f6325d2fe2b743a57fb5d23f6b",
"reference": "3c59f97f6249ce552a44f01b93bfcbd786a954f5", "reference": "f66be2706075c5f6325d2fe2b743a57fb5d23f6b",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -5983,7 +5983,7 @@
"description": "Defines an object-oriented layer for the HTTP specification", "description": "Defines an object-oriented layer for the HTTP specification",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/http-foundation/tree/v5.4.24" "source": "https://github.com/symfony/http-foundation/tree/v5.4.25"
}, },
"funding": [ "funding": [
{ {
@@ -5999,20 +5999,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-05-19T07:21:23+00:00" "time": "2023-06-22T08:06:06+00:00"
}, },
{ {
"name": "symfony/http-kernel", "name": "symfony/http-kernel",
"version": "v5.4.24", "version": "v5.4.25",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/http-kernel.git", "url": "https://github.com/symfony/http-kernel.git",
"reference": "f38b722e1557eb3f487d351b48f5a1279b50e9d1" "reference": "f6c92fe64bbdad7616cb90663c24f6350f3ca464"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/f38b722e1557eb3f487d351b48f5a1279b50e9d1", "url": "https://api.github.com/repos/symfony/http-kernel/zipball/f6c92fe64bbdad7616cb90663c24f6350f3ca464",
"reference": "f38b722e1557eb3f487d351b48f5a1279b50e9d1", "reference": "f6c92fe64bbdad7616cb90663c24f6350f3ca464",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -6095,7 +6095,7 @@
"description": "Provides a structured process for converting a Request into a Response", "description": "Provides a structured process for converting a Request into a Response",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/http-kernel/tree/v5.4.24" "source": "https://github.com/symfony/http-kernel/tree/v5.4.25"
}, },
"funding": [ "funding": [
{ {
@@ -6111,7 +6111,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-05-27T08:06:30+00:00" "time": "2023-06-26T05:58:08+00:00"
}, },
{ {
"name": "symfony/mime", "name": "symfony/mime",
@@ -6999,16 +6999,16 @@
}, },
{ {
"name": "symfony/routing", "name": "symfony/routing",
"version": "v5.4.22", "version": "v5.4.25",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/routing.git", "url": "https://github.com/symfony/routing.git",
"reference": "c2ac11eb34947999b7c38fb4c835a57306907e6d" "reference": "56bfc1394f7011303eb2e22724f9b422d3f14649"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/routing/zipball/c2ac11eb34947999b7c38fb4c835a57306907e6d", "url": "https://api.github.com/repos/symfony/routing/zipball/56bfc1394f7011303eb2e22724f9b422d3f14649",
"reference": "c2ac11eb34947999b7c38fb4c835a57306907e6d", "reference": "56bfc1394f7011303eb2e22724f9b422d3f14649",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -7069,7 +7069,7 @@
"url" "url"
], ],
"support": { "support": {
"source": "https://github.com/symfony/routing/tree/v5.4.22" "source": "https://github.com/symfony/routing/tree/v5.4.25"
}, },
"funding": [ "funding": [
{ {
@@ -7085,7 +7085,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-03-14T14:59:20+00:00" "time": "2023-06-05T14:18:47+00:00"
}, },
{ {
"name": "symfony/service-contracts", "name": "symfony/service-contracts",
@@ -7430,16 +7430,16 @@
}, },
{ {
"name": "symfony/var-dumper", "name": "symfony/var-dumper",
"version": "v5.4.24", "version": "v5.4.25",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/var-dumper.git", "url": "https://github.com/symfony/var-dumper.git",
"reference": "8e12706bf9c68a2da633f23bfdc15b4dce5970b3" "reference": "82269f73c0f0f9859ab9b6900eebacbe54954ede"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/8e12706bf9c68a2da633f23bfdc15b4dce5970b3", "url": "https://api.github.com/repos/symfony/var-dumper/zipball/82269f73c0f0f9859ab9b6900eebacbe54954ede",
"reference": "8e12706bf9c68a2da633f23bfdc15b4dce5970b3", "reference": "82269f73c0f0f9859ab9b6900eebacbe54954ede",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -7498,7 +7498,7 @@
"dump" "dump"
], ],
"support": { "support": {
"source": "https://github.com/symfony/var-dumper/tree/v5.4.24" "source": "https://github.com/symfony/var-dumper/tree/v5.4.25"
}, },
"funding": [ "funding": [
{ {
@@ -7514,7 +7514,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-05-25T13:05:00+00:00" "time": "2023-06-20T20:56:26+00:00"
}, },
{ {
"name": "tightenco/collect", "name": "tightenco/collect",
@@ -8312,16 +8312,16 @@
}, },
{ {
"name": "filp/whoops", "name": "filp/whoops",
"version": "2.15.2", "version": "2.15.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/filp/whoops.git", "url": "https://github.com/filp/whoops.git",
"reference": "aac9304c5ed61bf7b1b7a6064bf9806ab842ce73" "reference": "c83e88a30524f9360b11f585f71e6b17313b7187"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/filp/whoops/zipball/aac9304c5ed61bf7b1b7a6064bf9806ab842ce73", "url": "https://api.github.com/repos/filp/whoops/zipball/c83e88a30524f9360b11f585f71e6b17313b7187",
"reference": "aac9304c5ed61bf7b1b7a6064bf9806ab842ce73", "reference": "c83e88a30524f9360b11f585f71e6b17313b7187",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -8371,7 +8371,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/filp/whoops/issues", "issues": "https://github.com/filp/whoops/issues",
"source": "https://github.com/filp/whoops/tree/2.15.2" "source": "https://github.com/filp/whoops/tree/2.15.3"
}, },
"funding": [ "funding": [
{ {
@@ -8379,7 +8379,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2023-04-12T12:00:00+00:00" "time": "2023-07-13T12:00:00+00:00"
}, },
{ {
"name": "hamcrest/hamcrest-php", "name": "hamcrest/hamcrest-php",
@@ -8434,16 +8434,16 @@
}, },
{ {
"name": "laravel/sail", "name": "laravel/sail",
"version": "v1.22.0", "version": "v1.23.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/laravel/sail.git", "url": "https://github.com/laravel/sail.git",
"reference": "923e1e112b6a8598664dbb0ee79dd3137f1c9d56" "reference": "62582606f80466aa81fba40b193b289106902853"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/laravel/sail/zipball/923e1e112b6a8598664dbb0ee79dd3137f1c9d56", "url": "https://api.github.com/repos/laravel/sail/zipball/62582606f80466aa81fba40b193b289106902853",
"reference": "923e1e112b6a8598664dbb0ee79dd3137f1c9d56", "reference": "62582606f80466aa81fba40b193b289106902853",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -8495,7 +8495,7 @@
"issues": "https://github.com/laravel/sail/issues", "issues": "https://github.com/laravel/sail/issues",
"source": "https://github.com/laravel/sail" "source": "https://github.com/laravel/sail"
}, },
"time": "2023-05-04T14:52:56+00:00" "time": "2023-06-28T18:31:28+00:00"
}, },
{ {
"name": "mockery/mockery", "name": "mockery/mockery",
@@ -9152,16 +9152,16 @@
}, },
{ {
"name": "phpunit/phpunit", "name": "phpunit/phpunit",
"version": "9.6.9", "version": "9.6.10",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git", "url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "a9aceaf20a682aeacf28d582654a1670d8826778" "reference": "a6d351645c3fe5a30f5e86be6577d946af65a328"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a9aceaf20a682aeacf28d582654a1670d8826778", "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a6d351645c3fe5a30f5e86be6577d946af65a328",
"reference": "a9aceaf20a682aeacf28d582654a1670d8826778", "reference": "a6d351645c3fe5a30f5e86be6577d946af65a328",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -9235,7 +9235,7 @@
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues", "issues": "https://github.com/sebastianbergmann/phpunit/issues",
"security": "https://github.com/sebastianbergmann/phpunit/security/policy", "security": "https://github.com/sebastianbergmann/phpunit/security/policy",
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.9" "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.10"
}, },
"funding": [ "funding": [
{ {
@@ -9251,7 +9251,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-06-11T06:13:56+00:00" "time": "2023-07-10T04:04:23+00:00"
}, },
{ {
"name": "sebastian/cli-parser", "name": "sebastian/cli-parser",

View File

@@ -80,7 +80,7 @@ return [
| |
*/ */
'locale' => 'en', 'locale' => 'it',
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@@ -106,7 +106,7 @@ return [
| |
*/ */
'faker_locale' => 'en_US', 'faker_locale' => 'it_IT',
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------

View File

@@ -20,6 +20,18 @@ class CreateDocumentisTable extends Migration
$table->string('descrizione'); $table->string('descrizione');
$table->string('filename'); $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');
});
*/
} }
/** /**

10
public/js/app/contratti.js vendored Normal file
View File

@@ -0,0 +1,10 @@
$('#contratti').DataTable({
responsive: true,
fields: [
{
label:"Data",
type: "datetime"
}
]
});
$(".draggable").draggable();

View File

@@ -10,7 +10,7 @@ $(document).ready(function() {
"order": [[0, "desc"]] "order": [[0, "desc"]]
}); });
}); });
$(".draggable").draggable();
var d = new Date(); var d = new Date();
var month = d.getMonth()+1; var month = d.getMonth()+1;

View File

@@ -21,7 +21,13 @@
</ul></li> </ul></li>
</ul> <!-- /.nav-second-level --></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 <li><a href="#"><i class="fa fa-industry fa-fw"></i> Consumi <span
class="fa arrow"></span></a> class="fa arrow"></span></a>
@@ -31,7 +37,8 @@
</li> </li>
<li><a href="{{ route('enel'); }}"><i class="fa fa-flash fa-fw"></i>Energia <li><a href="{{ route('enel'); }}"><i class="fa fa-flash fa-fw"></i>Energia
Elettrica</a></li> Elettrica</a></li>
</ul></li> </ul>
</li>
@endcan @can('automobili') @endcan @can('automobili')
<li><a href="{{ route('auto_list'); }}"><i class="fa fa-car fa-fw"></i> <li><a href="{{ route('auto_list'); }}"><i class="fa fa-car fa-fw"></i>
Automobili <span class="fa arrow"></span></a></li> Automobili <span class="fa arrow"></span></a></li>

View File

@@ -21,6 +21,10 @@
</div> </div>
<div class="mb-3"> <div class="mb-3">
<input type="hidden" name="movimenti_id" value="{{ $id }}"> <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> <button type="submit" class="btn btn-primary">Submit</button>
</div> </div>
</form> </form>

View File

@@ -0,0 +1,55 @@
@extends('admin')
@section('content')
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">Lista dei Contratti</h1>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="panel panel-default">
<div class="panel-heading">
Lista contratti
</div>
<div class="panel-body">
<table class="table table-striped table-bordered table-hover" id="contratti" data-page-length='25'>
<thead>
<tr>
<th>Numero contratto</th>
<th>Data Contratto</th>
<th>Data Termine</th>
<th>Fornitore</th>
<th>Tipo contratto</th>
<th>Importo</th>
<th>Stato</th>
<th>Documento</th>
</tr>
</thead>
<tbody>
@foreach($data as $contratto)
<tr>
<td>{{$contratto->numero}}</td>
<td>{{$contratto->datainizio}}</td>
<td>{{$contratto->datatermine}}</td>
<td>{{$contratto->fornitore}}</td>
<td>{{$contratto->tipo}}</td>
<td>{{$contratto->importo}}</td>
<td>{{$contratto->stato}}</td>
<td>{{$contratto->filename}}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<div class="panel-footer">
<!-- Footer del pannello -->
</div>
</div>
</div>
</div>
@endsection
@section('script')
<script src="/js/app/contratti.js"></script>
@endsection

View File

@@ -3,20 +3,21 @@
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<h1 class="page-header">Lista Attività</h1> <h1 class="page-header">Lista Attività</h1>
</div> </div>
</div> </div>
<div class="container"> <div class="container">
<!-- Content here --> <!-- Content here -->
<div class="row"> <div class="row">
<div class="col-xs-12"> <div class="col-xs-12 ">
<button class="btn btn-primary open_modal_new"><i <button class="btn btn-primary open_modal_new "><i
class="fa fa-pencil-square-o fw"></i>Nuova Attività</button> class="fa fa-pencil-square-o fw"></i>Nuova Attività</button>
</div> </div>
</div> </div>
<div class ="row"> <div class ="row">
<div class="col"> <div class="col">
<div class="panel"> <div class="panel panel-default ">
<div class="panel-header"> <div class="panel panel-heading">
Tutte le Attività Tutte le Attività
</div> </div>
<div class="panel-body"> <div class="panel-body">
@@ -43,7 +44,7 @@
</div> </div>
<!-- HIDDEN --> <!-- HIDDEN -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <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-content">
<div class="modal-header"> <div class="modal-header">
<h4 class="modal-title">Nuova Attività</h4> <h4 class="modal-title">Nuova Attività</h4>
@@ -51,7 +52,7 @@
<div class="modal-body"> <div class="modal-body">
<div class="row"> <div class="row">
<div class="col-md-10"> <div class="col-md-10">
<!-- FORM INSERIMENTO NUOVA CATEGORIA --> <!-- FORM INSERIMENTO NUOVA ATTIVITA -->
<form action="" method="POST" id="form"> <form action="" method="POST" id="form">
@csrf @csrf
<label for="titolo" class="form-label">Titolo:</label> <label for="titolo" class="form-label">Titolo:</label>

View File

@@ -17,6 +17,7 @@ use App\Http\Controllers\Utenti;
use App\Http\Controllers\ProgettiController; use App\Http\Controllers\ProgettiController;
use App\Http\Controllers\TaskController; use App\Http\Controllers\TaskController;
use App\Http\Controllers\AvvisoController; use App\Http\Controllers\AvvisoController;
use App\Http\Controllers\ContrattiController;
use App\Mail\myTestEmail; use App\Mail\myTestEmail;
/* /*
@@ -51,6 +52,8 @@ Route::group(['middleware'=>['permission:conti']], function(){
Route::get('movimenti/report/movimenti_categoria', [MovimentiController::class,'listMovPerCateg']); Route::get('movimenti/report/movimenti_categoria', [MovimentiController::class,'listMovPerCateg']);
Route::get('movimenti/report/movimentibycat', [MovimentiController::class,'listMovbyCat']); Route::get('movimenti/report/movimentibycat', [MovimentiController::class,'listMovbyCat']);
Route::get('movimenti/docs', [DocumentiController::class,'fileForm'])->name('documenti'); 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::post('movimenti/docs', [DocumentiController::class,'storeFile']);
Route::get('movimenti/import', [MovimentiController::class,'importFile'])->name('importING'); Route::get('movimenti/import', [MovimentiController::class,'importFile'])->name('importING');
Route::post('movimenti/import', [MovimentiController::class,'importEC_ING']); Route::post('movimenti/import', [MovimentiController::class,'importEC_ING']);
@@ -156,6 +159,11 @@ Route::group(['middleware'=>['permission:tasks']], function(){
}); });
// CONTRATTI
Route::group(['middleware'=>['permission:contratti']], function(){
Route::get('contratti', [ContrattiController::class, 'Contratti'])->name('contratti');
});
Route::group(['middleware'=>['permission:avvisi']], function(){ Route::group(['middleware'=>['permission:avvisi']], function(){
Route::post('avvisi/new',[AvvisoController::class,'saveAvviso'])->name('newAvviso'); Route::post('avvisi/new',[AvvisoController::class,'saveAvviso'])->name('newAvviso');
}); });