feat: add smoke tests, agent credit ledger, and player cashback page

Introduce admin smoke-test suite with API probes, agent credit transaction history, and player cashback records; fix SmokeTestModule DI and polish admin/player UI assets.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-09 16:05:48 +08:00
parent 9c6c5e51f3
commit d5e7c8edb3
52 changed files with 3357 additions and 67 deletions

View File

@@ -19,14 +19,14 @@ import {
type PlayerDetail,
type PlayerCreateForm,
type PlayerEditForm,
} from './user-form.ts';
} from './user-form';
import {
emptyAgentEditForm,
editFormFromAgentDetail,
type AgentRow,
type AgentDetail,
type AgentEditForm,
} from './agent-form.ts';
} from './agent-form';
import { subAgentAccountStatus } from './agent/agent-sub-agent-form';
import {
formatAmount,
@@ -994,8 +994,8 @@ function creditTypeLabel(type: string) {
:expand-row-keys="subAgentExpandedKeys"
:row-class-name="expandableTableRowClassName"
class="inner-table expandable-table"
@expand-change="(sub, rows) => onSubAgentExpand(row.userId, sub, rows)"
@row-click="(sub, col, e) => onSubAgentRowClick(row.userId, sub, col, e)"
@expand-change="(sub: AgentRow, rows: AgentRow[]) => onSubAgentExpand(row.userId, sub, rows)"
@row-click="(sub: AgentRow, col: unknown, e: MouseEvent) => onSubAgentRowClick(row.userId, sub, col, e)"
>
<template #empty><AdminTableEmpty /></template>
<el-table-column type="expand">
@@ -1469,7 +1469,17 @@ function creditTypeLabel(type: string) {
<el-descriptions-item :label="t('agent.col.created')" :span="2">{{ formatTime(agentDetail.createdAt) }}</el-descriptions-item>
</el-descriptions>
<div class="section-title">{{ t('agent.section.credit_log') }}</div>
<div class="section-title section-title--row">
<span>{{ t('agent.section.credit_log') }}</span>
<el-button
v-if="agentDetail"
link
type="primary"
@click="router.push({ path: '/agent-credit-transactions', query: { agentId: agentDetail.userId } })"
>
{{ t('agent.credit_tx.view_all') }}
</el-button>
</div>
<el-table :data="agentDetail.recentCreditTransactions" size="small" stripe :empty-text="t('agent.col.no_records')">
<el-table-column :label="t('agent.col.credit_type')" width="80">
<template #default="{ row }">{{ creditTypeLabel(row.transactionType) }}</template>
@@ -1627,6 +1637,13 @@ function creditTypeLabel(type: string) {
color: #666;
margin-bottom: 8px;
}
.section-title--row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
}
</style>
<style>