47 lines
1.2 KiB
Vue
47 lines
1.2 KiB
Vue
<script lang="ts" setup>
|
|
/* eslint-disable */
|
|
import { useRoute } from 'vue-router';
|
|
import { computed } from 'vue';
|
|
import { useAuthStore } from 'src/modules/auth/auth-store';
|
|
// import dialogs from 'src/components/dialogs';
|
|
|
|
// const authStore = useAuthStore();
|
|
// const user = authStore.user;
|
|
// const { NotificationsDialog, AccountDialog } = dialogs;
|
|
const route = useRoute();
|
|
const backRoutes = [
|
|
'newUser',
|
|
'userById',
|
|
'timeSheet',
|
|
'timeSheetValidationsId',
|
|
];
|
|
const isBackRoute = computed(
|
|
() => backRoutes.indexOf(route.name as string) !== -1,
|
|
);
|
|
</script>
|
|
|
|
<template>
|
|
<q-toolbar v-if="!isBackRoute">
|
|
<q-toolbar-title>
|
|
<!-- {{ $t('navBar.mobileIndexTitle') }} {{ user.first_name }} -->
|
|
</q-toolbar-title>
|
|
<NotificationsDialog />
|
|
<AccountDialog />
|
|
</q-toolbar>
|
|
<q-toolbar v-else>
|
|
<q-toolbar-title>
|
|
<q-btn
|
|
icon="chevron_left"
|
|
flat
|
|
round
|
|
dense
|
|
color="white"
|
|
@click="$router.go(-1)"
|
|
/>
|
|
</q-toolbar-title>
|
|
<div class="text-h6 text-white">
|
|
{{ $t(`pagesTitles.${route.meta.title}`) }}
|
|
</div>
|
|
<q-space />
|
|
</q-toolbar>
|
|
</template> |