This commit is contained in:
mmrbnjd
2024-06-25 17:14:08 +03:30
parent 4631d8f159
commit ce81911242
10 changed files with 76 additions and 23 deletions

View File

@@ -1,11 +1,25 @@
@using Shared.DTOs
<h3>Notifications</h3>
<h3>@items.Count()</h3>
@using Front.Services
@using Shared.DTOs
@inject HttpClientController hc;
@inject Fixedvalues fv;
@foreach (var item in items)
{
<Alert OnClosed="()=>OnClosedAlert(item)" Color="(AlertColor)Enum.Parse(typeof(AlertColor), item.Status.ToString())" Dismissable="true"> @item.Message </Alert>
}
<Alert Color="AlertColor.Warning" Dismissable="true"> <strong>Holy guacamole!</strong> You should check in on some of those fields below. </Alert>
@code {
[Parameter] public List<AlertDTO> items { get; set; }
public async Task OnClosedAlert(AlertDTO nt)
{
var rsp= await hc.Put($"User/ReadNotification/{Convert.ToInt32(nt.ViewSize)}");
// if (rsp.IsSuccessStatusCode)
// {
// fv.dashBoard.Notifications.Remove(nt);
// }
}
}