2019-03-18 08:53:00 -03:00
|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
<div class="mb-4">
|
|
|
|
<inertia-link class="flex items-center group py-3" :href="route('dashboard')">
|
2019-05-19 00:11:22 -03:00
|
|
|
<icon name="dashboard" class="w-4 h-4 mr-2" :class="isUrl('') ? 'fill-white' : 'fill-indigo-400 group-hover:fill-white'" />
|
2019-05-22 12:39:26 -03:00
|
|
|
<div :class="isUrl('') ? 'text-white' : 'text-indigo-300 group-hover:text-white'">Dashboard</div>
|
2019-03-18 08:53:00 -03:00
|
|
|
</inertia-link>
|
|
|
|
</div>
|
|
|
|
<div class="mb-4">
|
|
|
|
<inertia-link class="flex items-center group py-3" :href="route('organizations')">
|
2019-05-19 00:11:22 -03:00
|
|
|
<icon name="office" class="w-4 h-4 mr-2" :class="isUrl('organizations') ? 'fill-white' : 'fill-indigo-400 group-hover:fill-white'" />
|
2019-05-22 12:39:26 -03:00
|
|
|
<div :class="isUrl('organizations') ? 'text-white' : 'text-indigo-300 group-hover:text-white'">Organizations</div>
|
2019-03-18 08:53:00 -03:00
|
|
|
</inertia-link>
|
|
|
|
</div>
|
|
|
|
<div class="mb-4">
|
|
|
|
<inertia-link class="flex items-center group py-3" :href="route('contacts')">
|
2019-05-19 00:11:22 -03:00
|
|
|
<icon name="users" class="w-4 h-4 mr-2" :class="isUrl('contacts') ? 'fill-white' : 'fill-indigo-400 group-hover:fill-white'" />
|
2019-05-22 12:39:26 -03:00
|
|
|
<div :class="isUrl('contacts') ? 'text-white' : 'text-indigo-300 group-hover:text-white'">Contacts</div>
|
2019-03-18 08:53:00 -03:00
|
|
|
</inertia-link>
|
|
|
|
</div>
|
|
|
|
<div class="mb-4">
|
|
|
|
<inertia-link class="flex items-center group py-3" :href="route('reports')">
|
2019-05-19 00:11:22 -03:00
|
|
|
<icon name="printer" class="w-4 h-4 mr-2" :class="isUrl('reports') ? 'fill-white' : 'fill-indigo-400 group-hover:fill-white'" />
|
2019-05-22 12:39:26 -03:00
|
|
|
<div :class="isUrl('reports') ? 'text-white' : 'text-indigo-300 group-hover:text-white'">Reports</div>
|
2019-03-18 08:53:00 -03:00
|
|
|
</inertia-link>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import Icon from '@/Shared/Icon'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
Icon,
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
isUrl(...urls) {
|
2020-12-22 14:19:09 -03:00
|
|
|
let currentUrl = this.$page.url.substr(1)
|
|
|
|
|
2019-03-18 08:53:00 -03:00
|
|
|
if (urls[0] === '') {
|
2020-12-22 14:19:09 -03:00
|
|
|
return currentUrl === ''
|
2019-03-18 08:53:00 -03:00
|
|
|
}
|
|
|
|
|
2020-12-22 14:19:09 -03:00
|
|
|
return urls.filter(url => currentUrl.startsWith(url)).length
|
2019-03-18 08:53:00 -03:00
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
</script>
|