9cff87fe85
Remove project bookkeeping citations from shipped code comments across the solution: hyphenated task IDs (WP-14, StoreAndForward-025), milestone/task/ issue refs (M3, Task 4, Audit Log #23, #21), Bundle X task-bundle labels, and C/D/K/S/T phase labels. Comment text only — no code logic, string/log literals, or XML-doc structure changed. Genuine descriptions are preserved (only the citation is stripped), and technical lookalikes are retained (UTF-8, SHA-256, T00:00:00, M365, UTC-5, pre-C4/pre-C5 schema versions). Flagged by the new CommentChecker TaskReferenceInComment / TrackingReferenceInComment checks plus targeted grep passes; full solution builds clean, append-only guard tests pass.
54 lines
1.7 KiB
Plaintext
54 lines
1.7 KiB
Plaintext
@namespace ZB.MOM.WW.ScadaBridge.CentralUI.Components.Shared
|
|
|
|
@* Reusable offset-pagination bar. Purely presentational: the host page
|
|
owns page-number state, query execution, and the HasNextPage decision.
|
|
Parameters: Page, PageChanged, HasNextPage, TotalCount, PageSize, Disabled. *@
|
|
|
|
<div class="d-flex align-items-center gap-2">
|
|
<button class="btn btn-outline-secondary btn-sm"
|
|
data-test="pager-prev"
|
|
disabled="@(!HasPrev || Disabled)"
|
|
@onclick="OnPrevAsync">
|
|
Previous
|
|
</button>
|
|
|
|
<span data-test="pager-summary">@SummaryText</span>
|
|
|
|
<button class="btn btn-outline-secondary btn-sm"
|
|
data-test="pager-next"
|
|
disabled="@(!HasNextPage || Disabled)"
|
|
@onclick="OnNextAsync">
|
|
Next
|
|
</button>
|
|
</div>
|
|
|
|
@code {
|
|
[Parameter] public int Page { get; set; } = 1;
|
|
[Parameter] public EventCallback<int> PageChanged { get; set; }
|
|
[Parameter] public bool HasNextPage { get; set; }
|
|
[Parameter] public int? TotalCount { get; set; }
|
|
[Parameter] public int PageSize { get; set; }
|
|
[Parameter] public bool Disabled { get; set; }
|
|
|
|
private bool HasPrev => Page > 1;
|
|
|
|
private int? PageCount =>
|
|
TotalCount is { } t && PageSize > 0
|
|
? (int)Math.Ceiling(t / (double)PageSize)
|
|
: (int?)null;
|
|
|
|
private string SummaryText
|
|
{
|
|
get
|
|
{
|
|
var text = $"Page {Page}";
|
|
if (PageCount is { } pc) text += $" of {pc}";
|
|
if (TotalCount is { } total) text += $" · {total} total";
|
|
return text;
|
|
}
|
|
}
|
|
|
|
private Task OnPrevAsync() => PageChanged.InvokeAsync(Page - 1);
|
|
private Task OnNextAsync() => PageChanged.InvokeAsync(Page + 1);
|
|
}
|