Add customers gold credit menu with request and active tabs.

Gate the submenu on enable_gold_credit and wire settings UI for SuperAdmin and tenant credit options.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-30 00:17:03 +03:30
co-authored by Cursor
parent 14d2bb603e
commit 084b449177
15 changed files with 1536 additions and 19 deletions
+6 -5
View File
@@ -21,7 +21,7 @@ import { computed } from 'vue'
import BasicMenu from '@/components/BasicMenu/index.vue'
import { useRouterStore } from '@core/stores/router'
import { get } from 'lodash'
import { customerSpecialPricingEnabledSetting, initWalletSettingsFromApi } from '@/utils/config'
import { customerSpecialPricingEnabledSetting, goldCreditEnabledSetting, initWalletSettingsFromApi } from '@/utils/config'
initWalletSettingsFromApi()
@@ -33,10 +33,11 @@ const menu = computed(() => {
meta?: { order?: number }
}>
return [...children]
.filter(
(child) =>
child.name !== 'customerMain_specialPrice' || customerSpecialPricingEnabledSetting.value
)
.filter((child) => {
if (child.name === 'customerMain_specialPrice') return customerSpecialPricingEnabledSetting.value
if (child.name === 'customerMain_goldCredit') return goldCreditEnabledSetting.value
return true
})
.sort((a, b) => (a.meta?.order ?? 99) - (b.meta?.order ?? 99))
})
</script>