From 70ebd7dabbb2f3abcbb08521b32a73ac82dee52b Mon Sep 17 00:00:00 2001 From: mohammad sedighi Date: Thu, 12 Nov 2026 14:36:35 +0330 Subject: [PATCH] added enable_customer_profit --- prisma/setting-templates-from-deploy.json | 9 +++++++++ scripts/sync-superadmin-setting-template.mjs | 8 ++++++++ src/plugins/plugin-catalog.seed.ts | 7 +++++++ src/program-settings/deploy-setting-catalog-keys.ts | 1 + 4 files changed, 25 insertions(+) diff --git a/prisma/setting-templates-from-deploy.json b/prisma/setting-templates-from-deploy.json index 9a372f1..909dbce 100644 --- a/prisma/setting-templates-from-deploy.json +++ b/prisma/setting-templates-from-deploy.json @@ -44,6 +44,15 @@ "description": "روشن: در لیست مشتریان آیکون تنظیم درصد سود هر سطح زیرمجموعه فعال است و پس از سفارش، سهم کارمزد طبق درصدهای هر معرف به کیف طلا واریز می‌شود. خاموش: آیکون و واریز سود چندسطحی غیرفعال است. فقط از دیپلوی قابل تغییر است.", "type": "switch" }, + { + "key": "enable_customer_profit", + "value": "false", + "title_fa": "سود مشارکت و سپرده", + "can_edit": 0, + "is_active": 1, + "description": "روشن: امکان نگهداری و سپرده‌گذاری طلا یا پول با سود دوره‌ای برای مشتریان فعال است. خاموش: این امکان غیرفعال است.", + "type": "switch" + }, { "key": "enable_gold_credit", "value": "false", diff --git a/scripts/sync-superadmin-setting-template.mjs b/scripts/sync-superadmin-setting-template.mjs index 606b2a1..c40be35 100644 --- a/scripts/sync-superadmin-setting-template.mjs +++ b/scripts/sync-superadmin-setting-template.mjs @@ -214,6 +214,7 @@ const SUPERADMIN_OWNED_KEYS = new Set([ 'enable_automation', 'enable_conditional_order', 'enable_customer_level_profit', + 'enable_customer_profit', 'enable_gold_credit', 'enable_product_funds', 'enable_remittance', @@ -266,6 +267,13 @@ const SUPERADMIN_OWNED_META = { 'روشن: امکان انتقال وجه یا محصول از کیف پول به سایر شماره‌ها توسط کاربران فعال است. خاموش: این امکان غیرفعال است.', type: 'switch', }, + enable_customer_profit: { + value: 'false', + title_fa: 'سود مشارکت و سپرده', + description: + 'روشن: امکان نگهداری و سپرده‌گذاری طلا یا پول با سود دوره‌ای برای مشتریان فعال است. خاموش: این امکان غیرفعال است.', + type: 'switch', + }, }; for (const [key, meta] of Object.entries(SUPERADMIN_OWNED_META)) { diff --git a/src/plugins/plugin-catalog.seed.ts b/src/plugins/plugin-catalog.seed.ts index f73ce98..4ef2794 100644 --- a/src/plugins/plugin-catalog.seed.ts +++ b/src/plugins/plugin-catalog.seed.ts @@ -91,6 +91,12 @@ export const PLUGIN_CATALOG_SEED: Array<{ description: 'ثبت سفارشات خودکار خرید و فروش طلا در قیمت هدف (Limit Order)؛ انجام قطعی معامله در هر ساعت از شبانه‌روز بلافاصله پس از لمس قیمت بازار.', }, + { + settingKey: 'enable_customer_profit', + titleFa: 'سود مشارکت و سپرده مشتری', + description: + 'سپرده‌گذاری و نگهداری موجودی ریالی یا وزنی طلا توسط کاربران با نرخ و دوره‌های سود معین، جهت جذب نقدینگی و ارزش‌آفرینی دارایی‌های مشتریان.', + }, { settingKey: 'enable_remittance', titleFa: 'حواله', @@ -156,6 +162,7 @@ export function inferSettingKeyFromName(name: string): string | null { [/مجوز/, 'permision__enabled'], [/نمودار/, 'has_charts'], [/حواله/, 'enable_remittance'], + [/سود.*مشارکت|سود.*سپرده|سپرده.*سود/, 'enable_customer_profit'], ]; for (const [re, key] of rules) { if (re.test(n)) return key; diff --git a/src/program-settings/deploy-setting-catalog-keys.ts b/src/program-settings/deploy-setting-catalog-keys.ts index 11d536d..363ff82 100644 --- a/src/program-settings/deploy-setting-catalog-keys.ts +++ b/src/program-settings/deploy-setting-catalog-keys.ts @@ -8,6 +8,7 @@ export const DEPLOY_SETTING_CATALOG_KEYS = new Set([ "enable_automation", "enable_conditional_order", "enable_customer_level_profit", + "enable_customer_profit", "enable_gold_credit", "enable_product_funds", "enable_remittance",