feat(settings): surface enable_automation in SuperAdmin catalog

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-24 16:15:52 +03:30
co-authored by Cursor
parent 72b0a819af
commit a11136a605
3 changed files with 7 additions and 1 deletions
+5
View File
@@ -286,6 +286,7 @@ const KEY_TYPE_FALLBACK: Record<string, SettingFieldType> = {
sell_fee: 'price', sell_fee: 'price',
fee_free: 'number', fee_free: 'number',
fee_conditional_order: 'price', fee_conditional_order: 'price',
enable_automation: 'switch',
enable_conditional_order: 'switch', enable_conditional_order: 'switch',
enable_product_funds: 'switch', enable_product_funds: 'switch',
has_page_price_trigger: 'switch', has_page_price_trigger: 'switch',
@@ -680,6 +681,8 @@ const KEY_HELP_FALLBACK: Record<string, string> = {
'تعداد اولین سفارش‌های هر کاربر که از کارمزد معاف می‌شوند. صفر یعنی غیرفعال.', 'تعداد اولین سفارش‌های هر کاربر که از کارمزد معاف می‌شوند. صفر یعنی غیرفعال.',
fee_conditional_order: fee_conditional_order:
'مبلغ ریالی که با هر بار ثبت تریگر سفارش شرطی از کیف پول ریالی مشتری کم می‌شود. صفر = رایگان.', 'مبلغ ریالی که با هر بار ثبت تریگر سفارش شرطی از کیف پول ریالی مشتری کم می‌شود. صفر = رایگان.',
enable_automation:
'روشن: منوی اتوماسیون در پنل ادمین و اجرای موتور فعال است. خاموش: منو مخفی است و API/کران اجرا نمی‌شود. فقط از سوپرادمین قابل تغییر است.',
enable_conditional_order: enable_conditional_order:
'روشن: قابلیت سفارش شرطی سراسری فعال است. خاموش: منو و ارزیابی اجرا نمی‌شود. فقط از صفحه دیپلوی قابل تغییر است.', 'روشن: قابلیت سفارش شرطی سراسری فعال است. خاموش: منو و ارزیابی اجرا نمی‌شود. فقط از صفحه دیپلوی قابل تغییر است.',
enable_product_funds: enable_product_funds:
@@ -992,6 +995,7 @@ export const KEY_LABEL_FALLBACK: Record<string, string> = {
require_zero_main_gold_before_other_buy: 'الزام صفر بودن کیف اصلی قبل از خرید محصول دیگر', require_zero_main_gold_before_other_buy: 'الزام صفر بودن کیف اصلی قبل از خرید محصول دیگر',
fee_free: 'معافیت کارمزد سفارش اول', fee_free: 'معافیت کارمزد سفارش اول',
fee_conditional_order: 'کارمزد سفارش شرطی', fee_conditional_order: 'کارمزد سفارش شرطی',
enable_automation: 'اتوماسیون',
enable_conditional_order: 'سفارش شرطی', enable_conditional_order: 'سفارش شرطی',
enable_product_funds: 'قلک محصول', enable_product_funds: 'قلک محصول',
has_page_gift_card: 'کارت هدیه', has_page_gift_card: 'کارت هدیه',
@@ -1116,6 +1120,7 @@ export const SETTING_LOCKED_KEYS = new Set([
'group_sms', 'group_sms',
'customer_special_pricing', 'customer_special_pricing',
'customer_direct_sms', 'customer_direct_sms',
'enable_automation',
'enable_conditional_order', 'enable_conditional_order',
'enable_product_funds', 'enable_product_funds',
'has_page_price_trigger', 'has_page_price_trigger',
+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_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|tracking_systems_enabled|permision__enabled|show_to_users_chat)$/.test(
k, k,
), ),
}, },
+1
View File
@@ -5,6 +5,7 @@
export const SUPERADMIN_SYSTEM_SETTING_KEYS = new Set<string>([ export const SUPERADMIN_SYSTEM_SETTING_KEYS = new Set<string>([
"customer_direct_sms", "customer_direct_sms",
"customer_special_pricing", "customer_special_pricing",
"enable_automation",
"enable_conditional_order", "enable_conditional_order",
"enable_customer_level_profit", "enable_customer_level_profit",
"enable_product_funds", "enable_product_funds",