added chat 3

This commit is contained in:
2026-07-30 20:43:12 +03:30
parent f4733214ed
commit 3d86b56c7b
3 changed files with 21 additions and 7 deletions
+8 -4
View File
@@ -427,13 +427,17 @@ async function initConfig() {
applyAppNotificationEnabledFromRows(baseData.value)
applyPriceProviderFromRows(baseData.value)
applySupportChatMenuEnabledFromRows(baseData.value)
// در صفحهٔ عادی price_provider (can_edit=0) نیست — از کل تنظیمات بخوان
if (!baseData.value.some((row) => row.key === 'price_provider')) {
// در صفحهٔ عادی price_provider و show_to_users_chat (can_edit=0) نیستند — از کل تنظیمات بخوان
if (
!baseData.value.some((row) => row.key === 'price_provider') ||
!baseData.value.some((row) => row.key === 'show_to_users_chat')
) {
try {
const { getConfiguration } = await import('@/api/configuration')
const all = await getConfiguration()
applyPriceProviderFromRows(Array.isArray(all) ? all : [])
applySupportChatMenuEnabledFromRows(Array.isArray(all) ? all : [])
const rows = Array.isArray(all) ? all : []
applyPriceProviderFromRows(rows)
applySupportChatMenuEnabledFromRows(rows)
} catch {
/* کش قبلی می‌ماند */
}