Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Baakoma committed Oct 28, 2024
1 parent a6c8069 commit b46fec8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion resources/js/Shared/Layout/UserLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,42 @@
import InertiaLink from '@/Shared/InertiaLink.vue'
import AppLayout from '@/Shared/Layout/AppLayout.vue'
import { computed } from 'vue'
import { useGlobalProps } from '@/Composables/useGlobalProps.js'
const props = defineProps({
user: Object,
title: String,
})
const { auth } = useGlobalProps()
const pages = computed(() => [
{
name: 'Informacje podstawowe',
href: `/users/${props.user.id}`,
show: true,
},
{
name: 'Edycja danych',
href: `/users/${props.user.id}/edit`,
show: true,
},
{
name: 'Uprawnienia',
href: `/users/${props.user.id}/permissions`,
show: auth.value.can.managePermissions,
},
{
name: 'Historia',
href: `/users/${props.user.id}/history`,
show: true,
},
{
name: 'Wnioski',
href: `/vacation/requests?user=${props.user.id}`,
show: true,
},
])
].filter(item => item.show))
</script>

<template>
Expand Down

0 comments on commit b46fec8

Please sign in to comment.