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 { decimalRateToPercent } from '../utils/rate-percent';
|
||||
import { percentToDecimalRate } from '../utils/rate-percent';
|
||||
|
||||
@@ -21,7 +23,8 @@ export interface PlayerCreateForm {
|
||||
phone: string;
|
||||
email: string;
|
||||
initialDeposit: number;
|
||||
remark: string;
|
||||
initialDepositRemarkKind: InitialDepositRemarkKind | '';
|
||||
initialDepositRemarkCustom: string;
|
||||
/** 创建为一级代理(非玩家) */
|
||||
asTier1Agent: boolean;
|
||||
creditLimit: number;
|
||||
@@ -105,7 +108,8 @@ export function emptyPlayerCreateForm(): PlayerCreateForm {
|
||||
phone: '',
|
||||
email: '',
|
||||
initialDeposit: 0,
|
||||
remark: '',
|
||||
initialDepositRemarkKind: '',
|
||||
initialDepositRemarkCustom: '',
|
||||
asTier1Agent: false,
|
||||
creditLimit: 50000,
|
||||
cashbackRate: 0,
|
||||
@@ -192,6 +196,11 @@ export function buildCreatePlayerPayload(form: PlayerCreateForm) {
|
||||
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,
|
||||
'admin',
|
||||
),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user