feat(ui): enhance table and admin components with improved layout and status display
- Updated global CSS to center-align table headers and cells, ensuring a consistent layout. - Modified admin table components to replace switches with status badges for better clarity. - Enhanced internationalization support by adding new strings for version actions and validation messages in multiple locales. - Refactored configuration document screens to include version selection and improved user feedback on status changes.
This commit is contained in:
@@ -338,8 +338,8 @@ export function SettlementBatchDetailsConsole({ batchId }: Props) {
|
||||
<TableHead>{t("playCode")}</TableHead>
|
||||
<TableHead>{t("player")}</TableHead>
|
||||
<TableHead>{t("matchedTier")}</TableHead>
|
||||
<TableHead className="text-right">{t("regularPayout")}</TableHead>
|
||||
<TableHead className="text-right">{t("jackpot")}</TableHead>
|
||||
<TableHead className="text-center">{t("regularPayout")}</TableHead>
|
||||
<TableHead className="text-center">{t("jackpot")}</TableHead>
|
||||
</TableRow>
|
||||
</TableHeader>
|
||||
<TableBody>
|
||||
@@ -351,10 +351,10 @@ export function SettlementBatchDetailsConsole({ batchId }: Props) {
|
||||
{r.player_username ?? r.site_player_id ?? r.player_id ?? "—"}
|
||||
</TableCell>
|
||||
<TableCell className="text-xs">{r.matched_prize_tier ?? "—"}</TableCell>
|
||||
<TableCell className="text-right font-mono text-xs tabular-nums">
|
||||
<TableCell className="text-center font-mono text-xs tabular-nums">
|
||||
{formatAdminMinorUnits(r.win_amount, r.currency_code ?? batchCurrency)}
|
||||
</TableCell>
|
||||
<TableCell className="text-right font-mono text-xs tabular-nums">
|
||||
<TableCell className="text-center font-mono text-xs tabular-nums">
|
||||
{formatAdminMinorUnits(
|
||||
r.jackpot_allocation_amount,
|
||||
r.currency_code ?? batchCurrency,
|
||||
|
||||
@@ -242,10 +242,10 @@ export function SettlementBatchesConsole() {
|
||||
<TableRow>
|
||||
<TableHead>{t("table.id", { ns: "common" })}</TableHead>
|
||||
<TableHead>{t("drawNo")}</TableHead>
|
||||
<TableHead className="text-right">{t("totalBet")}</TableHead>
|
||||
<TableHead className="text-right">{t("actualDeduct")}</TableHead>
|
||||
<TableHead className="text-right">{t("payoutTotal")}</TableHead>
|
||||
<TableHead className="text-right">{t("platformProfit")}</TableHead>
|
||||
<TableHead className="text-center">{t("totalBet")}</TableHead>
|
||||
<TableHead className="text-center">{t("actualDeduct")}</TableHead>
|
||||
<TableHead className="text-center">{t("payoutTotal")}</TableHead>
|
||||
<TableHead className="text-center">{t("platformProfit")}</TableHead>
|
||||
<TableHead>{t("reviewStatus")}</TableHead>
|
||||
<TableHead>{t("status")}</TableHead>
|
||||
<TableHead />
|
||||
@@ -256,18 +256,18 @@ export function SettlementBatchesConsole() {
|
||||
<TableRow key={row.id}>
|
||||
<TableCell className="font-mono text-xs">{row.id}</TableCell>
|
||||
<TableCell className="font-mono text-sm">{row.draw_no ?? "—"}</TableCell>
|
||||
<TableCell className="text-right font-mono text-xs tabular-nums">
|
||||
<TableCell className="text-center font-mono text-xs tabular-nums">
|
||||
{formatAdminMinorUnits(row.total_bet_amount, row.currency_code ?? "NPR")}
|
||||
</TableCell>
|
||||
<TableCell className="text-right font-mono text-xs tabular-nums">
|
||||
<TableCell className="text-center font-mono text-xs tabular-nums">
|
||||
{formatAdminMinorUnits(row.total_actual_deduct, row.currency_code ?? "NPR")}
|
||||
</TableCell>
|
||||
<TableCell className="text-right font-mono text-xs tabular-nums">
|
||||
<TableCell className="text-center font-mono text-xs tabular-nums">
|
||||
{formatAdminMinorUnits(row.total_payout_amount, row.currency_code ?? "NPR")}
|
||||
</TableCell>
|
||||
<TableCell
|
||||
className={cn(
|
||||
"text-right font-mono text-xs tabular-nums",
|
||||
"text-center font-mono text-xs tabular-nums",
|
||||
row.platform_profit < 0 ? "text-destructive" : "text-emerald-700",
|
||||
)}
|
||||
>
|
||||
@@ -288,7 +288,7 @@ export function SettlementBatchesConsole() {
|
||||
</AdminStatusBadge>
|
||||
</TableCell>
|
||||
<TableCell>
|
||||
<div className="flex flex-wrap justify-end gap-1.5">
|
||||
<div className="flex flex-wrap justify-center gap-1.5">
|
||||
<Link
|
||||
href={`/admin/settlement-batches/${row.id}/details`}
|
||||
className={cn(buttonVariants({ variant: "outline", size: "sm" }), "!border-border")}
|
||||
|
||||
Reference in New Issue
Block a user