@*<!DOCTYPE html>
    <html lang="fr">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Budget</title>
        <link rel="stylesheet" href="~/css/Budget.css">
    </head>
    <body>

        <div class="budget-container">
            <div class="header">
                <a asp-controller="Acceuil" asp-action="Acceuil"><span class="back-btn">←</span></a>
                <h2>Budget</h2>
            </div>
            <div class="total-budget">0,00 €</div>

            <ul class="budget-list">
                <li><a href="#"><span class="icon">🏠</span> Home/Rent</a></li>
                <li><a href="#"><span class="icon">💡</span> Utilities</a></li>
                <li><a href="#"><span class="icon">🛒</span> Food/Groceries</a></li>
                <li><a href="#"><span class="icon">🛍️</span> Departmental</a></li>
                <li><a href="#"><span class="icon">🎵</span> Entertainment</a></li>
                <li><a href="#"><span class="icon">⛽</span> Car/Auto</a></li>
                <li><a href="#"><span class="icon">⚕️</span> Insurance/Medical</a></li>
                <li><a href="#"><span class="icon">⭐</span> Misc/One-time</a></li>
            </ul>
        </div>

    </body>
    </html>*@
@model IEnumerable<FamilyBudget.Models.Bugdet>

@{
    ViewData["Title"] = "Budgets";
}
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css"/>
<link rel="stylesheet" href="~/css/StyleSheet1.css">
<div class="header">
    <a asp-controller="Acceuil" asp-action="Acceuil"><span class="back-btn">←</span></a>
</div>
<h1 class="mb-4">Budgets</h1>

<p>
    <a class="btn btn-primary" href="@Url.Action("Create")">✚ Ajouter</a>
</p>

<table class="table table-striped table-bordered">
    <thead class="thead-dark">
        <tr>
            <th>Utilisateur</th>
            <th>Categorie</th>
            <th>Montant Alloue</th>
            <th>Actions</th>
        </tr>
    </thead>
    <tbody>
        @foreach (var item in Model)
        {
        <tr>
            <td>@item.IdUtilisateurNavigation.Nom</td>
            <td>@item.Categorie</td>
            <td>@item.MontantAlloue</td>
            <td>
                <a class="btn btn-info btn-sm" asp-action="Details" asp-route-id="@item.IdBudget">Details</a>
                <a class="btn btn-warning btn-sm" asp-action="Edit" asp-route-id="@item.IdBudget">Edit</a>
                <a class="btn btn-danger btn-sm" asp-action="Delete" asp-route-id="@item.IdBudget">Delete</a>
            </td>
        </tr>
        }
    </tbody>
</table>

