text: sap.ui.define(["jquery.sap.global","sap/ui/core/mvc/Controller","sap/m/Popover","sap/m/Button","sap/m/MessageToast"],function(e,t,o,s,a){"use strict";return t.extend("com.limscloud.app.controller.login",{onInit:function(){this.addAllCSS();this.addDynamicContent()},_tryLogin:function(e){var t=this;t.getOwnerComponent().getRouter().navTo("Dashboard",{itemId:"devLogin"});var o=this.getView();var s=o.byId("inUser").getValue(),n=o.byId("inPass").getValue(),i="https://abhi4api.herokuapp.com/authentication",r={};r.strategy="local";r.email=s;r.password=n;var d=false;this.accessToken="";$.ajax({type:"POST",url:i,dataType:"json",crossDomain:true,data:r,success:function(e){t.accessToken=e.accessToken;a.show(t.accessToken);d=true;t.getOwnerComponent().getRouter().navTo("Dashboard",{itemId:t.accessToken})},error:function(e){a.show("Error!  "+e.status)},complete:function(){if(!d){a.show("Your username/password seems to be incorrect!")}}})},toDashboard:function(){this.getOwnerComponent().getRouter().navTo("Dashboard")},addDynamicContent:function(){var e=this.getView().byId("loginFooter");e.setText("Made with ❤ in UI5 + Node.js")},addAllCSS:function(){var e=this.getView().byId("loginHeader");var t=this.getView().byId("loginBoxFlex");var o=this.getView().byId("loginBox");var s=this.getView().byId("signButton");var a=this.getView().byId("noSignButton");var n=this.getView().byId("loginFooter");e.addStyleClass("loginHeader");t.addStyleClass("shellCustom-BG");o.addStyleClass("shellCustom");s.addStyleClass("buttonLoginBox");a.addStyleClass("buttonLoginBox");n.addStyleClass("footerLoginBox")}})});