load dashboard

This commit is contained in:
mmrbnjd
2024-07-30 12:14:36 +03:30
parent a1a6076035
commit ca8a35a68e
6 changed files with 77 additions and 73 deletions

View File

@@ -173,9 +173,9 @@
<footer class="content-footer footer bg-footer-theme">
<div class="container-xxl d-flex flex-wrap justify-content-between py-2 flex-md-row flex-column">
<div class="mb-2 mb-md-0">
@if (@dashBoard!=null)
@if (@fv.dashBoard != null)
{
<span>آخرین ورود : @dashBoard?.LastLoginDate</span>
<span>آخرین ورود : @fv.dashBoard?.LastLoginDate</span>
}
</div>
@@ -200,7 +200,7 @@
@code {
public int countnot = 0;
private Modal modal = default!;
public DashBoardDTO? dashBoard { get; set; }
// public DashBoardDTO? dashBoard { get; set; }
protected override async Task OnInitializedAsync()
{
await fv.SetUlr("Panel");
@@ -208,9 +208,9 @@
if (!await localserv.OnlineUser())
nav.NavigateTo("/");
dashBoard = await fv.GetDashBoard();
if (dashBoard != null)
countnot = dashBoard.Notifications.Count();
await fv.LoadDashBoard();
if (fv.dashBoard != null)
countnot = fv.dashBoard.Notifications.Count();
await base.OnInitializedAsync();
}
}
@@ -223,7 +223,7 @@
{
// dashBoard = await fv.GetDashBoard();
var parameters = new Dictionary<string, object>();
parameters.Add("items", dashBoard?.Notifications);
parameters.Add("items", fv.dashBoard?.Notifications);
parameters.Add("OnMultipleOfThree", EventCallback.Factory.Create<int>(this, CallBack));
await modal.ShowAsync<Front.CUSComponent.Notifications>(title: "اطلاعیه ها", parameters: parameters);