load dashboard
This commit is contained in:
@@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Service">
|
<Reference Include="Service">
|
||||||
<HintPath>..\..\Dlls\Service.dll</HintPath>
|
<HintPath>..\..\..\LocalGit\TaxPayerTools\Service\bin\Debug\Service.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
@@ -81,7 +81,7 @@ namespace Front
|
|||||||
|
|
||||||
return InfoCompany;
|
return InfoCompany;
|
||||||
}
|
}
|
||||||
public async Task<DashBoardDTO?> GetDashBoard(bool run = false)
|
public async Task LoadDashBoard(bool run = false)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (dashBoard == null || run)
|
if (dashBoard == null || run)
|
||||||
@@ -94,7 +94,6 @@ namespace Front
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return dashBoard;
|
|
||||||
}
|
}
|
||||||
public async Task<List<IdName<int>>> GetUnits()
|
public async Task<List<IdName<int>>> GetUnits()
|
||||||
{
|
{
|
||||||
|
@@ -173,9 +173,9 @@
|
|||||||
<footer class="content-footer footer bg-footer-theme">
|
<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="container-xxl d-flex flex-wrap justify-content-between py-2 flex-md-row flex-column">
|
||||||
<div class="mb-2 mb-md-0">
|
<div class="mb-2 mb-md-0">
|
||||||
@if (@dashBoard!=null)
|
@if (@fv.dashBoard != null)
|
||||||
{
|
{
|
||||||
<span>آخرین ورود : @dashBoard?.LastLoginDate</span>
|
<span>آخرین ورود : @fv.dashBoard?.LastLoginDate</span>
|
||||||
}
|
}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -200,7 +200,7 @@
|
|||||||
@code {
|
@code {
|
||||||
public int countnot = 0;
|
public int countnot = 0;
|
||||||
private Modal modal = default!;
|
private Modal modal = default!;
|
||||||
public DashBoardDTO? dashBoard { get; set; }
|
// public DashBoardDTO? dashBoard { get; set; }
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
await fv.SetUlr("Panel");
|
await fv.SetUlr("Panel");
|
||||||
@@ -208,9 +208,9 @@
|
|||||||
if (!await localserv.OnlineUser())
|
if (!await localserv.OnlineUser())
|
||||||
nav.NavigateTo("/");
|
nav.NavigateTo("/");
|
||||||
|
|
||||||
dashBoard = await fv.GetDashBoard();
|
await fv.LoadDashBoard();
|
||||||
if (dashBoard != null)
|
if (fv.dashBoard != null)
|
||||||
countnot = dashBoard.Notifications.Count();
|
countnot = fv.dashBoard.Notifications.Count();
|
||||||
await base.OnInitializedAsync();
|
await base.OnInitializedAsync();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -223,7 +223,7 @@
|
|||||||
{
|
{
|
||||||
// dashBoard = await fv.GetDashBoard();
|
// dashBoard = await fv.GetDashBoard();
|
||||||
var parameters = new Dictionary<string, object>();
|
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));
|
parameters.Add("OnMultipleOfThree", EventCallback.Factory.Create<int>(this, CallBack));
|
||||||
await modal.ShowAsync<Front.CUSComponent.Notifications>(title: "اطلاعیه ها", parameters: parameters);
|
await modal.ShowAsync<Front.CUSComponent.Notifications>(title: "اطلاعیه ها", parameters: parameters);
|
||||||
|
|
||||||
|
@@ -179,7 +179,11 @@
|
|||||||
if (result.Action == ComponentAction.add)
|
if (result.Action == ComponentAction.add)
|
||||||
{
|
{
|
||||||
if (result.Status == ComponentStatus.success)
|
if (result.Status == ComponentStatus.success)
|
||||||
|
{
|
||||||
ShowSuccessAlert("سفارش پرداخت شد");
|
ShowSuccessAlert("سفارش پرداخت شد");
|
||||||
|
await fv.LoadDashBoard(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (result.Action == ComponentAction.delete)
|
else if (result.Action == ComponentAction.delete)
|
||||||
|
@@ -32,7 +32,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-2 mb-1 order-0">
|
<div class="col-lg-2 mb-1 order-0">
|
||||||
@if (dashBoard != null)
|
@if (fv.dashBoard != null)
|
||||||
{
|
{
|
||||||
<div class="col-12 mb-4">
|
<div class="col-12 mb-4">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
@@ -44,24 +44,25 @@
|
|||||||
<h5 class="text-nowrap mb-2">گزارش فروش</h5>
|
<h5 class="text-nowrap mb-2">گزارش فروش</h5>
|
||||||
<span class="badge bg-label-warning rounded-pill">این ماه</span>
|
<span class="badge bg-label-warning rounded-pill">این ماه</span>
|
||||||
</div>
|
</div>
|
||||||
@if (dashBoard != null && dashBoard.SaleInMonth.HasValue)
|
@if (fv.dashBoard != null && fv.dashBoard.SaleInMonth.HasValue)
|
||||||
{
|
{
|
||||||
<div class="mt-sm-auto">
|
<div class="mt-sm-auto">
|
||||||
@if (dashBoard.Salepercent.HasValue && dashBoard.Salepercent.Value>0)
|
@if (fv.dashBoard.Salepercent.HasValue && fv.dashBoard.Salepercent.Value > 0)
|
||||||
{
|
{
|
||||||
if (dashBoard.Salepercent.Value>=100)
|
if (fv.dashBoard.Salepercent.Value >= 100)
|
||||||
{
|
{
|
||||||
<small class="text-success text-nowrap fw-semibold"><i class='bx bx-chevron-up'></i> @dashBoard.Salepercent %</small>
|
<small class="text-success text-nowrap fw-semibold"><i class='bx bx-chevron-up'></i> @fv.dashBoard.Salepercent %</small>
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<small class="text-danger text-nowrap fw-semibold"><i class='bx bx-chevron-down'></i> @dashBoard.Salepercent %</small>
|
<small class="text-danger text-nowrap fw-semibold"><i class='bx bx-chevron-down'></i> @fv.dashBoard.Salepercent %</small>
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
<h6 class="mb-0">@dashBoard?.SaleInMonth.Value.ToString("N0")
|
<h6 class="mb-0">
|
||||||
|
@fv.dashBoard?.SaleInMonth.Value.ToString("N0")
|
||||||
<span style="font-size: 10px"> ریال</span>
|
<span style="font-size: 10px"> ریال</span>
|
||||||
</h6>
|
</h6>
|
||||||
</div>
|
</div>
|
||||||
@@ -77,7 +78,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-lg-4 col-md-4 order-1">
|
<div class="col-lg-4 col-md-4 order-1">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@if (dashBoard != null && dashBoard.AlistofServices.Any(w => w.PermissionID == 3))
|
@if (fv.dashBoard != null && fv.dashBoard.AlistofServices.Any(w => w.PermissionID == 3))
|
||||||
{
|
{
|
||||||
|
|
||||||
<div class="col-lg-6 col-md-12 col-6 mb-4">
|
<div class="col-lg-6 col-md-12 col-6 mb-4">
|
||||||
@@ -97,28 +98,28 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<span class="fw-semibold d-block">صورتحساب <br /> (کل @dashBoard.AlistofServices.Where(w => w.PermissionID == 3 && w.CalTypeID == 1).Select(s => s.Total).First())</span>
|
<span class="fw-semibold d-block">صورتحساب <br /> (کل @fv.dashBoard.AlistofServices.Where(w => w.PermissionID == 3 && w.CalTypeID == 1).Select(s => s.Total).First())</span>
|
||||||
<h3 class="card-title mb-1"><span style="font-size: 14px">مانده</span></h3>
|
<h3 class="card-title mb-1"><span style="font-size: 14px">مانده</span></h3>
|
||||||
@if (dashBoard.AlistofServices.Any(w => w.PermissionID == 3 && w.CalTypeID == 1))
|
@if (fv.dashBoard.AlistofServices.Any(w => w.PermissionID == 3 && w.CalTypeID == 1))
|
||||||
{
|
{
|
||||||
@if (dashBoard.AlistofServices.Where(w => w.PermissionID == 3 && w.CalTypeID == 1).Select(s => s.Remaining).First() > 0)
|
@if (fv.dashBoard.AlistofServices.Where(w => w.PermissionID == 3 && w.CalTypeID == 1).Select(s => s.Remaining).First() > 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
<small class="text-success fw-semibold">
|
<small class="text-success fw-semibold">
|
||||||
<i class='bx'></i>
|
<i class='bx'></i>
|
||||||
@dashBoard.AlistofServices.Where(w => w.PermissionID == 3 && w.CalTypeID == 1).Select(s => s.Remaining).First() آیتم
|
@fv.dashBoard.AlistofServices.Where(w => w.PermissionID == 3 && w.CalTypeID == 1).Select(s => s.Remaining).First() آیتم
|
||||||
</small>
|
</small>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<small class="text-danger fw-semibold">
|
<small class="text-danger fw-semibold">
|
||||||
<i class='bx'></i>
|
<i class='bx'></i>
|
||||||
@dashBoard.AlistofServices.Where(w => w.PermissionID == 3 && w.CalTypeID == 1).Select(s => s.Remaining).First() آیتم
|
@fv.dashBoard.AlistofServices.Where(w => w.PermissionID == 3 && w.CalTypeID == 1).Select(s => s.Remaining).First() آیتم
|
||||||
</small>
|
</small>
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (dashBoard.AlistofServices.Any(w => w.PermissionID == 3 && w.CalTypeID == 2))
|
else if (fv.dashBoard.AlistofServices.Any(w => w.PermissionID == 3 && w.CalTypeID == 2))
|
||||||
{
|
{
|
||||||
<small class="text-success fw-semibold">
|
<small class="text-success fw-semibold">
|
||||||
<i class='bx'></i>
|
<i class='bx'></i>
|
||||||
@@ -128,18 +129,18 @@
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@if (Convert.ToInt32(dashBoard.Datenow) <= dashBoard.AlistofServices.Where(w => w.PermissionID == 3 && w.CalTypeID == 1).Select(s => s.Remaining).First())
|
@if (Convert.ToInt32(fv.dashBoard.Datenow) <= fv.dashBoard.AlistofServices.Where(w => w.PermissionID == 3 && w.CalTypeID == 1).Select(s => s.Remaining).First())
|
||||||
{
|
{
|
||||||
<small class="text-success fw-semibold">
|
<small class="text-success fw-semibold">
|
||||||
<i class='bx'></i>
|
<i class='bx'></i>
|
||||||
تا تاریخ @dashBoard.AlistofServices.Where(w => w.PermissionID == 3 && w.CalTypeID == 1).Select(s => s.Remaining).First().ToString().ShamciToFormatShamciinFront()
|
تا تاریخ @fv.dashBoard.AlistofServices.Where(w => w.PermissionID == 3 && w.CalTypeID == 1).Select(s => s.Remaining).First().ToString().ShamciToFormatShamciinFront()
|
||||||
</small>
|
</small>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<small class="text-danger fw-semibold">
|
<small class="text-danger fw-semibold">
|
||||||
<i class='bx'></i>
|
<i class='bx'></i>
|
||||||
تا تاریخ @dashBoard.AlistofServices.Where(w => w.PermissionID == 3 && w.CalTypeID == 1).Select(s => s.Remaining).First().ToString().ShamciToFormatShamciinFront()
|
تا تاریخ @fv.dashBoard.AlistofServices.Where(w => w.PermissionID == 3 && w.CalTypeID == 1).Select(s => s.Remaining).First().ToString().ShamciToFormatShamciinFront()
|
||||||
</small>
|
</small>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -147,7 +148,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
@if (dashBoard != null && dashBoard.AlistofServices.Any(w => w.PermissionID == 4))
|
@if (fv.dashBoard != null && fv.dashBoard.AlistofServices.Any(w => w.PermissionID == 4))
|
||||||
{
|
{
|
||||||
<div class="col-lg-6 col-md-12 col-6 mb-4">
|
<div class="col-lg-6 col-md-12 col-6 mb-4">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
@@ -166,27 +167,27 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<span class="fw-semibold d-block">کالا <br /> (کل @dashBoard.AlistofServices.Where(w => w.PermissionID == 4 && w.CalTypeID == 1).Select(s => s.Total).First())</span>
|
<span class="fw-semibold d-block">کالا <br /> (کل @fv.dashBoard.AlistofServices.Where(w => w.PermissionID == 4 && w.CalTypeID == 1).Select(s => s.Total).First())</span>
|
||||||
<h3 class="card-title mb-1"><span style="font-size: 14px">مانده</span></h3>
|
<h3 class="card-title mb-1"><span style="font-size: 14px">مانده</span></h3>
|
||||||
@if (dashBoard.AlistofServices.Any(w => w.PermissionID == 4 && w.CalTypeID == 1))
|
@if (fv.dashBoard.AlistofServices.Any(w => w.PermissionID == 4 && w.CalTypeID == 1))
|
||||||
{
|
{
|
||||||
@if (dashBoard.AlistofServices.Where(w => w.PermissionID == 4 && w.CalTypeID == 1).Select(s => s.Remaining).First() > 0)
|
@if (fv.dashBoard.AlistofServices.Where(w => w.PermissionID == 4 && w.CalTypeID == 1).Select(s => s.Remaining).First() > 0)
|
||||||
{
|
{
|
||||||
<small class="text-success fw-semibold">
|
<small class="text-success fw-semibold">
|
||||||
<i class='bx'></i>
|
<i class='bx'></i>
|
||||||
@dashBoard.AlistofServices.Where(w => w.PermissionID == 4 && w.CalTypeID == 1).Select(s => s.Remaining).First() آیتم
|
@fv.dashBoard.AlistofServices.Where(w => w.PermissionID == 4 && w.CalTypeID == 1).Select(s => s.Remaining).First() آیتم
|
||||||
</small>
|
</small>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<small class="text-danger fw-semibold">
|
<small class="text-danger fw-semibold">
|
||||||
<i class='bx'></i>
|
<i class='bx'></i>
|
||||||
@dashBoard.AlistofServices.Where(w => w.PermissionID == 4 && w.CalTypeID == 1).Select(s => s.Remaining).First() آیتم
|
@fv.dashBoard.AlistofServices.Where(w => w.PermissionID == 4 && w.CalTypeID == 1).Select(s => s.Remaining).First() آیتم
|
||||||
</small>
|
</small>
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (dashBoard.AlistofServices.Any(w => w.PermissionID == 4 && w.CalTypeID == 2))
|
else if (fv.dashBoard.AlistofServices.Any(w => w.PermissionID == 4 && w.CalTypeID == 2))
|
||||||
{
|
{
|
||||||
<small class="text-success fw-semibold">
|
<small class="text-success fw-semibold">
|
||||||
<i class='bx'></i>
|
<i class='bx'></i>
|
||||||
@@ -196,18 +197,18 @@
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@if (Convert.ToInt32(dashBoard.Datenow) <= dashBoard.AlistofServices.Where(w => w.PermissionID == 4 && w.CalTypeID == 1).Select(s => s.Remaining).First())
|
@if (Convert.ToInt32(fv.dashBoard.Datenow) <= fv.dashBoard.AlistofServices.Where(w => w.PermissionID == 4 && w.CalTypeID == 1).Select(s => s.Remaining).First())
|
||||||
{
|
{
|
||||||
<small class="text-success fw-semibold">
|
<small class="text-success fw-semibold">
|
||||||
<i class='bx'></i>
|
<i class='bx'></i>
|
||||||
تا تاریخ @dashBoard.AlistofServices.Where(w => w.PermissionID == 4 && w.CalTypeID == 1).Select(s => s.Remaining).First().ToString().ShamciToFormatShamciinFront()
|
تا تاریخ @fv.dashBoard.AlistofServices.Where(w => w.PermissionID == 4 && w.CalTypeID == 1).Select(s => s.Remaining).First().ToString().ShamciToFormatShamciinFront()
|
||||||
</small>
|
</small>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<small class="text-danger fw-semibold">
|
<small class="text-danger fw-semibold">
|
||||||
<i class='bx'></i>
|
<i class='bx'></i>
|
||||||
تا تاریخ @dashBoard.AlistofServices.Where(w => w.PermissionID == 4 && w.CalTypeID == 1).Select(s => s.Remaining).First().ToString().ShamciToFormatShamciinFront()
|
تا تاریخ @fv.dashBoard.AlistofServices.Where(w => w.PermissionID == 4 && w.CalTypeID == 1).Select(s => s.Remaining).First().ToString().ShamciToFormatShamciinFront()
|
||||||
</small>
|
</small>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -221,10 +222,10 @@
|
|||||||
<div class="col-12 col-lg-8 order-2 order-md-3 order-lg-2 mb-4">
|
<div class="col-12 col-lg-8 order-2 order-md-3 order-lg-2 mb-4">
|
||||||
<div class="card col-12">
|
<div class="card col-12">
|
||||||
<div class="row row-bordered g-0">
|
<div class="row row-bordered g-0">
|
||||||
@if (dashBoard != null)
|
@if (fv.dashBoard != null)
|
||||||
{
|
{
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<SaleChart items="dashBoard?.ForSaleChart" />
|
<SaleChart items="fv.dashBoard?.ForSaleChart" />
|
||||||
</div>}
|
</div>}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -232,7 +233,7 @@
|
|||||||
<!--/ Total Revenue -->
|
<!--/ Total Revenue -->
|
||||||
<div class="col-12 col-md-8 col-lg-4 order-3 order-md-2">
|
<div class="col-12 col-md-8 col-lg-4 order-3 order-md-2">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@if (dashBoard != null && dashBoard.AlistofServices.Any(w => w.PermissionID == 5))
|
@if (fv.dashBoard != null && fv.dashBoard.AlistofServices.Any(w => w.PermissionID == 5))
|
||||||
{
|
{
|
||||||
<div class="col-6 mb-4">
|
<div class="col-6 mb-4">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
@@ -251,28 +252,28 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<span class="fw-semibold d-block">مشتری <br /> (کل @dashBoard.AlistofServices.Where(w => w.PermissionID == 5 && w.CalTypeID == 1).Select(s => s.Total).First())</span>
|
<span class="fw-semibold d-block">مشتری <br /> (کل @fv.dashBoard.AlistofServices.Where(w => w.PermissionID == 5 && w.CalTypeID == 1).Select(s => s.Total).First())</span>
|
||||||
<h3 class="card-title mb-1"><span style="font-size: 14px">مانده</span></h3>
|
<h3 class="card-title mb-1"><span style="font-size: 14px">مانده</span></h3>
|
||||||
@if (dashBoard.AlistofServices.Any(w => w.PermissionID == 5 && w.CalTypeID == 1))
|
@if (fv.dashBoard.AlistofServices.Any(w => w.PermissionID == 5 && w.CalTypeID == 1))
|
||||||
{
|
{
|
||||||
@if (dashBoard.AlistofServices.Where(w => w.PermissionID == 5 && w.CalTypeID == 1).Select(s => s.Remaining).First() > 0)
|
@if (fv.dashBoard.AlistofServices.Where(w => w.PermissionID == 5 && w.CalTypeID == 1).Select(s => s.Remaining).First() > 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
<small class="text-success fw-semibold">
|
<small class="text-success fw-semibold">
|
||||||
<i class='bx'></i>
|
<i class='bx'></i>
|
||||||
@dashBoard.AlistofServices.Where(w => w.PermissionID == 5 && w.CalTypeID == 1).Select(s => s.Remaining).First() آیتم
|
@fv.dashBoard.AlistofServices.Where(w => w.PermissionID == 5 && w.CalTypeID == 1).Select(s => s.Remaining).First() آیتم
|
||||||
</small>
|
</small>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<small class="text-danger fw-semibold">
|
<small class="text-danger fw-semibold">
|
||||||
<i class='bx'></i>
|
<i class='bx'></i>
|
||||||
@dashBoard.AlistofServices.Where(w => w.PermissionID == 5 && w.CalTypeID == 1).Select(s => s.Remaining).First() آیتم
|
@fv.dashBoard.AlistofServices.Where(w => w.PermissionID == 5 && w.CalTypeID == 1).Select(s => s.Remaining).First() آیتم
|
||||||
</small>
|
</small>
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (dashBoard.AlistofServices.Any(w => w.PermissionID == 5 && w.CalTypeID == 2))
|
else if (fv.dashBoard.AlistofServices.Any(w => w.PermissionID == 5 && w.CalTypeID == 2))
|
||||||
{
|
{
|
||||||
<small class="text-success fw-semibold">
|
<small class="text-success fw-semibold">
|
||||||
<i class='bx'></i>
|
<i class='bx'></i>
|
||||||
@@ -282,18 +283,18 @@
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@if (Convert.ToInt32(dashBoard.Datenow) <= dashBoard.AlistofServices.Where(w => w.PermissionID == 5 && w.CalTypeID == 1).Select(s => s.Remaining).First())
|
@if (Convert.ToInt32(fv.dashBoard.Datenow) <= fv.dashBoard.AlistofServices.Where(w => w.PermissionID == 5 && w.CalTypeID == 1).Select(s => s.Remaining).First())
|
||||||
{
|
{
|
||||||
<small class="text-success fw-semibold">
|
<small class="text-success fw-semibold">
|
||||||
<i class='bx'></i>
|
<i class='bx'></i>
|
||||||
تا تاریخ @dashBoard.AlistofServices.Where(w => w.PermissionID == 5 && w.CalTypeID == 1).Select(s => s.Remaining).First().ToString().ShamciToFormatShamciinFront()
|
تا تاریخ @fv.dashBoard.AlistofServices.Where(w => w.PermissionID == 5 && w.CalTypeID == 1).Select(s => s.Remaining).First().ToString().ShamciToFormatShamciinFront()
|
||||||
</small>
|
</small>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<small class="text-danger fw-semibold">
|
<small class="text-danger fw-semibold">
|
||||||
<i class='bx'></i>
|
<i class='bx'></i>
|
||||||
تا تاریخ @dashBoard.AlistofServices.Where(w => w.PermissionID == 5 && w.CalTypeID == 1).Select(s => s.Remaining).First().ToString().ShamciToFormatShamciinFront()
|
تا تاریخ @fv.dashBoard.AlistofServices.Where(w => w.PermissionID == 5 && w.CalTypeID == 1).Select(s => s.Remaining).First().ToString().ShamciToFormatShamciinFront()
|
||||||
</small>
|
</small>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -301,7 +302,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
@if (dashBoard != null && dashBoard.AlistofServices.Any(w => w.PermissionID == 16))
|
@if (fv.dashBoard != null && fv.dashBoard.AlistofServices.Any(w => w.PermissionID == 16))
|
||||||
{
|
{
|
||||||
<div class="col-6 mb-4">
|
<div class="col-6 mb-4">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
@@ -320,27 +321,27 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<span class="fw-semibold d-block">سامانه مودیان <br /> (کل @dashBoard.AlistofServices.Where(w => w.PermissionID == 16 && w.CalTypeID == 1).Select(s => s.Total).First())</span>
|
<span class="fw-semibold d-block">سامانه مودیان <br /> (کل @fv.dashBoard.AlistofServices.Where(w => w.PermissionID == 16 && w.CalTypeID == 1).Select(s => s.Total).First())</span>
|
||||||
<h3 class="card-title mb-1"><span style="font-size: 14px">مانده</span></h3>
|
<h3 class="card-title mb-1"><span style="font-size: 14px">مانده</span></h3>
|
||||||
@if (dashBoard.AlistofServices.Any(w => w.PermissionID == 16 && w.CalTypeID == 1))
|
@if (fv.dashBoard.AlistofServices.Any(w => w.PermissionID == 16 && w.CalTypeID == 1))
|
||||||
{
|
{
|
||||||
@if (dashBoard.AlistofServices.Where(w => w.PermissionID == 16 && w.CalTypeID == 1).Select(s => s.Remaining).First() > 0)
|
@if (fv.dashBoard.AlistofServices.Where(w => w.PermissionID == 16 && w.CalTypeID == 1).Select(s => s.Remaining).First() > 0)
|
||||||
{
|
{
|
||||||
<small class="text-success fw-semibold">
|
<small class="text-success fw-semibold">
|
||||||
<i class='bx'></i>
|
<i class='bx'></i>
|
||||||
@dashBoard.AlistofServices.Where(w => w.PermissionID == 16 && w.CalTypeID == 1).Select(s => s.Remaining).First() آیتم
|
@fv.dashBoard.AlistofServices.Where(w => w.PermissionID == 16 && w.CalTypeID == 1).Select(s => s.Remaining).First() آیتم
|
||||||
</small>
|
</small>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<small class="text-danger fw-semibold">
|
<small class="text-danger fw-semibold">
|
||||||
<i class='bx'></i>
|
<i class='bx'></i>
|
||||||
@dashBoard.AlistofServices.Where(w => w.PermissionID == 16 && w.CalTypeID == 1).Select(s => s.Remaining).First() آیتم
|
@fv.dashBoard.AlistofServices.Where(w => w.PermissionID == 16 && w.CalTypeID == 1).Select(s => s.Remaining).First() آیتم
|
||||||
</small>
|
</small>
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (dashBoard.AlistofServices.Any(w => w.PermissionID == 16 && w.CalTypeID == 2))
|
else if (fv.dashBoard.AlistofServices.Any(w => w.PermissionID == 16 && w.CalTypeID == 2))
|
||||||
{
|
{
|
||||||
<small class="text-success fw-semibold">
|
<small class="text-success fw-semibold">
|
||||||
<i class='bx'></i>
|
<i class='bx'></i>
|
||||||
@@ -350,18 +351,18 @@
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@if (Convert.ToInt32(dashBoard.Datenow) <= dashBoard.AlistofServices.Where(w => w.PermissionID == 16 && w.CalTypeID == 1).Select(s => s.Remaining).First())
|
@if (Convert.ToInt32(fv.dashBoard.Datenow) <= fv.dashBoard.AlistofServices.Where(w => w.PermissionID == 16 && w.CalTypeID == 1).Select(s => s.Remaining).First())
|
||||||
{
|
{
|
||||||
<small class="text-success fw-semibold">
|
<small class="text-success fw-semibold">
|
||||||
<i class='bx'></i>
|
<i class='bx'></i>
|
||||||
تا تاریخ @dashBoard.AlistofServices.Where(w => w.PermissionID == 16 && w.CalTypeID == 1).Select(s => s.Remaining).First().ToString().ShamciToFormatShamciinFront()
|
تا تاریخ @fv.dashBoard.AlistofServices.Where(w => w.PermissionID == 16 && w.CalTypeID == 1).Select(s => s.Remaining).First().ToString().ShamciToFormatShamciinFront()
|
||||||
</small>
|
</small>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<small class="text-danger fw-semibold">
|
<small class="text-danger fw-semibold">
|
||||||
<i class='bx'></i>
|
<i class='bx'></i>
|
||||||
تا تاریخ @dashBoard.AlistofServices.Where(w => w.PermissionID == 16 && w.CalTypeID == 1).Select(s => s.Remaining).First().ToString().ShamciToFormatShamciinFront()
|
تا تاریخ @fv.dashBoard.AlistofServices.Where(w => w.PermissionID == 16 && w.CalTypeID == 1).Select(s => s.Remaining).First().ToString().ShamciToFormatShamciinFront()
|
||||||
</small>
|
</small>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -377,27 +378,27 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@if (dashBoard == null)
|
@if (fv.dashBoard == null)
|
||||||
{
|
{
|
||||||
<p>در حال بارگذاری...</p>
|
<p>در حال بارگذاری...</p>
|
||||||
}
|
}
|
||||||
@if (dashBoard != null)
|
@if (fv.dashBoard != null)
|
||||||
{
|
{
|
||||||
<!-- Order Statistics -->
|
<!-- Order Statistics -->
|
||||||
<LastActivityServices dashBoard="dashBoard" />
|
<LastActivityServices dashBoard="fv.dashBoard" />
|
||||||
<!--/ Order Statistics -->
|
<!--/ Order Statistics -->
|
||||||
}
|
}
|
||||||
<!-- MostInvoicedCustomer -->
|
<!-- MostInvoicedCustomer -->
|
||||||
@if (dashBoard != null)
|
@if (fv.dashBoard != null)
|
||||||
{
|
{
|
||||||
<MostInvoicedCustomer model="dashBoard?.MostInvoicedCustomer" />
|
<MostInvoicedCustomer model="fv.dashBoard?.MostInvoicedCustomer" />
|
||||||
|
|
||||||
}
|
}
|
||||||
<!--/ MostInvoicedCustomer -->
|
<!--/ MostInvoicedCustomer -->
|
||||||
<!-- MostInvoicedProduct -->
|
<!-- MostInvoicedProduct -->
|
||||||
@if (dashBoard!=null)
|
@if (fv.dashBoard != null)
|
||||||
{
|
{
|
||||||
<MostInvoicedProduct model="dashBoard?.MostInvoicedProduct" />
|
<MostInvoicedProduct model="fv.dashBoard?.MostInvoicedProduct" />
|
||||||
|
|
||||||
}
|
}
|
||||||
<!--/ MostInvoicedProduct -->
|
<!--/ MostInvoicedProduct -->
|
||||||
@@ -408,15 +409,15 @@
|
|||||||
List<ToastMessage> messages = new List<ToastMessage>();
|
List<ToastMessage> messages = new List<ToastMessage>();
|
||||||
private Modal modal = default!;
|
private Modal modal = default!;
|
||||||
private void ShowMessage(ToastType toastType, string Message) => messages.Add(CreateToastMessage(toastType, Message));
|
private void ShowMessage(ToastType toastType, string Message) => messages.Add(CreateToastMessage(toastType, Message));
|
||||||
public DashBoardDTO? dashBoard { get; set; }
|
// public DashBoardDTO? dashBoard { get; set; }
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!await localserv.OnlineUser())
|
if (!await localserv.OnlineUser())
|
||||||
nav.NavigateTo("/");
|
nav.NavigateTo("/");
|
||||||
dashBoard = await fv.GetDashBoard();
|
await fv.LoadDashBoard();
|
||||||
if (dashBoard != null)
|
if (fv.dashBoard != null)
|
||||||
foreach (var war in dashBoard.Warning)
|
foreach (var war in fv.dashBoard.Warning)
|
||||||
ShowMessage((ToastType)Enum.Parse(typeof(ToastType), war.Status.ToString()), war.Message);
|
ShowMessage((ToastType)Enum.Parse(typeof(ToastType), war.Status.ToString()), war.Message);
|
||||||
|
|
||||||
|
|
||||||
|
@@ -37,10 +37,10 @@ builder.Services.AddScoped(sp => new UserAuthenticationDTO()
|
|||||||
//builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("http://195.88.208.142:7075/api/") });
|
//builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("http://195.88.208.142:7075/api/") });
|
||||||
|
|
||||||
//Home
|
//Home
|
||||||
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("https://localhost:7075/api/") });
|
//builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("https://localhost:7075/api/") });
|
||||||
|
|
||||||
//farzan
|
//farzan
|
||||||
//builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("http://localhost:5271/api/") });
|
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("http://localhost:5271/api/") });
|
||||||
|
|
||||||
CultureInfo.DefaultThreadCurrentCulture = new CultureInfo("fa-Ir");
|
CultureInfo.DefaultThreadCurrentCulture = new CultureInfo("fa-Ir");
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user