diff --git a/Migrations/20250619022142_AddNotApplicableMowingPattern.Designer.cs b/Migrations/20250619022142_AddNotApplicableMowingPattern.Designer.cs new file mode 100644 index 0000000..1952d3d --- /dev/null +++ b/Migrations/20250619022142_AddNotApplicableMowingPattern.Designer.cs @@ -0,0 +1,72 @@ +// +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("20250619022142_AddNotApplicableMowingPattern")] + partial class AddNotApplicableMowingPattern + { + /// + 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("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("EventDate") + .HasColumnType("TEXT"); + + b.Property("EventType") + .HasColumnType("INTEGER"); + + b.Property("MowingPattern") + .HasColumnType("INTEGER"); + + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.ToTable("LawnCareEvents"); + }); + + modelBuilder.Entity("turf_tasker.Models.LawnCareTip", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Category") + .HasColumnType("INTEGER"); + + b.Property("Content") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.ToTable("LawnCareTips"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Migrations/20250619022142_AddNotApplicableMowingPattern.cs b/Migrations/20250619022142_AddNotApplicableMowingPattern.cs new file mode 100644 index 0000000..a94da34 --- /dev/null +++ b/Migrations/20250619022142_AddNotApplicableMowingPattern.cs @@ -0,0 +1,22 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace turf_tasker.Migrations +{ + /// + public partial class AddNotApplicableMowingPattern : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + + } + } +} diff --git a/Models/LawnCareEvent.cs b/Models/LawnCareEvent.cs index 604d8de..d5e4c36 100644 --- a/Models/LawnCareEvent.cs +++ b/Models/LawnCareEvent.cs @@ -14,6 +14,8 @@ public enum LawnCareEventType public enum MowingPattern { + [Display(Name = "N/A")] + NotApplicable, Vertical, Horizontal, Diagonal, diff --git a/Views/LawnCareEvents/Calendar.cshtml b/Views/LawnCareEvents/Calendar.cshtml index c5f0a96..0db49ff 100644 --- a/Views/LawnCareEvents/Calendar.cshtml +++ b/Views/LawnCareEvents/Calendar.cshtml @@ -2,7 +2,12 @@ ViewData["Title"] = "Lawn Care Calendar"; } -

@ViewData["Title"]

+
+

@ViewData["Title"]

+ + Create New Event + +
@@ -27,11 +32,106 @@ @section Scripts { } @section Styles { - } \ No newline at end of file diff --git a/Views/LawnCareEvents/Delete.cshtml b/Views/LawnCareEvents/Delete.cshtml index 101b2f0..42b8768 100644 --- a/Views/LawnCareEvents/Delete.cshtml +++ b/Views/LawnCareEvents/Delete.cshtml @@ -39,7 +39,11 @@
- | - Back to List + +
+ +
\ No newline at end of file diff --git a/Views/LawnCareEvents/Details.cshtml b/Views/LawnCareEvents/Details.cshtml index d76c146..08013e6 100644 --- a/Views/LawnCareEvents/Details.cshtml +++ b/Views/LawnCareEvents/Details.cshtml @@ -43,6 +43,7 @@
+ Delete
diff --git a/Views/LawnCareEvents/Edit.cshtml b/Views/LawnCareEvents/Edit.cshtml index 47642ec..0be630c 100644 --- a/Views/LawnCareEvents/Edit.cshtml +++ b/Views/LawnCareEvents/Edit.cshtml @@ -1,72 +1,74 @@ @model turf_tasker.Models.LawnCareEvent @{ - ViewData["Title"] = "Edit"; +ViewData["Title"] = "Edit"; }

Edit

-

LawnCareEvent

+

Lawn Care Event


-
+
-
+
-
+
-
+
+ + Delete
-
+ @section Scripts { - @{await Html.RenderPartialAsync("_ValidationScriptsPartial");} +@{await Html.RenderPartialAsync("_ValidationScriptsPartial");} - + }); + } \ No newline at end of file diff --git a/Views/LawnCareEvents/Index.cshtml b/Views/LawnCareEvents/Index.cshtml index 55439ca..5c79329 100644 --- a/Views/LawnCareEvents/Index.cshtml +++ b/Views/LawnCareEvents/Index.cshtml @@ -4,11 +4,14 @@ ViewData["Title"] = "Lawn Care Log"; } -

@ViewData["Title"]

+
+

@ViewData["Title"]

-

- Create New Event -

+

+ Create New Event + View Calendar +

+
@@ -16,8 +19,8 @@

Find by type or note: - | - Back to Full List + + Reset Filter

@@ -63,9 +66,11 @@ @Html.DisplayFor(modelItem => item.Notes) - Edit | - Details | - Delete +
+ Edit + Details + Delete +
} diff --git a/Views/LawnCareTip/Index.cshtml b/Views/LawnCareTip/Index.cshtml index 694efe3..edd49e9 100644 --- a/Views/LawnCareTip/Index.cshtml +++ b/Views/LawnCareTip/Index.cshtml @@ -7,7 +7,7 @@

Index

- Create New + Create New Tip

@@ -36,10 +36,11 @@ - } diff --git a/wwwroot/css/site.css b/wwwroot/css/site.css index efacf73..c019ffe 100644 --- a/wwwroot/css/site.css +++ b/wwwroot/css/site.css @@ -33,4 +33,17 @@ body { .navbar-custom .nav-link:hover { color: #d4d4d4; /* A light gray for hover effect */ +} + +/* For tables, to control column widths */ +.table .col-content { + max-width: 400px; /* Adjust as needed */ + word-wrap: break-word; /* Break long words */ + white-space: normal; /* Allow text to wrap normally */ +} + +.table .col-actions { + width: 150px; /* Fixed width for action buttons, adjust as needed */ + min-width: 120px; /* Ensure minimum space */ + white-space: nowrap; /* Keep buttons on one line, prevent wrapping */ } \ No newline at end of file
@Html.DisplayFor(modelItem => item.Content) - Edit | - Details | - Delete + +
+ Edit + Delete +