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

@@ -1,10 +1,12 @@
<script setup lang="ts">
import { ref, onMounted } from 'vue';
import { useRouter } from 'vue-router';
import { useAdminLocale } from '../composables/useAdminLocale';
import { resolveFormError, resolveApiError } from '../i18n/form-validation';
import api from '../api';
const { t } = useAdminLocale();
const router = useRouter();
import { ElMessage } from 'element-plus';
import {
emptyAgentCreateForm,
@@ -17,7 +19,7 @@ import {
type AgentCreateForm,
type AgentEditForm,
type PromotableUserOption,
} from './agent-form.ts';
} from './agent-form';
import {
formatAmount,
formatAmountFull,
@@ -484,7 +486,17 @@ function creditTypeLabel(type: string) {
</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="detail"
link
type="primary"
@click="router.push({ path: '/agent-credit-transactions', query: { agentId: detail.userId } })"
>
{{ t('agent.credit_tx.view_all') }}
</el-button>
</div>
<el-table
:data="detail.recentCreditTransactions"
size="small"
@@ -527,6 +539,13 @@ function creditTypeLabel(type: string) {
color: #666;
margin-bottom: 8px;
}
.section-title--row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
}
.amount-compact {
white-space: nowrap;
font-variant-numeric: tabular-nums;