Files
solidtime/resources/js/Components/Common/Reporting/ReportingTabNavbar.vue
Gregor Vostrak e78a551098 refactor to shadcn components, dynamically load extension frontend
add jetstream permissions, add dynamic inertia module loading, add shadcn components, change modals and dropdowns to shadcn dismissable layer,
2025-04-23 14:33:32 +02:00

38 lines
1012 B
Vue

<script setup lang="ts">
import { router } from '@inertiajs/vue3';
import TabBar from '@/Components/Common/TabBar/TabBar.vue';
import TabBarItem from '@/Components/Common/TabBar/TabBarItem.vue';
import {canViewReport} from "@/utils/permissions";
import {computed} from "vue";
defineProps<{
active: 'reporting' | 'detailed' | 'shared';
}>();
const showSharedReports = computed(() => canViewReport());
</script>
<template>
<TabBar
:model-value="active"
>
<TabBarItem
value="reporting"
@click="router.visit(route('reporting'))"
>Overview</TabBarItem
>
<TabBarItem
value="detailed"
@click="router.visit(route('reporting.detailed'))"
>Detailed</TabBarItem
>
<TabBarItem
v-if="showSharedReports"
value="shared"
@click="router.visit(route('reporting.shared'))"
>Shared</TabBarItem
>
</TabBar>
</template>
<style scoped></style>