...
This commit is contained in:
@@ -170,7 +170,7 @@
|
||||
{
|
||||
<li class="nav-item lh-1 me-3 f-ir">
|
||||
<Button Type="ButtonType.Button" @onclick="ShowNotifications" Color="ButtonColor.None">
|
||||
<Badge Color="BadgeColor.Danger"><Icon Name="IconName.MegaphoneFill" /> @dashBoard?.Notifications.Count()</Badge>
|
||||
<Badge Color="BadgeColor.Danger"><Icon Name="IconName.MegaphoneFill" /> @countnot</Badge>
|
||||
</Button>
|
||||
</li>
|
||||
}
|
||||
@@ -216,6 +216,7 @@
|
||||
</div>
|
||||
|
||||
@code {
|
||||
public int countnot = 0;
|
||||
private Modal modal = default!;
|
||||
public DashBoardDTO? dashBoard { get; set; }
|
||||
protected override async Task OnInitializedAsync()
|
||||
@@ -224,15 +225,22 @@
|
||||
nav.NavigateTo("/");
|
||||
|
||||
dashBoard = await fv.GetDashBoard();
|
||||
if (dashBoard != null)
|
||||
countnot = dashBoard.Notifications.Count();
|
||||
await base.OnInitializedAsync();
|
||||
}
|
||||
}
|
||||
@functions {
|
||||
public async Task CallBack(int count)
|
||||
{
|
||||
countnot = count;
|
||||
}
|
||||
public async Task ShowNotifications()
|
||||
{
|
||||
|
||||
// dashBoard = await fv.GetDashBoard();
|
||||
var parameters = new Dictionary<string, object>();
|
||||
parameters.Add("items", dashBoard?.Notifications);
|
||||
parameters.Add("OnMultipleOfThree", EventCallback.Factory.Create<int>(this, CallBack));
|
||||
await modal.ShowAsync<Front.CUSComponent.Notifications>(title: "اطلاعیه ها", parameters: parameters);
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user