added fund
This commit is contained in:
@@ -46,6 +46,9 @@ export const customerDirectSmsEnabledSetting = ref(false)
|
||||
/** reactive — منو و UI سفارش شرطی (ادمین + کنترلهای مشتری) */
|
||||
export const conditionalOrderEnabledSetting = ref(false)
|
||||
|
||||
/** reactive — قلک per-product در اپ مشتری */
|
||||
export const productFundsEnabledSetting = ref(false)
|
||||
|
||||
/** reactive — منو و UI هشدار قیمت */
|
||||
export const priceTriggerEnabledSetting = ref(false)
|
||||
|
||||
@@ -144,6 +147,10 @@ export function setConditionalOrderEnabledFromSettings(value: boolean): void {
|
||||
conditionalOrderEnabledSetting.value = value
|
||||
}
|
||||
|
||||
export function setProductFundsEnabledFromSettings(value: boolean): void {
|
||||
productFundsEnabledSetting.value = value
|
||||
}
|
||||
|
||||
export function setPriceTriggerEnabledFromSettings(value: boolean): void {
|
||||
priceTriggerEnabledSetting.value = value
|
||||
}
|
||||
@@ -236,6 +243,13 @@ export function applyConditionalOrderEnabledFromRows(
|
||||
if (row) setConditionalOrderEnabledFromSettings(isSwitchOn(row.value))
|
||||
}
|
||||
|
||||
export function applyProductFundsEnabledFromRows(
|
||||
rows: Array<{ key?: string; value?: string | null }>
|
||||
) {
|
||||
const row = rows.find((item) => item.key === 'enable_product_funds')
|
||||
if (row) setProductFundsEnabledFromSettings(isSwitchOn(row.value))
|
||||
}
|
||||
|
||||
export function applyPriceTriggerEnabledFromRows(
|
||||
rows: Array<{ key?: string; value?: string | null }>
|
||||
) {
|
||||
@@ -276,6 +290,7 @@ async function bootstrapSettingsFromApi(): Promise<void> {
|
||||
applyTrackingSystemsEnabledFromRows(list)
|
||||
applyCustomerDirectSmsFromRows(list)
|
||||
applyConditionalOrderEnabledFromRows(list)
|
||||
applyProductFundsEnabledFromRows(list)
|
||||
applyPriceTriggerEnabledFromRows(list)
|
||||
applyAppNotificationEnabledFromRows(list)
|
||||
applySupportChatMenuEnabledFromRows(list)
|
||||
|
||||
Reference in New Issue
Block a user