From a11136a6052af928eacd5db96bdf07c406a11f61 Mon Sep 17 00:00:00 2001 From: adonis Date: Mon, 24 Aug 2026 16:15:52 +0330 Subject: [PATCH] feat(settings): surface enable_automation in SuperAdmin catalog Co-authored-by: Cursor --- src/config/khanegiSettingCatalog.ts | 5 +++++ src/config/khanegiSystemSettingGroups.ts | 2 +- src/config/superAdminSettingKeys.ts | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/config/khanegiSettingCatalog.ts b/src/config/khanegiSettingCatalog.ts index 8115b0e..783aee8 100644 --- a/src/config/khanegiSettingCatalog.ts +++ b/src/config/khanegiSettingCatalog.ts @@ -286,6 +286,7 @@ const KEY_TYPE_FALLBACK: Record = { sell_fee: 'price', fee_free: 'number', fee_conditional_order: 'price', + enable_automation: 'switch', enable_conditional_order: 'switch', enable_product_funds: 'switch', has_page_price_trigger: 'switch', @@ -680,6 +681,8 @@ const KEY_HELP_FALLBACK: Record = { 'تعداد اولین سفارش‌های هر کاربر که از کارمزد معاف می‌شوند. صفر یعنی غیرفعال.', fee_conditional_order: 'مبلغ ریالی که با هر بار ثبت تریگر سفارش شرطی از کیف پول ریالی مشتری کم می‌شود. صفر = رایگان.', + enable_automation: + 'روشن: منوی اتوماسیون در پنل ادمین و اجرای موتور فعال است. خاموش: منو مخفی است و API/کران اجرا نمی‌شود. فقط از سوپرادمین قابل تغییر است.', enable_conditional_order: 'روشن: قابلیت سفارش شرطی سراسری فعال است. خاموش: منو و ارزیابی اجرا نمی‌شود. فقط از صفحه دیپلوی قابل تغییر است.', enable_product_funds: @@ -992,6 +995,7 @@ export const KEY_LABEL_FALLBACK: Record = { require_zero_main_gold_before_other_buy: 'الزام صفر بودن کیف اصلی قبل از خرید محصول دیگر', fee_free: 'معافیت کارمزد سفارش اول', fee_conditional_order: 'کارمزد سفارش شرطی', + enable_automation: 'اتوماسیون', enable_conditional_order: 'سفارش شرطی', enable_product_funds: 'قلک محصول', has_page_gift_card: 'کارت هدیه', @@ -1116,6 +1120,7 @@ export const SETTING_LOCKED_KEYS = new Set([ 'group_sms', 'customer_special_pricing', 'customer_direct_sms', + 'enable_automation', 'enable_conditional_order', 'enable_product_funds', 'has_page_price_trigger', diff --git a/src/config/khanegiSystemSettingGroups.ts b/src/config/khanegiSystemSettingGroups.ts index 23b6b74..891f1e9 100644 --- a/src/config/khanegiSystemSettingGroups.ts +++ b/src/config/khanegiSystemSettingGroups.ts @@ -22,7 +22,7 @@ export const KHANEGI_SYSTEM_SETTING_GROUPS: SettingGroupDef[] = [ title: 'دسترسی مشتری به قابلیت‌ها', icon: 'TeamOutlined', 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, ), }, diff --git a/src/config/superAdminSettingKeys.ts b/src/config/superAdminSettingKeys.ts index 4bbb63f..1fbc4f7 100644 --- a/src/config/superAdminSettingKeys.ts +++ b/src/config/superAdminSettingKeys.ts @@ -5,6 +5,7 @@ export const SUPERADMIN_SYSTEM_SETTING_KEYS = new Set([ "customer_direct_sms", "customer_special_pricing", + "enable_automation", "enable_conditional_order", "enable_customer_level_profit", "enable_product_funds",