Dashboard

Vue d'ensemble de vos locations

{#if loading}
{#each [1,2,3,4] as _}
{/each}
{#each [1,2,3] as _}
{/each}
{:else}
Revenus {periodLabel}

{fmt(totalIncome)}

Dépenses {periodLabel}

{fmt(totalExpense)}

Bénéfice net

{fmt(totalBalance)}

Occupation ce mois

{occupancyRate}%

Revenus & dépenses par mois — {selectedYear}

{#if monthlyData.every(m => m.income === 0 && m.expense === 0)}
Aucune donnée pour {selectedYear}
{:else} {/if}

Dépenses par catégorie

{#if categoryExpenses.length === 0}
Aucune dépense
{:else if categoryView === 'chart'}
{:else}
{#each categoryExpenses as c, i} {/each}
Catégorie Montant %
{c.category}
{fmt(c.amount)} {totalCatExpense > 0 ? ((c.amount / totalCatExpense) * 100).toFixed(1) : 0}%
Total {fmt(totalCatExpense)} 100%
{/if}

Par bien — {periodLabel}

{#if summary.length === 0}

Aucune donnée

{:else}
{#each summary as s}
{s.property_name} {fmt(s.balance)}
{#if s.total_income > 0 || s.total_expense > 0} {@const total = s.total_income + s.total_expense}
{/if}
↑ {fmt(s.total_income)} ↓ {fmt(s.total_expense)}
{/each}
{/if}

Dernières transactions

{#if recentTx.length === 0}

Aucune transaction

{:else}
{#each recentTx as t (t.id)}

{t.description || t.category_name || '—'}

{fmtDate(t.date)} · {t.property_name}

{t.type === 'income' ? '+' : '−'}{fmt(t.amount)}
{/each}
Voir toutes → {/if}

Occupations ce mois

{#if calEvents.length === 0}

Aucune occupation ce mois-ci

{:else}
{#each calEvents as e (e.id)}

{e.title || (e.source === 'airbnb' ? 'Réservation Airbnb' : 'Occupation manuelle')}

{e.property_name}

{fmtDate(e.start_date)} → {fmtDate(e.end_date)}

{e.source === 'airbnb' ? 'Airbnb' : 'Manuel'}
{/each}
{/if}
{/if}