This commit introduces a new "Lawn Care Tips" section to the application and refines the visual layout of the main Dashboard.
**Key Changes:**
* **Lawn Care Tips Feature:**
* Added `LawnCareTip` model with `Title`, `Category`, and `Content` properties.
* Defined `TipCategory` enum for better organization (Mowing, Watering, Fertilizing, Weed Control, Aeration, General).
* Integrated `LawnCareTip` into `ApplicationDbContext` for database persistence.
* Updated `_Layout.cshtml` to include a new "Lawn Tips" navigation link.
* **Dashboard Layout Fix:**
* Refactored `Views/Home/Index.cshtml` to correctly use Bootstrap's grid system by placing the "Log a New Activity" card in its own `div.row`. This resolves the layout issue where the card was appearing immediately after the previous row without proper spacing.
* Updated `HomeController` to include a `LastAerationDate` query for the dashboard display.
* Modified `DashboardViewModel` to include `LastAerationDate`.
* **Build/Dependency Updates:**
* Added `Microsoft.EntityFrameworkCore.SqlServer` (likely a residue from scaffolding, though SQLite is still primary).
* Added `Microsoft.VisualStudio.Web.CodeGeneration.Design` for scaffolding tools.
This enhances the application's functionality by providing a knowledge base and improves the user experience with a cleaner dashboard layout.
47 lines
1.2 KiB
Text
47 lines
1.2 KiB
Text
@model IEnumerable<turf_tasker.Models.LawnCareTip>
|
|
|
|
@{
|
|
ViewData["Title"] = "Index";
|
|
}
|
|
|
|
<h1>Index</h1>
|
|
|
|
<p>
|
|
<a asp-action="Create">Create New</a>
|
|
</p>
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>
|
|
@Html.DisplayNameFor(model => model.Title)
|
|
</th>
|
|
<th>
|
|
@Html.DisplayNameFor(model => model.Category)
|
|
</th>
|
|
<th>
|
|
@Html.DisplayNameFor(model => model.Content)
|
|
</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var item in Model) {
|
|
<tr>
|
|
<td>
|
|
@Html.DisplayFor(modelItem => item.Title)
|
|
</td>
|
|
<td>
|
|
@Html.DisplayFor(modelItem => item.Category)
|
|
</td>
|
|
<td>
|
|
@Html.DisplayFor(modelItem => item.Content)
|
|
</td>
|
|
<td>
|
|
<a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
|
|
<a asp-action="Details" asp-route-id="@item.Id">Details</a> |
|
|
<a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
|
|
</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|