diff --git a/Timely/Components/TimeRecord.razor b/Timely/Components/TimeRecord.razor index a03419c..aa84228 100644 --- a/Timely/Components/TimeRecord.razor +++ b/Timely/Components/TimeRecord.razor @@ -22,17 +22,28 @@ - + + + +@inject IDialogService DialogService + @code { [Parameter] public Shift Shift { get; set; } private async Task Delete() { + var result = await DialogService.ShowMessageBox("Delete Time Record", "This action cannot be undone, continue?"); + + if (result is null || !result.Value) + { + return; + } + await using var db = new AppDbContext(); await db.Shifts.Where(shift => shift.Id == Shift.Id).ExecuteDeleteAsync(); await db.SaveToCacheAsync(); diff --git a/Timely/Timely.csproj b/Timely/Timely.csproj index 08c0878..335a7d0 100644 --- a/Timely/Timely.csproj +++ b/Timely/Timely.csproj @@ -4,7 +4,6 @@ net8.0 enable enable - service-worker-assets.js true @@ -16,11 +15,6 @@ - - - - - diff --git a/Timely/wwwroot/index.html b/Timely/wwwroot/index.html index 60a4c2a..7ee6c15 100644 --- a/Timely/wwwroot/index.html +++ b/Timely/wwwroot/index.html @@ -28,18 +28,6 @@ -