Add customer multi-level referral profit editor and related settings UI.
Expose enable_customer_level_profit in config and let admins edit per-customer level percents from the customers table/mobile sheets. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -134,7 +134,7 @@ export const SYSTEM_SETTING_GROUPS: SettingGroupDef[] = [
|
||||
title: 'دسترسی مشتری به قابلیتها',
|
||||
icon: 'vuesax-linear:people',
|
||||
match: (k) =>
|
||||
/^(enable_conditional_order|enable_product_funds|has_page_price_trigger|has_page_notification|banner_enabled|jibit_enabled|customer_direct_sms|has_page_earn_money|group_sms|tracking_systems_enabled|permision__enabled|show_to_users_chat)$/.test(
|
||||
/^(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|tracking_systems_enabled|permision__enabled|show_to_users_chat)$/.test(
|
||||
k
|
||||
)
|
||||
},
|
||||
|
||||
@@ -263,6 +263,8 @@ const KEY_TYPE_FALLBACK: Record<string, SettingFieldType> = {
|
||||
enable_product_funds: 'switch',
|
||||
has_page_price_trigger: 'switch',
|
||||
has_page_notification: 'switch',
|
||||
has_page_gift_card: 'switch',
|
||||
enable_customer_level_profit: 'switch',
|
||||
min_withdraw: 'price',
|
||||
min_deposit: 'price',
|
||||
min_first_buy: 'price',
|
||||
@@ -363,6 +365,7 @@ const KEY_TYPE_FALLBACK: Record<string, SettingFieldType> = {
|
||||
deposit_support_message_text: 'longtext',
|
||||
deposit_account_holder: 'text',
|
||||
deposit_card_number: 'text',
|
||||
deposit_account_number: 'text',
|
||||
deposit_sheba: 'text',
|
||||
invite_link_text: 'longtext',
|
||||
support_messenger: 'select',
|
||||
@@ -649,6 +652,10 @@ const KEY_HELP_FALLBACK: Record<string, string> = {
|
||||
'روشن: قابلیت سفارش شرطی سراسری فعال است. خاموش: منو و ارزیابی اجرا نمیشود. فقط از صفحه دیپلوی قابل تغییر است.',
|
||||
enable_product_funds:
|
||||
'روشن: ساخت و مدیریت قلک per-product در اپ مشتری فعال است (یک محصول در هر قلک؛ انتقال بدون سند حسابداری). خاموش: منو و API ساخت قلک جدید در دسترس نیست. فقط از دیپلوی قابل تغییر است.',
|
||||
has_page_gift_card:
|
||||
'روشن: منوی «ثبت کارت هدیه» و صفحه ثبت کد در اپ کاربر فعال است. خاموش: منو و صفحه مخفی است و API استفاده از کد هدیه در دسترس نیست. فقط از دیپلوی قابل تغییر است.',
|
||||
enable_customer_level_profit:
|
||||
'روشن: در لیست مشتریان آیکون تنظیم درصد سود هر سطح زیرمجموعه فعال است و پس از سفارش، سهم کارمزد طبق درصدهای هر معرف به کیف طلا واریز میشود. خاموش: آیکون و واریز سود چندسطحی غیرفعال است. فقط از دیپلوی قابل تغییر است.',
|
||||
has_page_price_trigger:
|
||||
'روشن: منوی هشدار قیمت در اپ مشتری نمایش داده میشود. خاموش: منو و صفحه مخفی است. فقط از صفحه دیپلوی قابل تغییر است.',
|
||||
has_page_notification:
|
||||
@@ -756,13 +763,15 @@ const KEY_HELP_FALLBACK: Record<string, string> = {
|
||||
support_messenger_id:
|
||||
'شناسه تماس در پیامرسان انتخابشده: یوزرنیم، آیدی یا لینک کامل. فقط روی آیکون پیامرسان و دکمه شناور اعمال میشود؛ تماس تلفنی از فیلد «شماره پشتیبانی» خوانده میشود.',
|
||||
support_messenger_text:
|
||||
'متن راهنمای واریز در مودال شارژ حساب. متن را بنویسید و متغیرها (نام صاحب حساب، شماره کارت، شبا) را با کلیک اضافه کنید؛ پیشنمایش نتیجه را با مقادیر نمونه نشان میدهد. خالی = متن پیشفرض اپ.',
|
||||
'متن راهنمای واریز در مودال شارژ حساب. متن را بنویسید و متغیرها (نام صاحب حساب، شماره کارت، شماره حساب، شبا) را با کلیک اضافه کنید؛ پیشنمایش نتیجه را با مقادیر نمونه نشان میدهد. خالی = متن پیشفرض اپ.',
|
||||
deposit_support_message_text:
|
||||
'متن پیشنویس فقط وقتی کاربر از مودال راهنمای واریز روی «پیام به پشتیبانی» یا SMS میزند. منوی شناور پشتیبانی این متن را نمیگذارد. خالی = متن پیشفرض اپ.',
|
||||
deposit_account_holder:
|
||||
'نام صاحب حساب واریز — در متن راهنمای واریز با ٪نام یا %نام جایگزین میشود. در پیام پشتیبانی فقط وقتی نام مشتری موجود نباشد استفاده میشود.',
|
||||
deposit_card_number:
|
||||
'شماره کارت واریز — در متنها با ٪کارت یا %کارت جایگزین میشود.',
|
||||
deposit_account_number:
|
||||
'شماره حساب بانکی واریز — در مودال راهنمای شارژ کنار کارت و شبا نمایش داده میشود. در متنها با ٪حساب یا %حساب جایگزین میشود.',
|
||||
deposit_sheba:
|
||||
'شماره شبا واریز — در متنها با ٪شبا یا %شبا جایگزین میشود.',
|
||||
deposit_sms_support_number:
|
||||
@@ -939,6 +948,8 @@ export const KEY_LABEL_FALLBACK: Record<string, string> = {
|
||||
fee_conditional_order: 'کارمزد سفارش شرطی',
|
||||
enable_conditional_order: 'سفارش شرطی',
|
||||
enable_product_funds: 'قلک محصول',
|
||||
has_page_gift_card: 'کارت هدیه',
|
||||
enable_customer_level_profit: 'سود چندسطحی معرف',
|
||||
has_page_price_trigger: 'هشدار قیمت',
|
||||
has_page_notification: 'اعلان داخل اپ',
|
||||
jibit_enabled: 'احراز هویت جیبیت',
|
||||
@@ -1016,6 +1027,7 @@ export const KEY_LABEL_FALLBACK: Record<string, string> = {
|
||||
deposit_support_message_text: 'متن پیام به پشتیبانی (واریز)',
|
||||
deposit_account_holder: 'نام صاحب حساب واریز',
|
||||
deposit_card_number: 'شماره کارت واریز',
|
||||
deposit_account_number: 'شماره حساب واریز',
|
||||
deposit_sheba: 'شبا واریز',
|
||||
deposit_sms_support_number: 'شماره تماس پشتیبانی',
|
||||
price_channel_enabled: 'ارسال قیمت به کانال',
|
||||
@@ -1056,6 +1068,8 @@ export const SETTING_LOCKED_KEYS = new Set([
|
||||
'enable_product_funds',
|
||||
'has_page_price_trigger',
|
||||
'has_page_notification',
|
||||
'has_page_gift_card',
|
||||
'enable_customer_level_profit',
|
||||
'jibit_enabled',
|
||||
'has_page_earn_money',
|
||||
'is_store',
|
||||
@@ -1103,7 +1117,7 @@ export const SETTING_EDITABLE_KEYS = new Set([
|
||||
'sms_notif_fund_withdraw_admin', 'sms_notif_fund_withdraw_customer',
|
||||
'sms_notif_price_trigger', 'sms_notif_wallet_alert', 'sms_notif_support_admin',
|
||||
'deposit_sms_support_number', 'deposit_support_message_text',
|
||||
'deposit_account_holder', 'deposit_card_number', 'deposit_sheba',
|
||||
'deposit_account_holder', 'deposit_card_number', 'deposit_account_number', 'deposit_sheba',
|
||||
'endDay',
|
||||
'fee_free', 'fee_service_charge_percentage',
|
||||
'gift_for_referral', 'gift_for_referrer',
|
||||
@@ -1122,7 +1136,7 @@ export const SETTING_EDITABLE_KEYS = new Set([
|
||||
'startDay',
|
||||
'support_messengers', 'support_messenger_text',
|
||||
'has_chat',
|
||||
'deposit_support_message_text', 'deposit_account_holder', 'deposit_card_number', 'deposit_sheba',
|
||||
'deposit_support_message_text', 'deposit_account_holder', 'deposit_card_number', 'deposit_account_number', 'deposit_sheba',
|
||||
'text_about', 'text_rule',
|
||||
'zaarbox_price_key',
|
||||
'price_channel_enabled', 'price_channel_messengers', 'price_channel_diff',
|
||||
|
||||
@@ -182,7 +182,7 @@ export const TEMPLATE_FIELD_CONFIGS: Record<string, TemplateFieldConfig> = {
|
||||
previewTitle: 'پیشنمایش راهنما',
|
||||
placeholder: 'متن راهنمای واریز در مودال شارژ حساب را بنویسید…',
|
||||
hint: 'روی هر متغیر کلیک کنید تا در محل نشانگر اضافه شود. اگر خالی بگذارید، متن پیشفرض اپ استفاده میشود.',
|
||||
legend: 'مقادیر بالا نمونهاند؛ در اپ، نام/کارت/شبا از فیلدهای «نام صاحب حساب واریز»، «شماره کارت واریز» و «شبا واریز» پر میشوند.',
|
||||
legend: 'مقادیر بالا نمونهاند؛ در اپ، نام/کارت/حساب/شبا از فیلدهای مربوطه پر میشوند.',
|
||||
rows: 8,
|
||||
defaultTemplate: DEPOSIT_GUIDE_DEFAULT,
|
||||
variableGroups: [
|
||||
@@ -192,6 +192,7 @@ export const TEMPLATE_FIELD_CONFIGS: Record<string, TemplateFieldConfig> = {
|
||||
items: [
|
||||
{ token: 'نام', label: 'صاحب حساب', help: 'نام صاحب حساب (از فیلد «نام صاحب حساب واریز»)' },
|
||||
{ token: 'کارت', label: 'شماره کارت', help: 'شماره کارت (از فیلد «شماره کارت واریز»)' },
|
||||
{ token: 'حساب', label: 'شماره حساب', help: 'شماره حساب (از فیلد «شماره حساب واریز»)' },
|
||||
{ token: 'شبا', label: 'شماره شبا', help: 'شماره شبا (از فیلد «شبا واریز»)' },
|
||||
],
|
||||
},
|
||||
@@ -199,6 +200,7 @@ export const TEMPLATE_FIELD_CONFIGS: Record<string, TemplateFieldConfig> = {
|
||||
sampleValues: {
|
||||
نام: 'علی رضایی',
|
||||
کارت: '۶۰۳۷-۹۹۷۹-۱۲۳۴-۵۶۷۸',
|
||||
حساب: '۰۱۰۸۱۷۹۰۹۰۰۲',
|
||||
شبا: 'IR۸۲۰۵۴۰۱۰۲۶۸۰۰۲۰۸۱۷۹۰۹۰۰۲',
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user