fix admin feature pricing visibility
This commit is contained in:
@@ -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;
|
||||
}
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user