#478 contribs page
This commit is contained in:
parent
2f2c7ec25c
commit
d40f06ad9b
@ -192,7 +192,7 @@ namespace GanjooRazor.Pages
|
||||
|
||||
public async Task<ActionResult> OnGetGroupedByUsersAsync(string dataType, int pageNumber)
|
||||
{
|
||||
var responseUsers = await _httpClient.GetAsync($"{APIRoot.Url}/api/contributions/{dataType}/by/user?PageNumber=1&PageSize=30");
|
||||
var responseUsers = await _httpClient.GetAsync($"{APIRoot.Url}/api/contributions/{dataType}/by/user?PageNumber={pageNumber}&PageSize=30");
|
||||
|
||||
if (!responseUsers.IsSuccessStatusCode)
|
||||
{
|
||||
|
||||
@ -25,38 +25,39 @@
|
||||
<button class="btn btn-primary" disabled>صفحهٔ بعد</button>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<table class="stats" id="grouped-by-date">
|
||||
<thead>
|
||||
<tr class="h">
|
||||
<td class="c1">ردیف</td>
|
||||
<td class="c2">تاریخ</td>
|
||||
<td class="c3">تعداد</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@for (int i = 0; i < Model.Days.Length; i++)
|
||||
{
|
||||
@if (i % 2 == 0)
|
||||
<table class="stats" id="grouped-by-date">
|
||||
<thead>
|
||||
<tr class="h">
|
||||
<td class="c1">ردیف</td>
|
||||
<td class="c2">تاریخ</td>
|
||||
<td class="c3">تعداد</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@for (int i = 0; i < Model.Days.Length; i++)
|
||||
{
|
||||
<tr class="e">
|
||||
<td class="c1">@((((Model.DaysPagination.currentPage - 1) * Model.DaysPagination.pageSize) + i + 1).ToPersianNumbers())</td>
|
||||
<td class="c2">@RMuseum.Services.Implementation.LanguageUtils.FormatInShortDate(DateTime.Parse(Model.Days[i].Date))</td>
|
||||
<td class="c3">@RMuseum.Services.Implementation.LanguageUtils.FormatMoney(Model.Days[i].Number)</td>
|
||||
</tr>
|
||||
@if (i % 2 == 0)
|
||||
{
|
||||
<tr class="e">
|
||||
<td class="c1">@((((Model.DaysPagination.currentPage - 1) * Model.DaysPagination.pageSize) + i + 1).ToPersianNumbers())</td>
|
||||
<td class="c2">@RMuseum.Services.Implementation.LanguageUtils.FormatInShortDate(DateTime.Parse(Model.Days[i].Date))</td>
|
||||
<td class="c3">@RMuseum.Services.Implementation.LanguageUtils.FormatMoney(Model.Days[i].Number)</td>
|
||||
</tr>
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
<tr>
|
||||
<td class="c1">@((((Model.DaysPagination.currentPage - 1) * Model.DaysPagination.pageSize) + i + 1).ToPersianNumbers())</td>
|
||||
<td class="c2">@RMuseum.Services.Implementation.LanguageUtils.FormatInShortDate(DateTime.Parse(Model.Days[i].Date))</td>
|
||||
<td class="c3">@RMuseum.Services.Implementation.LanguageUtils.FormatMoney(Model.Days[i].Number)</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<tr>
|
||||
<td class="c1">@((((Model.DaysPagination.currentPage - 1) * Model.DaysPagination.pageSize) + i + 1).ToPersianNumbers())</td>
|
||||
<td class="c2">@RMuseum.Services.Implementation.LanguageUtils.FormatInShortDate(DateTime.Parse(Model.Days[i].Date))</td>
|
||||
<td class="c3">@RMuseum.Services.Implementation.LanguageUtils.FormatMoney(Model.Days[i].Number)</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -96,7 +97,7 @@
|
||||
@if (i % 2 == 0)
|
||||
{
|
||||
<tr class="e">
|
||||
<td class="c1">@((i + 1).ToPersianNumbers())</td>
|
||||
<td class="c1">@((((Model.UsersPagination.currentPage - 1) * Model.UsersPagination.pageSize) + i + 1).ToPersianNumbers())</td>
|
||||
<td class="c2"><a href="/hashieha/?userid=@Model.Users[i].UserId">@Model.Users[i].UserName</a></td>
|
||||
<td class="c3">@RMuseum.Services.Implementation.LanguageUtils.FormatMoney(Model.Users[i].Number)</td>
|
||||
</tr>
|
||||
@ -105,7 +106,7 @@
|
||||
else
|
||||
{
|
||||
<tr>
|
||||
<td class="c1">@((i + 1).ToPersianNumbers())</td>
|
||||
<td class="c1">@((((Model.UsersPagination.currentPage - 1) * Model.UsersPagination.pageSize) + i + 1).ToPersianNumbers())</td>
|
||||
<td class="c2"><a href="/hashieha/?userid=@Model.Users[i].UserId">@Model.Users[i].UserName</a></td>
|
||||
<td class="c3">@RMuseum.Services.Implementation.LanguageUtils.FormatMoney(Model.Users[i].Number)</td>
|
||||
</tr>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user