fixed navbar

This commit is contained in:
2026-07-24 16:10:40 +03:30
parent bd441a0e8e
commit ab83ba7e6a
2 changed files with 38 additions and 28 deletions
+7 -6
View File
@@ -150,42 +150,43 @@ export function setPriceProviderFromSettings(value?: string | null): void {
priceProviderSetting.value = (value ?? '').trim().toLowerCase()
}
/** فقط وقتی کلید در rows باشد آپدیت می‌شود — پاسخ ناقص (editable/system) فلگ قبلی را پاک نکند */
export function applyBannerEnabledFromRows(rows: Array<{ key?: string; value?: string | null }>) {
const row = rows.find((item) => item.key === 'banner_enabled')
setBannerEnabledFromSettings(row ? isSwitchOn(row.value) : false)
if (row) setBannerEnabledFromSettings(isSwitchOn(row.value))
}
export function applyTrackingSystemsEnabledFromRows(
rows: Array<{ key?: string; value?: string | null }>
) {
const row = rows.find((item) => item.key === 'tracking_systems_enabled')
setTrackingSystemsEnabledFromSettings(row ? isSwitchOn(row.value) : false)
if (row) setTrackingSystemsEnabledFromSettings(isSwitchOn(row.value))
}
export function applyCustomerDirectSmsFromRows(rows: Array<{ key?: string; value?: string | null }>) {
const row = rows.find((item) => item.key === 'customer_direct_sms')
setCustomerDirectSmsEnabledFromSettings(row ? isSwitchOn(row.value) : false)
if (row) setCustomerDirectSmsEnabledFromSettings(isSwitchOn(row.value))
}
export function applyConditionalOrderEnabledFromRows(
rows: Array<{ key?: string; value?: string | null }>
) {
const row = rows.find((item) => item.key === 'enable_conditional_order')
setConditionalOrderEnabledFromSettings(row ? isSwitchOn(row.value) : false)
if (row) setConditionalOrderEnabledFromSettings(isSwitchOn(row.value))
}
export function applyPriceTriggerEnabledFromRows(
rows: Array<{ key?: string; value?: string | null }>
) {
const row = rows.find((item) => item.key === 'has_page_price_trigger')
setPriceTriggerEnabledFromSettings(row ? isSwitchOn(row.value) : false)
if (row) setPriceTriggerEnabledFromSettings(isSwitchOn(row.value))
}
export function applyAppNotificationEnabledFromRows(
rows: Array<{ key?: string; value?: string | null }>
) {
const row = rows.find((item) => item.key === 'has_page_notification')
setAppNotificationEnabledFromSettings(row ? isSwitchOn(row.value) : false)
if (row) setAppNotificationEnabledFromSettings(isSwitchOn(row.value))
}
export function applyPriceProviderFromRows(