修复(会员档位): 未知档位 code 回退展示原始值
- 列表与「最近保存」改用 formatMembershipPlan,未知 plan 不再渲染成空白
This commit is contained in:
@@ -22,7 +22,10 @@ import type {
|
||||
ProfileMembershipPlanAdminResponse,
|
||||
} from '../api/adminApiTypes';
|
||||
import { useAdminWriteConfirm } from '../components/useAdminWriteConfirm';
|
||||
import { membershipPlanLabels } from '../config/membershipDisplay';
|
||||
import {
|
||||
formatMembershipPlan,
|
||||
membershipPlanLabels,
|
||||
} from '../config/membershipDisplay';
|
||||
import { handlePageError, parsePositiveIntegerOrZero } from './pageUtils';
|
||||
|
||||
interface AdminMembershipPlanPageProps {
|
||||
@@ -394,7 +397,7 @@ export function AdminMembershipPlanPage({
|
||||
type="button"
|
||||
onClick={() => fillForm(entry)}
|
||||
>
|
||||
{entry.title || membershipPlanLabels[entry.plan]}
|
||||
{entry.title || formatMembershipPlan(entry.plan)}
|
||||
</AdminButton>
|
||||
<small>
|
||||
{entry.plan} · rank {entry.rank}
|
||||
@@ -420,7 +423,7 @@ export function AdminMembershipPlanPage({
|
||||
label: <>档位</>,
|
||||
value: (
|
||||
<>
|
||||
{membershipPlanLabels[result.plan]}({result.plan})
|
||||
{formatMembershipPlan(result.plan)}({result.plan})
|
||||
</>
|
||||
),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user