Skip to content

Commit

Permalink
fix(routing): dynamic routing for customer portal
Browse files Browse the repository at this point in the history
  • Loading branch information
RitvikSardana committed Sep 30, 2024
1 parent 14c1c37 commit 3c5b83c
Showing 1 changed file with 39 additions and 22 deletions.
61 changes: 39 additions & 22 deletions desk/src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,39 +81,56 @@ const routes = [
],
},
{
path: "/my-tickets",
path: "",
name: "CustomerRoot",
// component: () => import("@/pages/CLayout.vue"), // old customer portal
component: () => import("@/pages/CustomerPortalRoot.vue"), // new customer portal
component: () => import("@/pages/CustomerPortalRoot.vue"),
meta: {
auth: true,
public: true,
},
children: [
// handle tickets routing
{
path: "",
name: "TicketsCustomer",
component: () => import("@/pages/Tickets.vue"),
meta: {
public: true,
},
},
{
path: "new/:templateId?",
name: "TicketNew",
component: () => import("@/pages/TicketNew.vue"),
props: true,
path: "my-tickets",
meta: {
onSuccessRoute: "TicketCustomer",
parent: "TicketsCustomer",
public: true,
auth: true,
},
children: [
{
path: "",
name: "TicketsCustomer",
component: () => import("@/pages/Tickets.vue"),
meta: {
public: true,
},
},
{
path: "new/:templateId?",
name: "TicketNew",
component: () => import("@/pages/TicketNew.vue"),
props: true,
meta: {
onSuccessRoute: "TicketCustomer",
parent: "TicketsCustomer",
public: true,
},
},
{
path: ":ticketId",
name: "TicketCustomer",
component: () => import("@/pages/TicketCustomer.vue"),
props: true,
meta: {
public: true,
},
},
],
},
{
path: ":ticketId",
name: "TicketCustomer",
component: () => import("@/pages/TicketCustomer.vue"),
props: true,
path: "kb-new",
meta: {
public: true,
auth: true,
},
},
],
Expand Down

0 comments on commit 3c5b83c

Please sign in to comment.