fix: conditional show/hide settings subscription section
This commit is contained in:
parent
2d7032f4ed
commit
fb6246e1f2
@ -81,6 +81,7 @@ const tabs = computed(() => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: __('Subscription'),
|
label: __('Subscription'),
|
||||||
|
condition: () => window.subscription_conf,
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
label: 'Plans',
|
label: 'Plans',
|
||||||
@ -117,14 +118,15 @@ const tabs = computed(() => {
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
return _tabs.map((tab) => {
|
return _tabs.filter((tab) => {
|
||||||
tab.items = tab.items.filter((item) => {
|
if (tab.condition && !tab.condition()) return false
|
||||||
if (item.condition) {
|
if (tab.items) {
|
||||||
return item.condition()
|
tab.items = tab.items.filter((item) => {
|
||||||
}
|
if (item.condition && !item.condition()) return false
|
||||||
return true
|
return true
|
||||||
})
|
})
|
||||||
return tab
|
}
|
||||||
|
return true
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user