|
@@ -1,7 +1,8 @@
|
|
|
import { defineStore } from 'pinia'
|
|
import { defineStore } from 'pinia'
|
|
|
|
|
|
|
|
interface Route {
|
|
interface Route {
|
|
|
- label: string
|
|
|
|
|
|
|
+ breadName: string
|
|
|
|
|
+
|
|
|
path: string
|
|
path: string
|
|
|
query?: string
|
|
query?: string
|
|
|
}
|
|
}
|
|
@@ -43,44 +44,49 @@ export const useBreadCrumb = defineStore('breadCrumb', {
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
if (toRoute.name === 'Destination Create New Rule') {
|
|
if (toRoute.name === 'Destination Create New Rule') {
|
|
|
- let label = ''
|
|
|
|
|
|
|
+ let breadName = ''
|
|
|
if (toRoute.query.a != undefined) {
|
|
if (toRoute.query.a != undefined) {
|
|
|
- label = 'Modify Rule'
|
|
|
|
|
|
|
+ breadName = 'Modify Rule'
|
|
|
} else {
|
|
} else {
|
|
|
- label = 'Create New Rule'
|
|
|
|
|
|
|
+ breadName = 'Create New Rule'
|
|
|
}
|
|
}
|
|
|
this.routeList = [
|
|
this.routeList = [
|
|
|
{
|
|
{
|
|
|
|
|
+ breadName: 'Destination Delivery',
|
|
|
label: 'Destination Delivery',
|
|
label: 'Destination Delivery',
|
|
|
path: '/destination-delivery',
|
|
path: '/destination-delivery',
|
|
|
query: ''
|
|
query: ''
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
|
|
+ breadName: 'Configurations',
|
|
|
label: 'Configurations',
|
|
label: 'Configurations',
|
|
|
path: '/destination-delivery/configurations',
|
|
path: '/destination-delivery/configurations',
|
|
|
query: ''
|
|
query: ''
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- label: label,
|
|
|
|
|
|
|
+ breadName: breadName,
|
|
|
|
|
+ label: toRoute.name,
|
|
|
path: '/destination-delivery/create-new-rule',
|
|
path: '/destination-delivery/create-new-rule',
|
|
|
query: toRoute.query
|
|
query: toRoute.query
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
|
} else if (toRoute.name === 'Create New Booking') {
|
|
} else if (toRoute.name === 'Create New Booking') {
|
|
|
- let label = ''
|
|
|
|
|
|
|
+ let breadName = ''
|
|
|
if (toRoute.query.a != undefined) {
|
|
if (toRoute.query.a != undefined) {
|
|
|
- label = 'Modify Booking'
|
|
|
|
|
|
|
+ breadName = 'Modify Booking'
|
|
|
} else {
|
|
} else {
|
|
|
- label = 'Create New Booking'
|
|
|
|
|
|
|
+ breadName = 'Create New Booking'
|
|
|
}
|
|
}
|
|
|
this.routeList = [
|
|
this.routeList = [
|
|
|
{
|
|
{
|
|
|
|
|
+ breadName: 'Destination Delivery',
|
|
|
label: 'Destination Delivery',
|
|
label: 'Destination Delivery',
|
|
|
path: '/destination-delivery',
|
|
path: '/destination-delivery',
|
|
|
query: ''
|
|
query: ''
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- label: label,
|
|
|
|
|
|
|
+ breadName: breadName,
|
|
|
|
|
+ label: toRoute.name,
|
|
|
path: '/destination-delivery/create-new-booking',
|
|
path: '/destination-delivery/create-new-booking',
|
|
|
query: toRoute.query
|
|
query: toRoute.query
|
|
|
}
|
|
}
|
|
@@ -88,7 +94,8 @@ export const useBreadCrumb = defineStore('breadCrumb', {
|
|
|
|
|
|
|
|
} else if (toRoute.name && whiteList.includes(toRoute.name)) {
|
|
} else if (toRoute.name && whiteList.includes(toRoute.name)) {
|
|
|
this.routeList.push({
|
|
this.routeList.push({
|
|
|
- label: toRoute?.meta?.breadName || toRoute.name,
|
|
|
|
|
|
|
+ breadName: toRoute?.meta?.breadName || toRoute.name,
|
|
|
|
|
+ label: toRoute.name,
|
|
|
path: toRoute.path,
|
|
path: toRoute.path,
|
|
|
query: toRoute.query
|
|
query: toRoute.query
|
|
|
})
|
|
})
|
|
@@ -96,6 +103,7 @@ export const useBreadCrumb = defineStore('breadCrumb', {
|
|
|
this.routeList = [
|
|
this.routeList = [
|
|
|
{
|
|
{
|
|
|
label: toRoute.name,
|
|
label: toRoute.name,
|
|
|
|
|
+ breadName: toRoute?.meta?.breadName || toRoute.name,
|
|
|
path: toRoute.path,
|
|
path: toRoute.path,
|
|
|
query: toRoute.query
|
|
query: toRoute.query
|
|
|
}
|
|
}
|