34 lines
950 B
Vue
34 lines
950 B
Vue
<script setup>
|
|
import { computed } from 'vue';
|
|
import { useI18n } from 'vue-i18n';
|
|
import { useRoute } from 'vue-router';
|
|
import VnCard from 'components/common/VnCard.vue';
|
|
import RoleDescriptor from './RoleDescriptor.vue';
|
|
|
|
const { t } = useI18n();
|
|
const route = useRoute();
|
|
|
|
const routeName = computed(() => route.name);
|
|
const customRouteRedirectName = computed(() => routeName.value);
|
|
const searchBarDataKeys = {
|
|
RoleSummary: 'RoleSummary',
|
|
RoleBasicData: 'RoleBasicData',
|
|
SubRoles: 'SubRoles',
|
|
InheritedRoles: 'InheritedRoles',
|
|
RoleLog: 'RoleLog',
|
|
};
|
|
</script>
|
|
<template>
|
|
<VnCard
|
|
data-key="Role"
|
|
:descriptor="RoleDescriptor"
|
|
:search-data-key="searchBarDataKeys[routeName]"
|
|
:searchbarProps="{
|
|
redirect: !!customRouteRedirectName,
|
|
customRouteRedirectName,
|
|
label: t('role.searchRoles'),
|
|
info: t('role.searchInfo'),
|
|
}"
|
|
/>
|
|
</template>
|