mirror of https://github.com/nocodb/nocodb
Pranav C
2 years ago
4 changed files with 45 additions and 68 deletions
@ -1,41 +1,5 @@
|
||||
<script setup lang="ts"> |
||||
import { useUIPermission } from '~/composables/useUIPermission' |
||||
|
||||
const { isUIAllowed } = useUIPermission() |
||||
|
||||
const tabs = [ |
||||
...(isUIAllowed('superAdminUserManagement') |
||||
? [ |
||||
{ label: 'Users', key: 'list' }, |
||||
{ label: 'Settings', key: 'settings' }, |
||||
] |
||||
: []), |
||||
{ label: 'Reset Password', key: 'password-reset' }, |
||||
] |
||||
|
||||
const $route = useRoute() |
||||
|
||||
const selectedTabKey = computed({ |
||||
get() { |
||||
return tabs.find((t) => t.key === $route.params.tabType)?.key ?? tabs[0].key |
||||
}, |
||||
set(val) { |
||||
navigateTo(`/account/users/${val}`) |
||||
}, |
||||
}) |
||||
</script> |
||||
|
||||
<template> |
||||
<div class="h-full overflow-y-scroll scrollbar-thin-dull pt-4"> |
||||
<a-tabs v-model:active-key="selectedTabKey" :open-keys="[]" mode="horizontal" class="nc-auth-tabs"> |
||||
<a-tab-pane v-for="tab of tabs" :key="tab.key" class="select-none"> |
||||
<template #tab> |
||||
<span class="user-management-tab-label"> |
||||
{{ tab.label }} |
||||
</span> |
||||
</template> |
||||
</a-tab-pane> |
||||
</a-tabs> |
||||
<NuxtPage :tab-key="selectedTabKey" /> |
||||
<NuxtPage /> |
||||
</div> |
||||
</template> |
||||
|
@ -0,0 +1,11 @@
|
||||
<template> |
||||
<template v-if="$route.params.nestedPage === 'list'"> |
||||
<LazyAccountUserList /> |
||||
</template> |
||||
<template v-else-if="$route.params.nestedPage === 'settings'"> |
||||
<LazyAccountSignupSettings /> |
||||
</template> |
||||
<template v-else-if="$route.params.nestedPage === 'password-reset'"> |
||||
<LazyAccountResetPassword /> |
||||
</template> |
||||
</template> |
@ -1,19 +0,0 @@
|
||||
<script setup lang="ts"> |
||||
import { defineProps } from '#imports' |
||||
|
||||
const props = defineProps<{ |
||||
tabKey: string |
||||
}>() |
||||
</script> |
||||
|
||||
<template> |
||||
<template v-if="props.tabKey === 'list'"> |
||||
<LazyAccountUserList /> |
||||
</template> |
||||
<template v-else-if="props.tabKey === 'settings'"> |
||||
<LazyAccountSignupSettings /> |
||||
</template> |
||||
<template v-else-if="props.tabKey === 'password-reset'"> |
||||
<LazyAccountResetPassword /> |
||||
</template> |
||||
</template> |
Loading…
Reference in new issue