fix: load whatsapp settings only if installed

This commit is contained in:
Shariq Ansari 2024-06-19 14:14:44 +05:30
parent 30532fb1c3
commit d5871b8db2
2 changed files with 10 additions and 6 deletions

View File

@ -92,10 +92,14 @@ const tabs = computed(() => {
},
]
return _tabs.filter((tab) => {
return tab.items.some((item) => {
return item.condition ? item.condition() : true
return _tabs.map((tab) => {
tab.items = tab.items.filter((item) => {
if (item.condition) {
return item.condition()
}
return true
})
return tab
})
})

View File

@ -7,8 +7,8 @@
isCollapsed
? 'w-auto px-0'
: open
? 'w-52 bg-white px-2 shadow-sm'
: 'w-52 px-2 hover:bg-gray-200'
? 'w-52 bg-white px-2 shadow-sm'
: 'w-52 px-2 hover:bg-gray-200'
"
>
<CRMLogo class="size-8 flex-shrink-0 rounded" />
@ -44,7 +44,7 @@
</button>
</template>
</Dropdown>
<SettingsModal v-model="showSettingsModal" />
<SettingsModal v-if="showSettingsModal" v-model="showSettingsModal" />
</template>
<script setup>