(subModalContinue)
| 366 | } |
| 367 | |
| 368 | var loginNavigate = function (subModalContinue) { |
| 369 | if (window.nextURL) { |
| 370 | window.location.href = window.nextURL |
| 371 | return |
| 372 | } |
| 373 | |
| 374 | if (!me.isAdmin()) { |
| 375 | if (me.isAPIClient()) { |
| 376 | application.router.navigate('/partner-dashboard', { trigger: true }) |
| 377 | } else if (me.isStudent()) { |
| 378 | application.router.navigate('/students', { trigger: true }) |
| 379 | } else if (me.isTeacher()) { |
| 380 | if (me.isSchoolAdmin()) { |
| 381 | // todo: unify? |
| 382 | if (utils.isCodeCombat) { |
| 383 | application.router.navigate('/teachers/licenses', { trigger: true }) |
| 384 | } else { |
| 385 | application.router.navigate('/school-administrator', { trigger: true }) |
| 386 | } |
| 387 | } else { |
| 388 | application.router.navigate('/teachers/classes', { trigger: true }) |
| 389 | } |
| 390 | } else if (me.isParentHome()) { |
| 391 | const routeStr = me.hasNoVerifiedChild() ? '/parents/add-another-child' : '/parents/dashboard' |
| 392 | application.router.navigate(routeStr, { trigger: true }) |
| 393 | } |
| 394 | } else if (subModalContinue) { |
| 395 | storage.save('sub-modal-continue', subModalContinue) |
| 396 | } |
| 397 | |
| 398 | return window.location.reload() |
| 399 | } |
| 400 | |
| 401 | function __guardMethod__ (obj, methodName, transform) { |
| 402 | if (typeof obj !== 'undefined' && obj !== null && typeof obj[methodName] === 'function') { |
no test coverage detected