var sessionUserEntity = getHttpJson("/app/user/view?userEntityId="+session["userEntityId"]+"&sessionToken="+session["sessionToken"]) ; function dashboardMenu () { document.write(getHttp("/body?name=dashboard&sct=0&v=1637943388000")) ; if (validSessionManager(session)) { document.write(getHttp("/body?name=dashboard&sct=1&v=1637943388000")) ; } document.write(getHttp("/body?name=dashboard&sct=2&v=1637943388000")) ; } function mentorClose (userEntityId, userEntityLabel) { if (confirm("Are you sure you want to close the mentorship for "+userEntityLabel+"?")) $.ajax ( { url: "/app/user/mentorclose", method: "POST", async: false, data: {"sessionToken":session["sessionToken"],"userEntityId":userEntityId}, success: function (data) { if (data["error"]) alert(data["error"]) ; else { window.location = "/dashboard" ; } }, error: function (jqXHR, textStatus, errorThrown) { alert("Failure: "+textStatus+" / "+errorThrown) ; } } ) ; } function companyUserMenu (companyEntity, companyUserEntity) { document.write(getHttp("/body?name=dashboard&sct=3&v=1637943388000")) ;document.write(companyUserEntity["companyEntityId"]) ;document.write(getHttp("/body?name=dashboard&sct=4&v=1637943388000")) ; if (!companyUserEntity["accepted"]&&companyUserEntity["approved"]) { document.write(getHttp("/body?name=dashboard&sct=5&v=1637943388000")) ;document.write(companyEntity["companyEntityId"]) ;document.write(getHttp("/body?name=dashboard&sct=6&v=1637943388000")) ;document.write(companyEntity["companyEntityId"]) ;document.write(getHttp("/body?name=dashboard&sct=7&v=1637943388000")) ; } document.write(getHttp("/body?name=dashboard&sct=8&v=1637943388000")) ; } function eventTypeUserMenu (eventTypeEntity, eventTypeUserEntity) { document.write(getHttp("/body?name=dashboard&sct=9&v=1637943388000")) ;document.write(eventTypeUserEntity["eventTypeEntityId"]) ;document.write(getHttp("/body?name=dashboard&sct=10&v=1637943388000")) ; if (!eventTypeUserEntity["accepted"]&&eventTypeUserEntity["approved"]) { document.write(getHttp("/body?name=dashboard&sct=11&v=1637943388000")) ;document.write(eventTypeEntity["eventTypeEntityId"]) ;document.write(getHttp("/body?name=dashboard&sct=12&v=1637943388000")) ;document.write(eventTypeEntity["eventTypeEntityId"]) ;document.write(getHttp("/body?name=dashboard&sct=13&v=1637943388000")) ; } document.write(getHttp("/body?name=dashboard&sct=14&v=1637943388000")) ; } function eventUserMenu (eventEntity, eventUserEntity) { document.write(getHttp("/body?name=dashboard&sct=15&v=1637943388000")) ;document.write(eventUserEntity["eventEntityId"]) ;document.write(getHttp("/body?name=dashboard&sct=16&v=1637943388000")) ; if (!eventUserEntity["accepted"]&&eventUserEntity["approved"]) { document.write(getHttp("/body?name=dashboard&sct=17&v=1637943388000")) ;document.write(eventEntity["eventEntityId"]) ;document.write(getHttp("/body?name=dashboard&sct=18&v=1637943388000")) ;document.write(eventEntity["eventEntityId"]) ;document.write(getHttp("/body?name=dashboard&sct=19&v=1637943388000")) ; } document.write(getHttp("/body?name=dashboard&sct=20&v=1637943388000")) ; } if (!validSession(session)) signinPage() ; else if ((pathname==null||pathname=="/dashboard")&&validUser(sessionUserEntity)) { document.write(getHttp("/body?name=dashboard&sct=21&v=1637943388000")) ; dashboardMenu() ; if (sessionUserEntity["mentorUserEntityId"]) { var mentorUserEntity = getHttpJson("/app/user/view?userEntityId="+sessionUserEntity["mentorUserEntityId"]+"&sessionToken="+session["sessionToken"]) ; document.write(getHttp("/body?name=dashboard&sct=22&v=1637943388000")) ;document.write(mentorUserEntity["mentorUserEntityId"]) ;document.write(getHttp("/body?name=dashboard&sct=23&v=1637943388000")) ;document.write(mentorUserEntity["label"]) ;document.write(getHttp("/body?name=dashboard&sct=24&v=1637943388000")) ; } var eventUserEntityList = getHttpJson("/app/user/event/list?criteria=future&userEntityId="+session["userEntityId"]+"&sessionToken="+session["sessionToken"]) ; if (eventUserEntityList.length>0) { document.write(getHttp("/body?name=dashboard&sct=25&v=1637943388000")) ; for (i=0 ; i<10&&i10) { document.write(getHttp("/body?name=dashboard&sct=40&v=1637943388000")) ; } document.write(getHttp("/body?name=dashboard&sct=41&v=1637943388000")) ; } var eventTypeUserEntityList = getHttpJson("/app/user/eventtype/list?criteria=all&userEntityId="+session["userEntityId"]+"&sessionToken="+session["sessionToken"]) ; if (eventTypeUserEntityList.length>0) { document.write(getHttp("/body?name=dashboard&sct=42&v=1637943388000")) ; for (i=0 ; i<10&&i10) { document.write(getHttp("/body?name=dashboard&sct=55&v=1637943388000")) ; } document.write(getHttp("/body?name=dashboard&sct=56&v=1637943388000")) ; } var companyUserEntityList = getHttpJson("/app/user/company/list?criteria=all&userEntityId="+session["userEntityId"]+"&sessionToken="+session["sessionToken"]) ; if (companyUserEntityList.length>0) { document.write(getHttp("/body?name=dashboard&sct=57&v=1637943388000")) ; for (i=0 ; i<10&&i10) { document.write(getHttp("/body?name=dashboard&sct=71&v=1637943388000")) ; } document.write(getHttp("/body?name=dashboard&sct=72&v=1637943388000")) ; } var mentorUserEntityList = getHttpJson("/app/user/mentor/list?userEntityId="+session["userEntityId"]+"&sessionToken="+session["sessionToken"]) ; if (mentorUserEntityList.length>0) { document.write(getHttp("/body?name=dashboard&sct=73&v=1637943388000")) ; for (i=0 ; i<10&&i10) { document.write(getHttp("/body?name=dashboard&sct=79&v=1637943388000")) ; } document.write(getHttp("/body?name=dashboard&sct=80&v=1637943388000")) ; } document.write(getHttp("/body?name=dashboard&sct=81&v=1637943388000")) ; } else if (pathname=="/dashboard/company"||pathname=="/dashboard/company/list") { document.write(getHttp("/body?name=dashboard&sct=82&v=1637943388000")) ; dashboardMenu() ; var page = parseInt(getQueryParameter("page")) ; if (isNaN(page)) page = 0 ; var criteria = getQueryParameter("criteria") ; var companyUserEntityList = getHttpJson("/app/user/company/list?page="+page+"&criteria=all&userEntityId="+session["userEntityId"]+"&sessionToken="+session["sessionToken"]) ; document.write(getHttp("/body?name=dashboard&sct=83&v=1637943388000")) ; for (i=0 ; i<10&&i0) { document.write(getHttp("/body?name=dashboard&sct=97&v=1637943388000")) ;document.write(page-1) ;document.write(criteria?("&criteria="+criteria):"") ;document.write(getHttp("/body?name=dashboard&sct=98&v=1637943388000")) ; } if (companyUserEntityList.length>10) { document.write(getHttp("/body?name=dashboard&sct=99&v=1637943388000")) ;document.write(page+1) ;document.write(criteria?("&criteria="+criteria):"") ;document.write(getHttp("/body?name=dashboard&sct=100&v=1637943388000")) ; } document.write(getHttp("/body?name=dashboard&sct=101&v=1637943388000")) ; } else if (pathname=="/dashboard/eventtype"||pathname=="/dashboard/eventtype/list") { document.write(getHttp("/body?name=dashboard&sct=102&v=1637943388000")) ; dashboardMenu() ; var page = parseInt(getQueryParameter("page")) ; if (isNaN(page)) page = 0 ; var criteria = getQueryParameter("criteria") ; var eventTypeUserEntityList = getHttpJson("/app/user/eventtype/list?page="+page+"&criteria=all&userEntityId="+session["userEntityId"]+"&sessionToken="+session["sessionToken"]) ; document.write(getHttp("/body?name=dashboard&sct=103&v=1637943388000")) ; for (i=0 ; i<10&&i0) { document.write(getHttp("/body?name=dashboard&sct=114&v=1637943388000")) ;document.write(page-1) ;document.write(criteria?("&criteria="+criteria):"") ;document.write(getHttp("/body?name=dashboard&sct=115&v=1637943388000")) ; } if (eventTypeUserEntityList.length>10) { document.write(getHttp("/body?name=dashboard&sct=116&v=1637943388000")) ;document.write(page+1) ;document.write(criteria?("&criteria="+criteria):"") ;document.write(getHttp("/body?name=dashboard&sct=117&v=1637943388000")) ; } document.write(getHttp("/body?name=dashboard&sct=118&v=1637943388000")) ; } else if (pathname=="/dashboard/event"||pathname=="/dashboard/event/list") { document.write(getHttp("/body?name=dashboard&sct=119&v=1637943388000")) ; dashboardMenu() ; var page = parseInt(getQueryParameter("page")) ; if (isNaN(page)) page = 0 ; var criteria = getQueryParameter("criteria") ; var eventUserEntityList = getHttpJson("/app/user/event/list?page="+page+(criteria?("&criteria="+criteria):"")+"&userEntityId="+session["userEntityId"]+"&sessionToken="+session["sessionToken"]) ; document.write(getHttp("/body?name=dashboard&sct=120&v=1637943388000")) ; for (i=0 ; i<10&&i0) { document.write(getHttp("/body?name=dashboard&sct=134&v=1637943388000")) ;document.write(page-1) ;document.write(criteria?("&criteria="+criteria):"") ;document.write(getHttp("/body?name=dashboard&sct=135&v=1637943388000")) ; } if (eventUserEntityList.length>10) { document.write(getHttp("/body?name=dashboard&sct=136&v=1637943388000")) ;document.write(page+1) ;document.write(criteria?("&criteria="+criteria):"") ;document.write(getHttp("/body?name=dashboard&sct=137&v=1637943388000")) ; } document.write(getHttp("/body?name=dashboard&sct=138&v=1637943388000")) ; } else if (pathname=="/dashboard/mentor"||pathname=="/dashboard/mentor/list") { document.write(getHttp("/body?name=dashboard&sct=139&v=1637943388000")) ; dashboardMenu() ; var page = parseInt(getQueryParameter("page")) ; if (isNaN(page)) page = 0 ; var criteria = getQueryParameter("criteria") ; if (getQueryParameter("all")) { var mentorUserEntityList = getHttpJson("/app/user/mentor/list?page="+page+(criteria?("&criteria="+criteria):"")+"&sessionToken="+session["sessionToken"]) ; document.write(getHttp("/body?name=dashboard&sct=140&v=1637943388000")) ; for (i=0 ; i<10&&i0) { document.write(getHttp("/body?name=dashboard&sct=157&v=1637943388000")) ;document.write(page-1) ;document.write(criteria?("&criteria="+criteria):"") ;document.write(getHttp("/body?name=dashboard&sct=158&v=1637943388000")) ; } if (mentorUserEntityList.length>10) { document.write(getHttp("/body?name=dashboard&sct=159&v=1637943388000")) ;document.write(page+1) ;document.write(criteria?("&criteria="+criteria):"") ;document.write(getHttp("/body?name=dashboard&sct=160&v=1637943388000")) ; } } else { var mentorUserEntityList = getHttpJson("/app/user/mentor/list?page="+page+(criteria?("&criteria="+criteria):"")+"&userEntityId="+session["userEntityId"]+"&sessionToken="+session["sessionToken"]) ; document.write(getHttp("/body?name=dashboard&sct=161&v=1637943388000")) ; for (i=0 ; i<10&&i0) { document.write(getHttp("/body?name=dashboard&sct=170&v=1637943388000")) ;document.write(page-1) ;document.write(criteria?("&criteria="+criteria):"") ;document.write(getHttp("/body?name=dashboard&sct=171&v=1637943388000")) ; } if (mentorUserEntityList.length>10) { document.write(getHttp("/body?name=dashboard&sct=172&v=1637943388000")) ;document.write(page+1) ;document.write(criteria?("&criteria="+criteria):"") ;document.write(getHttp("/body?name=dashboard&sct=173&v=1637943388000")) ; } } document.write(getHttp("/body?name=dashboard&sct=174&v=1637943388000")) ; } else if (pathname=="/dashboard/mentor/assign") { var userEntity = getHttpJson("/app/user/view?userEntityId="+getQueryParameter("userEntityId")+"&sessionToken="+session["sessionToken"]) ; document.write(getHttp("/body?name=dashboard&sct=175&v=1637943388000")) ;document.write(userEntity["label"]) ;document.write(getHttp("/body?name=dashboard&sct=176&v=1637943388000")) ; dashboardMenu() ; document.write(getHttp("/body?name=dashboard&sct=177&v=1637943388000")) ;document.write(session["sessionToken"]) ;document.write(getHttp("/body?name=dashboard&sct=178&v=1637943388000")) ;document.write(userEntity["userEntityId"]) ;document.write(getHttp("/body?name=dashboard&sct=179&v=1637943388000")) ; var userEntityList = getHttpJson("/app/user/list?criteria=mentor&page=-1&sessionToken="+session["sessionToken"]) ; document.write(getHttp("/body?name=dashboard&sct=180&v=1637943388000")) ; for (var i=0 ; i"+data["error"]) ; else { window.location = "/user/view?userEntityId="+data["userEntityId"] ; } }, error: function (jqXHR, textStatus, errorThrown) { $("#mentorAssignFormMessage").html("

Failure: "+textStatus+" / "+errorThrown) ; } } ) ; } ) ; } else errorPage() ;