Creazione lista contratti
This commit is contained in:
parent
0668026eb7
commit
717e1be95d
@ -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()]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -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');
|
||||||
|
10
public/js/app/contratti.js
vendored
Normal file
10
public/js/app/contratti.js
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
$('#contratti').DataTable({
|
||||||
|
responsive: true,
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
label:"Data",
|
||||||
|
type: "datetime"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
|
$(".draggable").draggable();
|
2
public/js/app/task.js
vendored
2
public/js/app/task.js
vendored
@ -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;
|
||||||
|
@ -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>
|
||||||
|
55
resources/views/contratti/lista.blade.php
Normal file
55
resources/views/contratti/lista.blade.php
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
@extends('admin')
|
||||||
|
@section('content')
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<h1 class="page-header">Lista dei Contratti</h1>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<div class="panel-heading">
|
||||||
|
Lista contratti
|
||||||
|
</div>
|
||||||
|
<div class="panel-body">
|
||||||
|
<table class="table table-striped table-bordered table-hover" id="contratti" data-page-length='25'>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Numero contratto</th>
|
||||||
|
<th>Data Contratto</th>
|
||||||
|
<th>Data Termine</th>
|
||||||
|
<th>Fornitore</th>
|
||||||
|
<th>Tipo contratto</th>
|
||||||
|
<th>Importo</th>
|
||||||
|
<th>Stato</th>
|
||||||
|
<th>Documento</th>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@foreach($data as $contratto)
|
||||||
|
<tr>
|
||||||
|
<td>{{$contratto->numero}}</td>
|
||||||
|
<td>{{$contratto->datainizio}}</td>
|
||||||
|
<td>{{$contratto->datatermine}}</td>
|
||||||
|
<td>{{$contratto->fornitore}}</td>
|
||||||
|
<td>{{$contratto->tipo}}</td>
|
||||||
|
<td>{{$contratto->importo}}</td>
|
||||||
|
<td>{{$contratto->stato}}</td>
|
||||||
|
<td>{{$contratto->filename}}</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="panel-footer">
|
||||||
|
<!-- Footer del pannello -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
|
@section('script')
|
||||||
|
<script src="/js/app/contratti.js"></script>
|
||||||
|
@endsection
|
@ -15,7 +15,7 @@
|
|||||||
</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-header">
|
||||||
Tutte le Attività
|
Tutte le Attività
|
||||||
</div>
|
</div>
|
||||||
@ -43,7 +43,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 +51,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>
|
||||||
|
@ -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;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -156,6 +157,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');
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user