Skip to content

Commit

Permalink
fix: sidebar: customer portal link (#1153)
Browse files Browse the repository at this point in the history
- do not use hardcoded path
- get path from from `router.resolve`
  • Loading branch information
ssiyad committed May 8, 2023
1 parent 958948a commit 0c74102
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion desk/src/components/desk/sidebar/SideBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@
</template>

<script setup lang="ts">
import { useRouter } from "vue-router";
import { useAuthStore } from "@/stores/auth";
import { useKeymapStore } from "@/stores/keymap";
import { useSidebarStore } from "@/stores/sidebar";
import { CUSTOMER_PORTAL_LANDING } from "@/router";
import UserMenu from "./UserMenu.vue";
import LinkGroup from "./LinkGroup.vue";
import IconDashboard from "~icons/espresso/dashboard";
Expand All @@ -32,6 +34,7 @@ import IconKnowledgeBaseSolid from "~icons/espresso/knowledge-base-solid";
import IconSettings from "~icons/espresso/settings";
import IconSettingsSolid from "~icons/espresso/settings-solid";
const router = useRouter();
const authStore = useAuthStore();
const keymapStore = useKeymapStore();
const sidebarStore = useSidebarStore();
Expand Down Expand Up @@ -88,7 +91,8 @@ const profileSettings = [
label: "Customer portal",
icon: "users",
handler: () => {
window.open("/my-tickets", "_blank");
const path = router.resolve({ name: CUSTOMER_PORTAL_LANDING });
window.open(path.href, "_blank");
},
},
{
Expand Down

0 comments on commit 0c74102

Please sign in to comment.