Catalog enable_gold_credit for SuperAdmin program settings.

Surface the gold credit access switch with default-off semantics in the SA UI.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-30 00:17:06 +03:30
co-authored by Cursor
parent 1f412ee818
commit f4eb43fe4d
3 changed files with 7 additions and 1 deletions
+5
View File
@@ -351,6 +351,7 @@ const KEY_TYPE_FALLBACK: Record<string, SettingFieldType> = {
sms_notif_support_admin: 'switch', sms_notif_support_admin: 'switch',
group_sms: 'switch', group_sms: 'switch',
customer_special_pricing: 'switch', customer_special_pricing: 'switch',
enable_gold_credit: 'switch',
montzar_closed: 'switch', montzar_closed: 'switch',
montzar_open_buy: 'switch', montzar_open_buy: 'switch',
montzar_open_sell: 'switch', montzar_open_sell: 'switch',
@@ -862,6 +863,8 @@ const KEY_HELP_FALLBACK: Record<string, string> = {
'روشن: وقتی مشتری اولین پیام خوانده‌نشده را در چت پشتیبانی می‌فرستد و ادمین همان گفتگو را باز و visible ندارد، پیامک به ادمین‌های دارای «ارسال پیامک» می‌رود. خاموش: اعلان پیامک چت نمی‌رود.', 'روشن: وقتی مشتری اولین پیام خوانده‌نشده را در چت پشتیبانی می‌فرستد و ادمین همان گفتگو را باز و visible ندارد، پیامک به ادمین‌های دارای «ارسال پیامک» می‌رود. خاموش: اعلان پیامک چت نمی‌رود.',
group_sms: group_sms:
'روشن: دکمه ارسال پیامک گروهی در پنل ادمین فعال است (ارسال ۱۰تایی). خاموش: ارسال پیامک گروهی غیرفعال است. فقط از تنظیمات پیشرفته.', 'روشن: دکمه ارسال پیامک گروهی در پنل ادمین فعال است (ارسال ۱۰تایی). خاموش: ارسال پیامک گروهی غیرفعال است. فقط از تنظیمات پیشرفته.',
enable_gold_credit:
'روشن: منوی اعتبار و صفحه اعتبار مشتری. خاموش: غیرفعال. فقط از سوپرادمین.',
customer_special_pricing: customer_special_pricing:
'روشن: زیرمنوی قیمت ویژه در مشتریان و اعمال سود خرید/فروش پکیج روی مظنه و سفارش برای کاربران انتخاب‌شده. خاموش: غیرفعال. فقط از دیپلوی قابل تغییر است.', 'روشن: زیرمنوی قیمت ویژه در مشتریان و اعمال سود خرید/فروش پکیج روی مظنه و سفارش برای کاربران انتخاب‌شده. خاموش: غیرفعال. فقط از دیپلوی قابل تغییر است.',
profit_gold_api_enabled: profit_gold_api_enabled:
@@ -1028,6 +1031,7 @@ export const KEY_LABEL_FALLBACK: Record<string, string> = {
open_register: 'ثبت‌نام باز', open_register: 'ثبت‌نام باز',
sms_panel: 'پنل پیامک (کیف پول)', sms_panel: 'پنل پیامک (کیف پول)',
customer_direct_sms: 'پیامک تکی به مشتری از لیست', customer_direct_sms: 'پیامک تکی به مشتری از لیست',
enable_gold_credit: 'اعتبار طلایی',
customer_special_pricing: 'قیمت ویژه مشتری', customer_special_pricing: 'قیمت ویژه مشتری',
charge_notif: 'پیامک شارژ ادمین', charge_notif: 'پیامک شارژ ادمین',
sms_notif_order_admin: 'پیامک خرید/فروش به ادمین', sms_notif_order_admin: 'پیامک خرید/فروش به ادمین',
@@ -1124,6 +1128,7 @@ export const SETTING_LOCKED_KEYS = new Set([
'referral_bonus_amount', 'referral_bonus_amount',
'group_sms', 'group_sms',
'customer_special_pricing', 'customer_special_pricing',
'enable_gold_credit',
'customer_direct_sms', 'customer_direct_sms',
'enable_automation', 'enable_automation',
'enable_conditional_order', 'enable_conditional_order',
+1 -1
View File
@@ -22,7 +22,7 @@ export const KHANEGI_SYSTEM_SETTING_GROUPS: SettingGroupDef[] = [
title: 'دسترسی مشتری به قابلیت‌ها', title: 'دسترسی مشتری به قابلیت‌ها',
icon: 'TeamOutlined', icon: 'TeamOutlined',
match: (k) => match: (k) =>
/^(enable_automation|enable_conditional_order|enable_product_funds|has_page_price_trigger|has_page_notification|has_page_gift_card|enable_customer_level_profit|banner_enabled|jibit_enabled|customer_direct_sms|has_page_earn_money|group_sms|customer_special_pricing|tracking_systems_enabled|permision__enabled|show_to_users_chat)$/.test( /^(enable_automation|enable_conditional_order|enable_product_funds|has_page_price_trigger|has_page_notification|has_page_gift_card|enable_customer_level_profit|banner_enabled|jibit_enabled|customer_direct_sms|has_page_earn_money|group_sms|customer_special_pricing|enable_gold_credit|tracking_systems_enabled|permision__enabled|show_to_users_chat)$/.test(
k, k,
), ),
}, },
+1
View File
@@ -8,6 +8,7 @@ export const SUPERADMIN_SYSTEM_SETTING_KEYS = new Set<string>([
"enable_automation", "enable_automation",
"enable_conditional_order", "enable_conditional_order",
"enable_customer_level_profit", "enable_customer_level_profit",
"enable_gold_credit",
"enable_product_funds", "enable_product_funds",
"group_sms", "group_sms",
"has_page_earn_money", "has_page_earn_money",