| | |
| | | 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('/'); |