Skip to content

Commit

Permalink
#1456 fix: Navigation: conditional on Group
Browse files Browse the repository at this point in the history
  • Loading branch information
aqordeon committed Feb 24, 2025
1 parent 011ff68 commit a28c705
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions resources/js/Layouts/Grp/TopBarDropdownScope.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,18 @@ const layout = inject('layout', layoutStructure)
const onClickOrg = async (slug?: string) => {
if (!slug) return
try {
try {
if (!route().current()?.includes('grp.org.')) {
throw new Error('Redirect to dashboard')
}
// const response = await axios.patch(
// route('grp.models.profile.can_visit'), {
// route_name: route().current(),
// route_parameters: route().params
// })
const response = await axios.get(route('grp.profile.can_visit'))
// console.log('response', !!response.data)
if (!!response.data) {
router.visit(route(route().current(), { ...route().params, organisation: slug }))
Expand Down

0 comments on commit a28c705

Please sign in to comment.