feat(bet-providers): 添加开注商管理功能,包括增删改查接口及前端页面
Some checks failed
lotteryadmin CI / build (push) Has been cancelled
Some checks failed
lotteryadmin CI / build (push) Has been cancelled
This commit is contained in:
@@ -58,6 +58,10 @@ function ticketStatusText(status: string, t: (key: string, opts?: { ns?: string
|
||||
return translated === key ? status : translated;
|
||||
}
|
||||
|
||||
function providerLabel(providerName?: string | null, providerCode?: string | null): string {
|
||||
return providerName || providerCode || "—";
|
||||
}
|
||||
|
||||
function walletStatusLabel(status: string, t: (key: string, opts?: { ns?: string }) => string): string {
|
||||
switch (status) {
|
||||
case "processing":
|
||||
@@ -438,6 +442,7 @@ export function PlayerDetailConsole({ playerId }: { playerId: number }) {
|
||||
<TableHead>{t("ticketNo", { ns: "tickets" })}</TableHead>
|
||||
<TableHead>{t("orderNo", { ns: "tickets" })}</TableHead>
|
||||
<TableHead>{t("drawNo", { ns: "tickets" })}</TableHead>
|
||||
<TableHead>{t("provider", { ns: "tickets", defaultValue: "开注商" })}</TableHead>
|
||||
<TableHead>{t("playCode", { ns: "tickets" })}</TableHead>
|
||||
<TableHead>{t("number", { ns: "tickets" })}</TableHead>
|
||||
<TableHead className="text-center">{t("actualDeduct", { ns: "tickets" })}</TableHead>
|
||||
@@ -450,7 +455,7 @@ export function PlayerDetailConsole({ playerId }: { playerId: number }) {
|
||||
</TableHeader>
|
||||
<TableBody>
|
||||
{ticketsLoading && tickets.length === 0 ? (
|
||||
<AdminTableLoadingRow colSpan={10} />
|
||||
<AdminTableLoadingRow colSpan={12} />
|
||||
) : null}
|
||||
{tickets.map((row) => (
|
||||
<TableRow key={row.ticket_no}>
|
||||
@@ -464,6 +469,9 @@ export function PlayerDetailConsole({ playerId }: { playerId: number }) {
|
||||
</TableCell>
|
||||
<TableCell className="font-mono text-xs">{row.order_no ?? "—"}</TableCell>
|
||||
<TableCell className="font-mono text-xs">{row.draw_no ?? "—"}</TableCell>
|
||||
<TableCell className="font-mono text-xs">
|
||||
{providerLabel(row.provider_name, row.provider_code)}
|
||||
</TableCell>
|
||||
<TableCell className="text-xs">{playCodeLabel(row.play_code)}</TableCell>
|
||||
<TableCell className="font-mono text-xs">{row.original_number ?? "—"}</TableCell>
|
||||
<TableCell className="text-center text-xs tabular-nums">
|
||||
@@ -491,7 +499,7 @@ export function PlayerDetailConsole({ playerId }: { playerId: number }) {
|
||||
</TableRow>
|
||||
))}
|
||||
{!ticketsLoading && tickets.length === 0 ? (
|
||||
<AdminTableNoResourceRow colSpan={10} className="text-muted-foreground" />
|
||||
<AdminTableNoResourceRow colSpan={12} className="text-muted-foreground" />
|
||||
) : null}
|
||||
</TableBody>
|
||||
</Table>
|
||||
|
||||
Reference in New Issue
Block a user