保誠-保戶業務員媒合平台
Mila
2022-01-17 8ece1a33dd0776e8a3cc94d3ac4faf8c6f7ff03c
PAMapp/middleware/errorRouteMiddleware.ts
@@ -1,9 +1,9 @@
import { Middleware } from '@nuxt/types';
import { Role } from '~/assets/ts/models/enum/Role';
const errorRouteMiddleware: Middleware = (context) => {
  if (!context.route.name) {
    if (context.store.getters['localStorage/currentRole'] === Role.ADMIN) {
    const isAdminLogin = context.store.getters['localStorage/isAdminLogin'];
    if (isAdminLogin) {
      context.redirect('/myAppointmentList/appointmentList');
      return;
    }