|
|
@ -3,7 +3,17 @@ import { storeToRefs, useViewsStore } from '#imports' |
|
|
|
|
|
|
|
|
|
|
|
const { openedViewsTab, activeView } = storeToRefs(useViewsStore()) |
|
|
|
const { openedViewsTab, activeView } = storeToRefs(useViewsStore()) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const { isUIAllowed } = useRoles() |
|
|
|
|
|
|
|
|
|
|
|
const { onViewsTabChange } = useViewsStore() |
|
|
|
const { onViewsTabChange } = useViewsStore() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const onClickDetails = () => { |
|
|
|
|
|
|
|
if (isUIAllowed('fieldAdd')) { |
|
|
|
|
|
|
|
onViewsTabChange('field') |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
onViewsTabChange('relation') |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<template> |
|
|
|
<template> |
|
|
@ -26,7 +36,7 @@ const { onViewsTabChange } = useViewsStore() |
|
|
|
:class="{ |
|
|
|
:class="{ |
|
|
|
active: openedViewsTab !== 'view', |
|
|
|
active: openedViewsTab !== 'view', |
|
|
|
}" |
|
|
|
}" |
|
|
|
@click="onViewsTabChange('field')" |
|
|
|
@click="onClickDetails" |
|
|
|
> |
|
|
|
> |
|
|
|
<GeneralIcon |
|
|
|
<GeneralIcon |
|
|
|
icon="erd" |
|
|
|
icon="erd" |
|
|
|