fix admin feature pricing visibility
Independent Staging Quality Gate / validate (push) Failing after 26m23s
Independent Staging Quality Gate / publish (push) Has been skipped

This commit is contained in:
Jesse_Chen
2026-08-31 19:57:08 +08:00
parent 47b4b06bfb
commit afb8305ca1
9 changed files with 141 additions and 9 deletions
@@ -0,0 +1,22 @@
export const FEATURE_PRICING_OPTIONS = [
{ value: "chat.standard", label: "标准咨询(chat.standard" },
{ value: "chat.premium", label: "高级咨询(chat.premium" },
{ value: "rectification", label: "生时校正(rectification" },
{ value: "report.full", label: "完整报告(report.full" },
{ value: "report.export", label: "报告导出(report.export" },
{ value: "profile.extra", label: "额外档案(profile.extra" },
] as const;
export const MODEL_TIER_OPTIONS = [
{ value: "standard", label: "标准模型(standard" },
{ value: "premium", label: "高级模型(premium" },
{ value: "internal", label: "内部模型(internal" },
] as const;
export function featurePricingLabel(value: string) {
return FEATURE_PRICING_OPTIONS.find((option) => option.value === value)?.label ?? value;
}
export function modelTierLabel(value: string) {
return MODEL_TIER_OPTIONS.find((option) => option.value === value)?.label ?? value;
}
+2
View File
@@ -194,6 +194,8 @@ const resourcePermissions: Record<string, { read: string; write?: string }> = {
payments: { read: "billing.orders.read" },
packages: { read: "billing.products.read", write: "billing.products.write" },
products: { read: "billing.products.read", write: "billing.products.write" },
"feature-pricing": { read: "billing.products.read", write: "billing.products.write" },
"pricing-simulator": { read: "billing.products.read" },
subscriptions: {
read: "billing.orders.read",
write: "billing.adjustments.write",