diff --git a/Masa.Blazor.ProApp/Masa.Blazor.ProApp.Rcl/Models/Task.cs b/Masa.Blazor.ProApp/Masa.Blazor.ProApp.Rcl/Models/Task.cs index d89f013..e494639 100644 --- a/Masa.Blazor.ProApp/Masa.Blazor.ProApp.Rcl/Models/Task.cs +++ b/Masa.Blazor.ProApp/Masa.Blazor.ProApp.Rcl/Models/Task.cs @@ -1,16 +1,16 @@ -namespace Masa.Blazor.ProApp.Rcl.Models; +using System.ComponentModel.DataAnnotations; + +namespace Masa.Blazor.ProApp.Rcl.Models; public class TodoTask { public int Id { get; set; } - public string? Title { get; set; } - - public string? Assignee { get; set; } + [Required] public string? Title { get; set; } public string? Description { get; set; } - public DateOnly DueAt { get; set; } + [Required] public DateOnly DueAt { get; set; } public bool Important { get; set; } diff --git a/Masa.Blazor.ProApp/Masa.Blazor.ProApp.Rcl/Pages/Todo.razor b/Masa.Blazor.ProApp/Masa.Blazor.ProApp.Rcl/Pages/Todo.razor index 6975319..d730131 100644 --- a/Masa.Blazor.ProApp/Masa.Blazor.ProApp.Rcl/Pages/Todo.razor +++ b/Masa.Blazor.ProApp/Masa.Blazor.ProApp.Rcl/Pages/Todo.razor @@ -17,7 +17,8 @@ - + - - - - - - -
- - mdi-calendar-today-outline - Today - - - mdi-flag-variant-outline - - - - mdi-arrow-up-circle - -
+ + + + + + + +
+ + mdi-calendar-today-outline + Today + + + mdi-flag-variant-outline + + + + mdi-arrow-up-circle + +
+
@@ -67,6 +72,7 @@ @code { private bool? _drawer = false; + private bool _newTaskSheet; private string Category => Filter ?? "inbox"; @@ -74,5 +80,12 @@ [Parameter] public string? Filter { get; set; } + private async Task HandleOnSubmit() + { + // TODO: Save the task + + _newTaskSheet = false; + } + } \ No newline at end of file