aggiornato lista dei movimenti e inserito come test il fullcalendar
This commit is contained in:
parent
21cc195ce4
commit
67775716b8
@ -22,9 +22,10 @@ class DocumentiController extends Controller
|
||||
}
|
||||
|
||||
public function fileForm(Request $request){
|
||||
$documenti = Documenti::getList($request->input('id'));
|
||||
$documenti = Documenti::getList($request->input('entity_id'));
|
||||
|
||||
return view('conti.documenti.insert', [
|
||||
'id'=>$request->input('id'),
|
||||
'id'=>$request->input('entity_id'),
|
||||
'documenti'=>$documenti
|
||||
]);
|
||||
}
|
||||
|
@ -126,4 +126,9 @@ class FullCalenderController extends Controller
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function showDemo()
|
||||
{
|
||||
return view('calendario.fullcalendar');
|
||||
}
|
||||
}
|
||||
|
@ -9,9 +9,9 @@ class GenDocController extends Controller
|
||||
{
|
||||
//
|
||||
public function fileForm(Request $request){
|
||||
$documenti = GenDoc::listDocument($request->input('entity'),$request->input('id'));
|
||||
$documenti = GenDoc::listDocument($request->input('entity'),$request->input('entity_id'));
|
||||
return view('conti.documenti.insert', [
|
||||
'id'=>$request->input('id'),
|
||||
'id'=>$request->input('entity_id'),
|
||||
'entity'=>$request->input('entity'),
|
||||
'documenti'=>$documenti,
|
||||
]);
|
||||
|
@ -47,7 +47,8 @@ class MovimentiController extends Controller
|
||||
$saldo=Movimenti::getSaldoTot();
|
||||
$mieiTasks=Task::getTaskAssignedToUser(Auth::id());
|
||||
// $TasksAssegnati=Task::getTaskAssignedByUser(Auth::id());
|
||||
$avvisi=Avviso::getAvvisi();
|
||||
// $avvisi=Avviso::getAvvisi();
|
||||
$avvisi=Avviso::getActualAvvisi();
|
||||
|
||||
return view('layouts.dashboard',[
|
||||
'entrate'=>$entrate,
|
||||
|
@ -27,6 +27,11 @@ class Avviso extends Model
|
||||
return self::all();
|
||||
}
|
||||
|
||||
public static function getActualAvvisi()
|
||||
{
|
||||
return self::where('creato_il','>=', now()->subMonth())->get();
|
||||
}
|
||||
|
||||
public static function getHAstatus()
|
||||
{
|
||||
/*$response = Http::withHeaders([
|
||||
|
@ -27,7 +27,8 @@ class GenDoc extends Model
|
||||
public static function listDocument($entity,$entity_id)
|
||||
{
|
||||
// Ritorna la lista dei documenti in base all'entità e al rispettivo id
|
||||
return DB::table('gen_docs')->where('entity','=',$entity)->andWere('entity_id','=',$entity_id)->get();
|
||||
// return DB::table('gen_docs')->where('entity','=',$entity)->where('entity_id','=',$entity_id)->get(); //nuova funzione
|
||||
return DB::table('documentis')->where('movimenti_id','=', $entity_id)->get();
|
||||
}
|
||||
|
||||
public static function countDocument($entity,$entity_id){
|
||||
|
@ -323,7 +323,7 @@ return [
|
||||
],
|
||||
[
|
||||
'text' => 'Categorie',
|
||||
'url' => '#',
|
||||
'route' => 'categorie',
|
||||
],
|
||||
[
|
||||
'text' => 'Tags',
|
||||
@ -394,7 +394,7 @@ return [
|
||||
],
|
||||
[
|
||||
'text' => 'Appuntamenti',
|
||||
'url' => '#',
|
||||
'url' => '/admin/test/calendar',
|
||||
'icon' => 'fas fa-fw fa-calendar',
|
||||
],
|
||||
|
||||
@ -516,6 +516,27 @@ return [
|
||||
],
|
||||
],
|
||||
],
|
||||
'Fullcalendar' => [
|
||||
'active' => false,
|
||||
'files' => [
|
||||
[
|
||||
'type' => 'css',
|
||||
'asset' => true,
|
||||
'location' => '/vendor/fullcalendar/main.min.css',
|
||||
],
|
||||
[
|
||||
'type' => 'js',
|
||||
'asset' => true,
|
||||
'location' => '/vendor/fullcalendar/main.min.js',
|
||||
],
|
||||
[
|
||||
'type' => 'js',
|
||||
'asset' => true,
|
||||
'location' => '/vendor/fullcalendar/locales-all.min.js',
|
||||
],
|
||||
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
|
36
resources/views/calendario/fullcalendar.blade.php
Normal file
36
resources/views/calendario/fullcalendar.blade.php
Normal file
@ -0,0 +1,36 @@
|
||||
@extends('adminlte::page')
|
||||
@section('plugins.Fullcalendar', true)
|
||||
@section('content')
|
||||
<div id="calendar"></div>
|
||||
@endsection
|
||||
@section('js')
|
||||
<script>
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
var calendarEl = document.getElementById('calendar');
|
||||
|
||||
var calendar = new FullCalendar.Calendar(calendarEl, {
|
||||
timeZone: 'UTC',
|
||||
initialView: 'dayGridMonth',
|
||||
events: '/api/demo-feeds/events.json',
|
||||
editable: true,
|
||||
selectable: true,
|
||||
// plugins: [dayGridPlugin],
|
||||
// initialView: 'dayGridWeek',
|
||||
headerToolbar: {
|
||||
left: 'prev,next',
|
||||
center: 'title',
|
||||
right: 'dayGridMonth,timeGridWeek,timeGridDay' // user can switch between the two
|
||||
},
|
||||
dateClick: function(info) {
|
||||
alert('Clicked on: ' + info.dateStr);
|
||||
}
|
||||
});
|
||||
calendar.setOption('locale', 'it');
|
||||
calendar.render();
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
@endsection
|
@ -1,10 +1,11 @@
|
||||
@extends('admin')
|
||||
@extends('adminlte::page')
|
||||
|
||||
@section('content_header')
|
||||
<h1>Lista categorie</h1>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">Lista categorie</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<!-- Content here -->
|
||||
<button class="btn btn-warning btn-detail open_modal_new">Nuova
|
||||
@ -150,6 +151,6 @@
|
||||
|
||||
@endsection
|
||||
|
||||
@section('script')
|
||||
@section('js')
|
||||
<script src="/js/app/conti_categorie.js"></script>
|
||||
@endsection
|
||||
|
@ -1,10 +1,12 @@
|
||||
@extends('admin')
|
||||
@extends('adminlte::page')
|
||||
|
||||
@section('content_header')
|
||||
<h1>Lista Documenti</h1>
|
||||
@endsection
|
||||
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">Lista Documenti</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<!-- Content here -->
|
||||
<div class="row">
|
||||
@ -48,7 +50,7 @@
|
||||
<tbody>
|
||||
@foreach($documenti as $documento)
|
||||
<tr>
|
||||
<td><a href="/storage/{{ $documento->filename }}">{{ $documento->descrizione; }}</a></td>
|
||||
<td><a href="/storage/{{ $documento->filename; }}">{{ $documento->descrizione; }}</a></td>
|
||||
<td>
|
||||
<a class="btn btn-primary" href="/admin/doc_update?id={{ $documento->id; }}"><i class="fa fa-pencil-square-o fw"></i></a>
|
||||
<a class="btn btn-danger" href="/admin/doc_delete?id={{ $documento->id; }}"><i class="fa fa-trash-o fa-fw"></i></a>
|
||||
|
@ -135,7 +135,7 @@
|
||||
|
||||
@endsection
|
||||
@section('js')
|
||||
@parent
|
||||
|
||||
<script src="/js/app/movimenti.js"></script>
|
||||
@endsection
|
||||
|
||||
|
@ -180,6 +180,7 @@ Route::group(['middleware'=>['permission:avvisi']], function(){
|
||||
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('test/calendar',[FullCalenderController::class,'showDemo']);
|
||||
|
||||
Route::get('testmail',function(){
|
||||
$name='Flavio';
|
||||
|
Loading…
Reference in New Issue
Block a user