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:
@@ -18,10 +18,12 @@ const adminMenus = computed(() => [
|
||||
{ path: '/', label: t('nav.dashboard') },
|
||||
{ path: '/matches', label: t('nav.matches'), matchPrefix: true },
|
||||
{ path: '/users', label: t('nav.agents_players') },
|
||||
{ path: '/agent-credit-transactions', label: t('nav.credit_transactions') },
|
||||
{ path: '/cashback', label: t('nav.cashback') },
|
||||
{ path: '/bets', label: t('nav.bets') },
|
||||
{ path: '/contents', label: t('nav.contents') },
|
||||
{ path: '/audit', label: t('nav.audit') },
|
||||
{ path: '/smoke-tests', label: t('nav.smoke_tests') },
|
||||
]);
|
||||
|
||||
const agentMenus = computed(() => [
|
||||
@@ -60,8 +62,11 @@ const roleLabel = computed(() => {
|
||||
return t('role.agent');
|
||||
});
|
||||
|
||||
const currentUser = computed(() => auth.user.value);
|
||||
const isAdminPortal = computed(() => auth.isAdmin.value);
|
||||
|
||||
const userInitial = computed(() =>
|
||||
(auth.user?.username ?? '').charAt(0).toUpperCase()
|
||||
(currentUser.value?.username ?? '').charAt(0).toUpperCase()
|
||||
);
|
||||
|
||||
function syncMobileNav() {
|
||||
@@ -175,12 +180,12 @@ watch(() => route.path, () => {
|
||||
<div class="user-chip">
|
||||
<div class="avatar">{{ userInitial }}</div>
|
||||
<div class="user-info">
|
||||
<span class="user-name">{{ auth.user?.username }}</span>
|
||||
<span class="user-name">{{ currentUser?.username }}</span>
|
||||
<span class="user-role">{{ roleLabel }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<AdminLocaleSwitcher />
|
||||
<div class="portal-tag">{{ auth.isAdmin ? t('portal.admin') : t('portal.agent') }}</div>
|
||||
<div class="portal-tag">{{ isAdminPortal ? t('portal.admin') : t('portal.agent') }}</div>
|
||||
<button class="btn-logout" @click="logout">{{ t('logout') }}</button>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
Reference in New Issue
Block a user