feat: Add Lawn Care Tips section and improve Dashboard layout
This commit is contained in:
parent
1f50fedb80
commit
985c944e16
17 changed files with 689 additions and 18 deletions
72
Migrations/20250617225541_AddLawnCareTips.Designer.cs
generated
Normal file
72
Migrations/20250617225541_AddLawnCareTips.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using turf_tasker.Data;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace turf_tasker.Migrations
|
||||
{
|
||||
[DbContext(typeof(ApplicationDbContext))]
|
||||
[Migration("20250617225541_AddLawnCareTips")]
|
||||
partial class AddLawnCareTips
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(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
|
||||
}
|
||||
}
|
||||
}
|
||||
36
Migrations/20250617225541_AddLawnCareTips.cs
Normal file
36
Migrations/20250617225541_AddLawnCareTips.cs
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace turf_tasker.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddLawnCareTips : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "LawnCareTips",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
Title = table.Column<string>(type: "TEXT", maxLength: 100, nullable: false),
|
||||
Category = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
Content = table.Column<string>(type: "TEXT", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_LawnCareTips", x => x.Id);
|
||||
});
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "LawnCareTips");
|
||||
}
|
||||
}
|
||||
}
|
||||
72
Migrations/20250617225855_SeedBermudaTips.Designer.cs
generated
Normal file
72
Migrations/20250617225855_SeedBermudaTips.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using turf_tasker.Data;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace turf_tasker.Migrations
|
||||
{
|
||||
[DbContext(typeof(ApplicationDbContext))]
|
||||
[Migration("20250617225855_SeedBermudaTips")]
|
||||
partial class SeedBermudaTips
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(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
|
||||
}
|
||||
}
|
||||
}
|
||||
70
Migrations/20250617225855_SeedBermudaTips.cs
Normal file
70
Migrations/20250617225855_SeedBermudaTips.cs
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace turf_tasker.Migrations
|
||||
{
|
||||
public partial class SeedBermudaTips : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
// Seed data for LawnCareTips
|
||||
migrationBuilder.InsertData(
|
||||
table: "LawnCareTips",
|
||||
columns: new[] { "Id", "Title", "Category", "Content" },
|
||||
values: new object[,]
|
||||
{
|
||||
{ 1, "Bermuda Mowing Height", 0, "For Bermuda grass in Oklahoma, mow at a height of 1-2 inches for optimal density and health during peak season." },
|
||||
{ 2, "Bermuda Mowing Frequency", 0, "During peak growing season (late spring/summer), mow Bermuda grass every 3-5 days. Frequent mowing prevents scalping." },
|
||||
{ 3, "Bermuda Watering - Deep & Infrequent", 1, "Water Bermuda grass deeply (1-1.5 inches) once or twice a week, rather than frequent, shallow watering. Water in the early morning." },
|
||||
{ 4, "Bermuda Spring Fertilization", 2, "Apply a nitrogen-heavy fertilizer in late spring (May/June) after Bermuda grass has fully greened up and soil temperatures are consistently above 65°F (18°C)." },
|
||||
{ 5, "Bermuda Summer Fertilization", 2, "A second application of nitrogen fertilizer in mid-summer (July/August) can further promote vigorous growth for Bermuda grass." },
|
||||
{ 6, "Pre-Emergent Weed Control", 3, "Apply a pre-emergent herbicide for summer annual weeds like crabgrass in early spring (March-April) before soil temperatures consistently reach 50-55°F (10-13°C) in Oklahoma." },
|
||||
{ 7, "Post-Emergent Weed Control", 3, "Treat broadleaf weeds in Bermuda grass as needed throughout the growing season with a selective post-emergent herbicide. Always follow product instructions carefully." },
|
||||
{ 8, "Aeration for Bermuda", 4, "Aerate Bermuda grass in late spring to early summer when it's actively growing. This helps reduce compaction and improve nutrient absorption." },
|
||||
{ 9, "Bermuda Winter Dormancy", 5, "Bermuda grass will go dormant and turn brown in winter; this is normal. Avoid heavy foot traffic when it is dormant to prevent damage." }
|
||||
});
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
// Remove the seeded data if the migration is reverted
|
||||
migrationBuilder.DeleteData(
|
||||
table: "LawnCareTips",
|
||||
keyColumn: "Id",
|
||||
keyValue: 1);
|
||||
migrationBuilder.DeleteData(
|
||||
table: "LawnCareTips",
|
||||
keyColumn: "Id",
|
||||
keyValue: 2);
|
||||
migrationBuilder.DeleteData(
|
||||
table: "LawnCareTips",
|
||||
keyColumn: "Id",
|
||||
keyValue: 3);
|
||||
migrationBuilder.DeleteData(
|
||||
table: "LawnCareTips",
|
||||
keyColumn: "Id",
|
||||
keyValue: 4);
|
||||
migrationBuilder.DeleteData(
|
||||
table: "LawnCareTips",
|
||||
keyColumn: "Id",
|
||||
keyValue: 5);
|
||||
migrationBuilder.DeleteData(
|
||||
table: "LawnCareTips",
|
||||
keyColumn: "Id",
|
||||
keyValue: 6);
|
||||
migrationBuilder.DeleteData(
|
||||
table: "LawnCareTips",
|
||||
keyColumn: "Id",
|
||||
keyValue: 7);
|
||||
migrationBuilder.DeleteData(
|
||||
table: "LawnCareTips",
|
||||
keyColumn: "Id",
|
||||
keyValue: 8);
|
||||
migrationBuilder.DeleteData(
|
||||
table: "LawnCareTips",
|
||||
keyColumn: "Id",
|
||||
keyValue: 9);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -40,6 +40,29 @@ namespace turf_tasker.Migrations
|
|||
|
||||
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
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue