26 lines
647 B
Plaintext
26 lines
647 B
Plaintext
@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>
|
|
}
|
|
|
|
|
|
|
|
@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);
|
|
|
|
// }
|
|
|
|
}
|
|
}
|