added fund

This commit is contained in:
2026-08-01 17:30:37 +03:30
parent 6a9e5aee47
commit 9a975e1cba
10 changed files with 348 additions and 104 deletions
+6 -1
View File
@@ -174,7 +174,7 @@ import SettingValueField from './SettingValueField.vue'
import SettingCard from './SettingCard.vue'
import { refreshAppModeMenu } from '@/router'
import { useUserStore } from '@/store/userStore'
import { applyBannerEnabledFromRows, applyTrackingSystemsEnabledFromRows, applyConditionalOrderEnabledFromRows, applyPriceTriggerEnabledFromRows, applyAppNotificationEnabledFromRows, applyPriceProviderFromRows, applySupportChatMenuEnabledFromRows, setBannerEnabledFromSettings, setConditionalOrderEnabledFromSettings, setPriceTriggerEnabledFromSettings, setAppNotificationEnabledFromSettings, setPriceProviderFromSettings, setStoreModeFromSettings, setTrackingSystemsEnabledFromSettings } from '@/utils/config'
import { applyBannerEnabledFromRows, applyTrackingSystemsEnabledFromRows, applyConditionalOrderEnabledFromRows, applyProductFundsEnabledFromRows, applyPriceTriggerEnabledFromRows, applyAppNotificationEnabledFromRows, applyPriceProviderFromRows, applySupportChatMenuEnabledFromRows, setBannerEnabledFromSettings, setConditionalOrderEnabledFromSettings, setProductFundsEnabledFromSettings, setPriceTriggerEnabledFromSettings, setAppNotificationEnabledFromSettings, setPriceProviderFromSettings, setStoreModeFromSettings, setTrackingSystemsEnabledFromSettings } from '@/utils/config'
import {
EDITABLE_SETTING_GROUPS,
SYSTEM_SETTING_GROUPS,
@@ -423,6 +423,7 @@ async function initConfig() {
applyBannerEnabledFromRows(baseData.value)
applyTrackingSystemsEnabledFromRows(baseData.value)
applyConditionalOrderEnabledFromRows(baseData.value)
applyProductFundsEnabledFromRows(baseData.value)
applyPriceTriggerEnabledFromRows(baseData.value)
applyAppNotificationEnabledFromRows(baseData.value)
applyPriceProviderFromRows(baseData.value)
@@ -483,6 +484,10 @@ function syncMenuFlagsFromSetting(key: string | undefined, value: string) {
setConditionalOrderEnabledFromSettings(isSwitchOn(value))
return
}
if (key === 'enable_product_funds') {
setProductFundsEnabledFromSettings(isSwitchOn(value))
return
}
if (key === 'has_page_price_trigger') {
setPriceTriggerEnabledFromSettings(isSwitchOn(value))
return
@@ -134,7 +134,7 @@ export const SYSTEM_SETTING_GROUPS: SettingGroupDef[] = [
title: 'دسترسی مشتری به قابلیت‌ها',
icon: 'vuesax-linear:people',
match: (k) =>
/^(enable_conditional_order|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|banner_enabled|jibit_enabled|customer_direct_sms|has_page_earn_money|group_sms|tracking_systems_enabled|permision__enabled|show_to_users_chat)$/.test(
k
)
},
@@ -245,6 +245,7 @@ const KEY_TYPE_FALLBACK: Record<string, SettingFieldType> = {
fee_free: 'number',
fee_conditional_order: 'price',
enable_conditional_order: 'switch',
enable_product_funds: 'switch',
has_page_price_trigger: 'switch',
has_page_notification: 'switch',
min_withdraw: 'price',
@@ -627,6 +628,8 @@ const KEY_HELP_FALLBACK: Record<string, string> = {
'مبلغ ریالی که با هر بار ثبت تریگر سفارش شرطی از کیف پول ریالی مشتری کم می‌شود. صفر = رایگان.',
enable_conditional_order:
'روشن: قابلیت سفارش شرطی سراسری فعال است. خاموش: منو و ارزیابی اجرا نمی‌شود. فقط از صفحه دیپلوی قابل تغییر است.',
enable_product_funds:
'روشن: ساخت و مدیریت قلک per-product در اپ مشتری فعال است (یک محصول در هر قلک؛ انتقال بدون سند حسابداری). خاموش: منو و API ساخت قلک جدید در دسترس نیست. فقط از دیپلوی قابل تغییر است.',
has_page_price_trigger:
'روشن: منوی هشدار قیمت در اپ مشتری نمایش داده می‌شود. خاموش: منو و صفحه مخفی است. فقط از صفحه دیپلوی قابل تغییر است.',
has_page_notification:
@@ -910,6 +913,7 @@ export const KEY_LABEL_FALLBACK: Record<string, string> = {
fee_free: 'معافیت کارمزد سفارش اول',
fee_conditional_order: 'کارمزد سفارش شرطی',
enable_conditional_order: 'سفارش شرطی',
enable_product_funds: 'قلک محصول',
has_page_price_trigger: 'هشدار قیمت',
has_page_notification: 'اعلان داخل اپ',
jibit_enabled: 'احراز هویت جیبیت',
@@ -1021,6 +1025,7 @@ export const SETTING_LOCKED_KEYS = new Set([
'group_sms',
'customer_direct_sms',
'enable_conditional_order',
'enable_product_funds',
'has_page_price_trigger',
'has_page_notification',
'jibit_enabled',