保誠-保戶業務員媒合平台
Tomas
2022-08-24 3b7c219a10fe0d3d4c9182cbcbc5cf05eb426f97
PAMapp/middleware/isLogin.ts
@@ -25,7 +25,7 @@
            context.redirect('/');
        }
    } else if(isAdminLogin) {
        const agentFunctions = ['notification', 'agentInfo-agentNo', 'agentInfo-edit-agentNo', 'record', 'myAppointmentList-appointmentList', 'myAppointmentList-contactedList', 'myAppointmentList-closedList', 'appointment-appointmentId', 'appointment-appointmentId-close', ...noNeedLoginFunctionList];
        const agentFunctions = ['notification', 'agentInfo-agentNo', 'agentInfo-edit-agentNo', 'record', 'myAppointmentList-appointmentList', 'myAppointmentList-contactedList', 'myAppointmentList-closedList', 'appointment-appointmentId', 'appointment-appointmentId-close', 'appointment-appointmentId-interview-new', ...noNeedLoginFunctionList];
        const routeNeedAgentLogin = !(agentFunctions.some((routeName) => routeName === currentRouteName));
        if (routeNeedAgentLogin) {
            context.redirect('/');