164 lines
4.9 KiB
PHP
Executable File
164 lines
4.9 KiB
PHP
Executable File
<?php
|
|
|
|
namespace App\Http\Controllers\Admin;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
|
|
class AffittiController extends Controller
|
|
{
|
|
/**
|
|
* Entry point per la console Gestione Affitti.
|
|
*/
|
|
public function index()
|
|
{
|
|
$metrics = [
|
|
[
|
|
'label' => 'Contratti attivi',
|
|
'value' => 45,
|
|
'chip' => '+3 questa settimana',
|
|
'tone' => 'emerald',
|
|
'icon' => 'fa-file-signature',
|
|
],
|
|
[
|
|
'label' => 'Canoni in scadenza (30 gg)',
|
|
'value' => 7,
|
|
'chip' => '€ 5.320 coinvolti',
|
|
'tone' => 'amber',
|
|
'icon' => 'fa-hourglass-half',
|
|
],
|
|
[
|
|
'label' => 'Incasso mensile stimato',
|
|
'value' => '€ 28.500',
|
|
'chip' => '+4.2% vs Q2',
|
|
'tone' => 'blue',
|
|
'icon' => 'fa-coins',
|
|
],
|
|
[
|
|
'label' => 'Occupazione media',
|
|
'value' => '96%',
|
|
'chip' => '2 unità libere',
|
|
'tone' => 'indigo',
|
|
'icon' => 'fa-chart-line',
|
|
],
|
|
];
|
|
|
|
$expiringContracts = [
|
|
[
|
|
'unit' => 'Scala A · Int. 5',
|
|
'stabile' => 'Via Livenza 14',
|
|
'tenant' => 'Laura Conti',
|
|
'due_in' => 'Tra 12 giorni',
|
|
'rent' => '€ 780/mese',
|
|
'status' => 'warning',
|
|
],
|
|
[
|
|
'unit' => 'Scala B · Int. 2',
|
|
'stabile' => 'Residenza Le Magnolie',
|
|
'tenant' => 'Marco Pellegrini',
|
|
'due_in' => 'Tra 24 giorni',
|
|
'rent' => '€ 920/mese',
|
|
'status' => 'warning',
|
|
],
|
|
[
|
|
'unit' => 'Loft 3B',
|
|
'stabile' => 'Hub Innovazione',
|
|
'tenant' => 'STUDIO K s.r.l.',
|
|
'due_in' => 'Tra 31 giorni',
|
|
'rent' => '€ 1.450/mese',
|
|
'status' => 'neutral',
|
|
],
|
|
];
|
|
|
|
$tasks = [
|
|
[
|
|
'title' => 'Invia sollecito canone Q3',
|
|
'description' => 'Condominio Via Livenza · Contratto LC-2023-045',
|
|
'owner' => 'Francesca',
|
|
'due_date' => 'Oggi',
|
|
'priority' => 'high',
|
|
],
|
|
[
|
|
'title' => 'Allinea riparto cauzioni',
|
|
'description' => 'Residenza Le Magnolie · 4 unità interessate',
|
|
'owner' => 'Luca',
|
|
'due_date' => 'Domani',
|
|
'priority' => 'medium',
|
|
],
|
|
[
|
|
'title' => 'Carica nuovo contratto coworking',
|
|
'description' => 'Hub Innovazione · cliente STUDIO K',
|
|
'owner' => 'Silvia',
|
|
'due_date' => 'Tra 3 giorni',
|
|
'priority' => 'low',
|
|
],
|
|
];
|
|
|
|
$stabiliFocus = [
|
|
[
|
|
'name' => 'Via Livenza 14',
|
|
'units' => 18,
|
|
'occupied' => 17,
|
|
'free' => 1,
|
|
'warnings' => 2,
|
|
'trend' => '+1 contratto',
|
|
],
|
|
[
|
|
'name' => 'Residenza Le Magnolie',
|
|
'units' => 24,
|
|
'occupied' => 22,
|
|
'free' => 2,
|
|
'warnings' => 1,
|
|
'trend' => 'Stabile',
|
|
],
|
|
[
|
|
'name' => 'Hub Innovazione',
|
|
'units' => 12,
|
|
'occupied' => 12,
|
|
'free' => 0,
|
|
'warnings' => 0,
|
|
'trend' => '+€ 1.450 mensile',
|
|
],
|
|
];
|
|
|
|
$timeline = [
|
|
[
|
|
'title' => 'Contratto rinnovato',
|
|
'time' => '09:24',
|
|
'details' => 'LC-2020-011 · Residenza Le Magnolie',
|
|
'badge' => 'Renew',
|
|
'tone' => 'emerald',
|
|
],
|
|
[
|
|
'title' => 'Upload documento allegato',
|
|
'time' => '08:10',
|
|
'details' => 'Verbale consegna Loft 3B',
|
|
'badge' => 'Docs',
|
|
'tone' => 'indigo',
|
|
],
|
|
[
|
|
'title' => 'Ticket manutenzione aperto',
|
|
'time' => 'ieri',
|
|
'details' => 'Perdita rubinetto · Scala A Int. 5',
|
|
'badge' => 'Ticket',
|
|
'tone' => 'amber',
|
|
],
|
|
];
|
|
|
|
return view('admin.affitti.index', compact(
|
|
'metrics',
|
|
'expiringContracts',
|
|
'tasks',
|
|
'stabiliFocus',
|
|
'timeline'
|
|
));
|
|
}
|
|
|
|
/**
|
|
* Placeholder form per la creazione di un nuovo contratto di affitto.
|
|
*/
|
|
public function create()
|
|
{
|
|
return view('admin.affitti.create');
|
|
}
|
|
}
|