panel
This commit is contained in:
@@ -1,6 +1,60 @@
|
||||
@using Shared.DTOs
|
||||
<h3>MostInvoicedProduct</h3>
|
||||
@using Front.Services
|
||||
@inject HttpClientController hc;
|
||||
@inject Fixedvalues fv;
|
||||
<Modal @ref="codmodal" />
|
||||
<div class="col-md-5 col-lg-3 order-2 mb-4">
|
||||
<div class="card h-100">
|
||||
<div class="card-header d-flex align-items-center justify-content-between">
|
||||
<h5 class="card-title m-0 me-2">کالا های فاکتور شده</h5>
|
||||
<span class="badge bg-label-warning rounded-pill">هفنه گدشته</span>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<ul class="p-0 m-0">
|
||||
|
||||
@foreach (var item in model)
|
||||
{
|
||||
if (indexer == 6)
|
||||
break;
|
||||
<li class="d-flex">
|
||||
<div class="d-flex w-100 flex-wrap align-items-center justify-content-between gap-2">
|
||||
<div class="me-2">
|
||||
|
||||
<button @onclick="()=>CODItem(item.ID)" type="button" class="btn btn-link">@item.Title</button>
|
||||
|
||||
</div>
|
||||
<div class="user-progress d-flex align-items-center gap-1"><h6 class="mb-0">@item.count.Value.ToString("N0")</h6> <span class="text-muted">عدد</span></div>
|
||||
</div>
|
||||
</li>
|
||||
indexer++;
|
||||
}
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@code {
|
||||
int indexer = 1;
|
||||
[Parameter] public List<IdNameByCount<int>>? model { get; set; }
|
||||
private Modal codmodal = default!;
|
||||
}
|
||||
@functions{
|
||||
public async Task CallBackCodItem(ActionInResultComponent result) { }
|
||||
public async Task CODItem(int ID)
|
||||
{
|
||||
var rsp = await hc.Get($"Cod/GetCod/{ID}");
|
||||
if (rsp.IsSuccessStatusCode)
|
||||
{
|
||||
var cod = await rsp.Content.ReadFromJsonAsync<RCOD>();
|
||||
var parameters = new Dictionary<string, object>();
|
||||
var Unitrequest = await fv.GetUnits();
|
||||
parameters.Add("Cod", cod);
|
||||
parameters.Add("Unitrequest", Unitrequest);
|
||||
parameters.Add("OnMultipleOfThree", EventCallback.Factory.Create<ActionInResultComponent>(this, CallBackCodItem));
|
||||
await codmodal.ShowAsync<CUSComponent.CodItem>(title: "ویرایش اطلاعات", parameters: parameters);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user