added notif 2
This commit is contained in:
@@ -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, applyPriceProviderFromRows, setBannerEnabledFromSettings, setConditionalOrderEnabledFromSettings, setPriceProviderFromSettings, setStoreModeFromSettings, setTrackingSystemsEnabledFromSettings } from '@/utils/config'
|
||||
import { applyBannerEnabledFromRows, applyTrackingSystemsEnabledFromRows, applyConditionalOrderEnabledFromRows, applyPriceTriggerEnabledFromRows, applyAppNotificationEnabledFromRows, applyPriceProviderFromRows, setBannerEnabledFromSettings, setConditionalOrderEnabledFromSettings, setPriceTriggerEnabledFromSettings, setAppNotificationEnabledFromSettings, setPriceProviderFromSettings, setStoreModeFromSettings, setTrackingSystemsEnabledFromSettings } from '@/utils/config'
|
||||
import {
|
||||
EDITABLE_SETTING_GROUPS,
|
||||
SYSTEM_SETTING_GROUPS,
|
||||
@@ -423,6 +423,8 @@ async function initConfig() {
|
||||
applyBannerEnabledFromRows(baseData.value)
|
||||
applyTrackingSystemsEnabledFromRows(baseData.value)
|
||||
applyConditionalOrderEnabledFromRows(baseData.value)
|
||||
applyPriceTriggerEnabledFromRows(baseData.value)
|
||||
applyAppNotificationEnabledFromRows(baseData.value)
|
||||
applyPriceProviderFromRows(baseData.value)
|
||||
// در صفحهٔ عادی price_provider (can_edit=0) نیست — از کل تنظیمات بخوان
|
||||
if (!baseData.value.some((row) => row.key === 'price_provider')) {
|
||||
@@ -559,6 +561,12 @@ async function saveSettingRow(row: Const) {
|
||||
if (row.key === 'enable_conditional_order') {
|
||||
setConditionalOrderEnabledFromSettings(isSwitchOn(value))
|
||||
}
|
||||
if (row.key === 'has_page_price_trigger') {
|
||||
setPriceTriggerEnabledFromSettings(isSwitchOn(value))
|
||||
}
|
||||
if (row.key === 'has_page_notification') {
|
||||
setAppNotificationEnabledFromSettings(isSwitchOn(value))
|
||||
}
|
||||
if (row.key === 'price_provider') {
|
||||
setPriceProviderFromSettings(value)
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ export const SYSTEM_SETTING_GROUPS: SettingGroupDef[] = [
|
||||
title: 'دسترسی مشتری به قابلیتها',
|
||||
icon: 'vuesax-linear:people',
|
||||
match: (k) =>
|
||||
/^(enable_conditional_order|banner_enabled|jibit_enabled|customer_direct_sms|has_page_earn_money|group_sms|tracking_systems_enabled|permision__enabled)$/.test(
|
||||
/^(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)$/.test(
|
||||
k
|
||||
)
|
||||
},
|
||||
@@ -172,15 +172,28 @@ export const SYSTEM_SETTING_GROUPS: SettingGroupDef[] = [
|
||||
match: (k) => k.startsWith('payping_')
|
||||
},
|
||||
{
|
||||
id: 'accounting',
|
||||
title: 'حسابداری',
|
||||
id: 'accounting_provider',
|
||||
title: 'انتخاب سیستم حسابداری',
|
||||
icon: 'vuesax-linear:receipt-2',
|
||||
match: (k) =>
|
||||
k === 'accounting_provider'
|
||||
|| k.startsWith('tahesab_')
|
||||
|| k.startsWith('pargar_')
|
||||
|| k === 'send_to_tahesab'
|
||||
|| k === 'send_to_pargar'
|
||||
match: (k) => k === 'accounting_provider'
|
||||
},
|
||||
{
|
||||
id: 'accounting_zarin',
|
||||
title: 'حسابداری زرین',
|
||||
icon: 'vuesax-linear:card-pos',
|
||||
match: (k) => k.startsWith('zarin_')
|
||||
},
|
||||
{
|
||||
id: 'accounting_tahesab',
|
||||
title: 'حسابداری تهحساب',
|
||||
icon: 'vuesax-linear:calculator',
|
||||
match: (k) => k.startsWith('tahesab_') || k === 'send_to_tahesab'
|
||||
},
|
||||
{
|
||||
id: 'accounting_pargar',
|
||||
title: 'حسابداری پرگار',
|
||||
icon: 'vuesax-linear:document-text',
|
||||
match: (k) => k.startsWith('pargar_') || k === 'send_to_pargar'
|
||||
},
|
||||
{
|
||||
id: 'price_channel',
|
||||
|
||||
@@ -243,6 +243,8 @@ const KEY_TYPE_FALLBACK: Record<string, SettingFieldType> = {
|
||||
fee_free: 'number',
|
||||
fee_conditional_order: 'price',
|
||||
enable_conditional_order: 'switch',
|
||||
has_page_price_trigger: 'switch',
|
||||
has_page_notification: 'switch',
|
||||
min_withdraw: 'price',
|
||||
min_deposit: 'price',
|
||||
min_first_buy: 'price',
|
||||
@@ -305,6 +307,12 @@ const KEY_TYPE_FALLBACK: Record<string, SettingFieldType> = {
|
||||
tahesab_token: 'text',
|
||||
tahesab_db: 'text',
|
||||
tahesab_bank_account: 'text',
|
||||
zarin_api: 'text',
|
||||
zarin_token: 'text',
|
||||
zarin_noe_kar: 'number',
|
||||
zarin_gorohe_kar: 'number',
|
||||
zarin_name_g: 'text',
|
||||
zarin_uid_prefix: 'text',
|
||||
pargar_username: 'text',
|
||||
pargar_password: 'text',
|
||||
pargar_api_token: 'text',
|
||||
@@ -342,7 +350,8 @@ const SELECT_LABELS_BY_KEY: Record<string, Record<string, string>> = {
|
||||
accounting_provider: {
|
||||
none: 'هیچکدام',
|
||||
pargar: 'پرگار',
|
||||
tahesab: 'تهحساب'
|
||||
tahesab: 'تهحساب',
|
||||
zarin: 'زرین'
|
||||
},
|
||||
support_messenger: {
|
||||
bale: 'بله',
|
||||
@@ -362,7 +371,7 @@ const SELECT_LABELS_BY_KEY: Record<string, Record<string, string>> = {
|
||||
}
|
||||
|
||||
const SELECT_OPTIONS_BY_KEY: Record<string, string> = {
|
||||
accounting_provider: 'none,pargar,tahesab',
|
||||
accounting_provider: 'none,pargar,tahesab,zarin',
|
||||
price_provider: 'montzar,zaarbox,main_product',
|
||||
payping_gateway_name: 'sepal,',
|
||||
unit: 'گرم,کیلوگرم',
|
||||
@@ -567,6 +576,10 @@ const KEY_HELP_FALLBACK: Record<string, string> = {
|
||||
'مبلغ ریالی که با هر بار ثبت تریگر سفارش شرطی از کیف پول ریالی مشتری کم میشود. صفر = رایگان.',
|
||||
enable_conditional_order:
|
||||
'روشن: قابلیت سفارش شرطی سراسری فعال است. خاموش: منو و ارزیابی اجرا نمیشود. فقط از صفحه دیپلوی قابل تغییر است.',
|
||||
has_page_price_trigger:
|
||||
'روشن: منوی هشدار قیمت در اپ مشتری نمایش داده میشود. خاموش: منو و صفحه مخفی است. فقط از صفحه دیپلوی قابل تغییر است.',
|
||||
has_page_notification:
|
||||
'روشن: زنگوله اعلان در اپ مشتری و منوی ثبت اعلان در ادمین فعال است. خاموش: مخفی است. فقط از صفحه دیپلوی قابل تغییر است.',
|
||||
min_withdraw:
|
||||
'حداقل مبلغ درخواست برداشت (ریال). درخواستهای کمتر پذیرفته نمیشوند.',
|
||||
min_deposit:
|
||||
@@ -724,7 +737,7 @@ const KEY_HELP_FALLBACK: Record<string, string> = {
|
||||
send_to_tahesab:
|
||||
'تنظیم قدیمی — از «سیستم حسابداری» استفاده کنید.',
|
||||
accounting_provider:
|
||||
'سیستم حسابداری متصل: پرگار (API ورودی)، تهحساب (ارسال خودکار)، یا هیچکدام.',
|
||||
'سیستم حسابداری متصل: پرگار، تهحساب، زرین، یا هیچکدام.',
|
||||
send_to_pargar:
|
||||
'تنظیم قدیمی — از «سیستم حسابداری» استفاده کنید.',
|
||||
pargar_username:
|
||||
@@ -747,6 +760,18 @@ const KEY_HELP_FALLBACK: Record<string, string> = {
|
||||
'نام پایگاه داده در تهحساب که سند به آن ارسال میشود.',
|
||||
tahesab_bank_account:
|
||||
'نام یا کد حساب بانکی در سند واریز/برداشت تهحساب.',
|
||||
zarin_api:
|
||||
'آدرس پایه وبسرویس زرین (بدون /ZarrinService/accounting).',
|
||||
zarin_token:
|
||||
'توکن مکمل API زرین که در نرمافزار زرین تعریف میشود.',
|
||||
zarin_noe_kar:
|
||||
'کد noeKar هنگام ساخت کار ساخته در زرین.',
|
||||
zarin_gorohe_kar:
|
||||
'کد gorooheKar هنگام ساخت/جستجوی کار در زرین. اگر چند پنل یک زرین دارند، برای هر پنل گروه کار متفاوت بگذارید.',
|
||||
zarin_name_g:
|
||||
'نام گروه حساب مشتریان در زرین (nameG). اگر چند پنل یک توکن دارند، برای هر پنل نام گروه متفاوت بگذارید. خالی = نام برند.',
|
||||
zarin_uid_prefix:
|
||||
'پیشوند عددی uid برای جلوگیری از تداخل بین چند پنل روی یک زرین. فقط عدد (مثلاً ۱۱).',
|
||||
montify_name:
|
||||
'نام فروشگاه که در درگاه پرداخت و رسید بانکی به مشتری نشان داده میشود.',
|
||||
app_url:
|
||||
@@ -799,6 +824,8 @@ export const KEY_LABEL_FALLBACK: Record<string, string> = {
|
||||
fee_free: 'معافیت کارمزد سفارش اول',
|
||||
fee_conditional_order: 'کارمزد سفارش شرطی',
|
||||
enable_conditional_order: 'سفارش شرطی',
|
||||
has_page_price_trigger: 'هشدار قیمت',
|
||||
has_page_notification: 'اعلان داخل اپ',
|
||||
jibit_enabled: 'احراز هویت جیبیت',
|
||||
jibit_verification: 'تأیید کارت بانکی با جیبیت',
|
||||
register_jibit_verify: 'تأیید کدملی/موبایل در ثبتنام',
|
||||
@@ -842,6 +869,12 @@ export const KEY_LABEL_FALLBACK: Record<string, string> = {
|
||||
accounting_provider: 'سیستم حسابداری',
|
||||
send_to_tahesab: 'ارسال خودکار به تهحساب (قدیمی)',
|
||||
send_to_pargar: 'ارسال خودکار به پرگار (قدیمی)',
|
||||
zarin_api: 'آدرس API زرین',
|
||||
zarin_token: 'توکن زرین',
|
||||
zarin_noe_kar: 'نوع کار پیشفرض زرین',
|
||||
zarin_gorohe_kar: 'گروه کار پیشفرض زرین',
|
||||
zarin_name_g: 'نام گروه حساب مشتریان زرین',
|
||||
zarin_uid_prefix: 'پیشوند عددی uid زرین',
|
||||
support_messengers: 'پیامرسانهای پشتیبانی',
|
||||
tracking_systems: 'سایتهای ریگیری',
|
||||
tracking_systems_enabled: 'نمایش سایتهای ریگیری',
|
||||
@@ -881,6 +914,8 @@ export const SETTING_LOCKED_KEYS = new Set([
|
||||
'group_sms',
|
||||
'customer_direct_sms',
|
||||
'enable_conditional_order',
|
||||
'has_page_price_trigger',
|
||||
'has_page_notification',
|
||||
'jibit_enabled',
|
||||
'has_page_earn_money',
|
||||
'is_store',
|
||||
@@ -901,6 +936,7 @@ export const SETTING_LOCKED_KEYS = new Set([
|
||||
'send_to_tahesab', 'send_to_pargar', 'accounting_provider', 'service_charge_percentage',
|
||||
'sse_path',
|
||||
'tahesab_bank_account', 'tahesab_db', 'tahesab_host', 'tahesab_port', 'tahesab_token',
|
||||
'zarin_api', 'zarin_token', 'zarin_noe_kar', 'zarin_gorohe_kar', 'zarin_name_g', 'zarin_uid_prefix',
|
||||
'tracking_systems', 'tracking_systems_enabled',
|
||||
'pargar_api_token', 'pargar_password', 'pargar_username',
|
||||
'pargar_item_id_rial', 'pargar_item_id_gold',
|
||||
|
||||
Reference in New Issue
Block a user