0

I have a 'x' dashboard. On click on logo in the header bar, I have called a function which have the following functionality:

if(this.isVerifier) {
      this.$router.push({
        name: 'sales-verifier-dashboard',
        params: {
            dropType: 'sales', 
            verifierClaimType: "All" } 
      }).catch(()=>{}) 
} 

=> In the route file, I have defined the route like this :

   {
        path: "/verifier/:dropType/:verifierClaimType",
        name: "sales-verifier-dashboard",
        component: SalesVerifierDashboard,
        meta: {
            requireAuth: true,
            showHeader: true
        }
    },

=> Whenever I click on my logo, the URL is getting changed as expected, but the page is not getting redirected to the Homepage of this component. Actually I have multiple dropdowns which have their own data, which is defined in the same component. I have hardcoded this params, which are basically of my required page(Home).

The URL changes but the page remains at the same state.

  • 1
    Please, provide https://stackoverflow.com/help/mcve . It's unknown what's the context for this code `if(this.isVerifier)`. It's possible that you don't bind route data correctly – Estus Flask Oct 11 '22 at 12:40
  • We have two roles verifier and approver. So this is one of those roles for which we are checking – RAGHAVENDRA DUBEY Oct 11 '22 at 12:47
  • Make sure that you are on the route properly, Vue devtools `routes` tab. If it's active or not, may give us a hint regarding what is not working. Also, try to reproduce the issue incrementally: with a brand new page, with less params etc. Then add things on top of it rather than trying to solve all of it at once. – kissu Oct 12 '22 at 14:20

1 Answers1

0

'verifierClaimType' is missing in params, and because of the 'empty' catch, you are 'masking' the error

Mossaab
  • 66
  • 1