feat(dashboard, i18n): enhance result batch queue management and translations

Added new translations for "resultBatchQueueScope", "batchPendingDraws", and "batchCurrentDrawPending" in English, Nepali, and Chinese language files. Updated the dashboard console to manage the result batch queue, including a new component for displaying pending review totals and related draw counts. This improves the user interface for monitoring batch statuses and enhances multi-language support.
This commit is contained in:
2026-06-01 16:01:32 +08:00
parent bdd2d03ab6
commit 2716591164
6 changed files with 102 additions and 12 deletions

View File

@@ -44,6 +44,7 @@ import type { AdminDrawFinanceSummaryData } from "@/types/api/admin-draw-finance
import type { AdminRiskPoolRow } from "@/types/api/admin-risk";
import type {
AdminDashboardDrawPanel,
AdminDashboardResultBatchQueue,
AdminDashboardSoldOutBuckets,
} from "@/types/api/admin-dashboard";
@@ -973,6 +974,52 @@ export function ResultBatchProgress({
);
}
export function ResultBatchQueueSummary({
queue,
currentDrawPending,
compact = false,
}: {
queue: AdminDashboardResultBatchQueue;
currentDrawPending: number;
compact?: boolean;
}): ReactElement {
const { t } = useTranslation("dashboard");
const { pending_review_total, pending_draw_count } = queue;
return (
<div className="grid grid-cols-3 gap-2 text-center">
<div className="rounded-lg bg-amber-500/8 px-2 py-2 ring-1 ring-amber-500/15">
<p
className={cn(
"font-bold tabular-nums text-amber-700 dark:text-amber-400",
compact ? "text-lg" : "text-2xl",
)}
>
{pending_review_total}
</p>
<p className="mt-0.5 text-[10px] text-muted-foreground">{t("batchPending")}</p>
</div>
<div className="rounded-lg bg-sky-500/8 px-2 py-2 ring-1 ring-sky-500/15">
<p
className={cn(
"font-bold tabular-nums text-sky-800 dark:text-sky-300",
compact ? "text-lg" : "text-2xl",
)}
>
{pending_draw_count}
</p>
<p className="mt-0.5 text-[10px] text-muted-foreground">{t("batchPendingDraws")}</p>
</div>
<div className="rounded-lg bg-muted/50 px-2 py-2 ring-1 ring-border/60">
<p className={cn("font-bold tabular-nums text-foreground", compact ? "text-lg" : "text-2xl")}>
{currentDrawPending}
</p>
<p className="mt-0.5 text-[10px] text-muted-foreground">{t("batchCurrentDrawPending")}</p>
</div>
</div>
);
}
export function SettlementStatusChart({
finance,
}: {