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.
69 lines
2.1 KiB
C#
69 lines
2.1 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using turf_tasker.Data;
|
|
|
|
#nullable disable
|
|
|
|
namespace turf_tasker.Migrations
|
|
{
|
|
[DbContext(typeof(ApplicationDbContext))]
|
|
partial class ApplicationDbContextModelSnapshot : ModelSnapshot
|
|
{
|
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder.HasAnnotation("ProductVersion", "9.0.6");
|
|
|
|
modelBuilder.Entity("turf_tasker.Models.LawnCareEvent", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<DateTime>("EventDate")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int>("EventType")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int?>("MowingPattern")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Notes")
|
|
.HasMaxLength(500)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("LawnCareEvents");
|
|
});
|
|
|
|
modelBuilder.Entity("turf_tasker.Models.LawnCareTip", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("Category")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Content")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Title")
|
|
.IsRequired()
|
|
.HasMaxLength(100)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("LawnCareTips");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|