feat: 开户备注、账单展示优化与后台代理管理增强
- 新增初始上分备注(日常上分/开户赠金/自定义)及前后台校验与展示 - 优化钱包流水类型与备注显示,区分管理员/代理/玩家上下分 - 修复登录后语言被后端覆盖的问题,登录时同步当前语言到服务端 - 后台代理/玩家表格操作栏重构,充值订单增加备注列 - 前台个人中心、充值、账单与验证码组件体验优化 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import type { InitialDepositRemarkKind } from '@thebet365/shared';
|
||||
import { FormValidationError } from '../../i18n/form-validation';
|
||||
import { buildInitialDepositRemark } from '../../utils/initial-depositRemark';
|
||||
import { assertPlayerUsername } from '../user-form';
|
||||
|
||||
export interface AgentPlayerCreateForm {
|
||||
@@ -8,7 +10,8 @@ export interface AgentPlayerCreateForm {
|
||||
phone: string;
|
||||
email: string;
|
||||
initialDeposit: number;
|
||||
remark: string;
|
||||
initialDepositRemarkKind: InitialDepositRemarkKind | '';
|
||||
initialDepositRemarkCustom: string;
|
||||
}
|
||||
|
||||
export interface AgentPlayerRow {
|
||||
@@ -17,6 +20,7 @@ export interface AgentPlayerRow {
|
||||
status: string;
|
||||
createdAt: string;
|
||||
inviteCode?: string | null;
|
||||
cashbackRate?: string;
|
||||
wallet?: { availableBalance: string; frozenBalance?: string };
|
||||
}
|
||||
|
||||
@@ -62,7 +66,8 @@ export function emptyAgentPlayerCreateForm(): AgentPlayerCreateForm {
|
||||
phone: '',
|
||||
email: '',
|
||||
initialDeposit: 0,
|
||||
remark: '',
|
||||
initialDepositRemarkKind: '',
|
||||
initialDepositRemarkCustom: '',
|
||||
};
|
||||
}
|
||||
|
||||
@@ -78,7 +83,12 @@ export function buildAgentCreatePlayerPayload(form: AgentPlayerCreateForm) {
|
||||
phone: form.phone.trim() || undefined,
|
||||
email: form.email.trim() || undefined,
|
||||
initialDeposit: form.initialDeposit > 0 ? form.initialDeposit : undefined,
|
||||
remark: form.remark.trim() || undefined,
|
||||
remark: buildInitialDepositRemark(
|
||||
form.initialDeposit,
|
||||
form.initialDepositRemarkKind,
|
||||
form.initialDepositRemarkCustom,
|
||||
'agent',
|
||||
),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user