| Server IP : 34.87.99.72 / Your IP : 216.73.217.31 Web Server : Apache/2.4.46 (Unix) OpenSSL/1.1.1n System : Linux zlock-bitnami-lamp-prod-v2-vm 4.19.0-16-cloud-amd64 #1 SMP Debian 4.19.181-1 (2021-03-19) x86_64 User : bitnami ( 1000) PHP Version : 7.4.18 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /opt/bitnami/apache/htdocs/app/public/js/ |
Upload File : |
(self.webpackChunk=self.webpackChunk||[]).push([[784],{6399:(t,e,s)=>{"use strict";s.d(e,{v:()=>r});var r={methods:{errorHandler_:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],s=this.errorSeparator_(t,e),r=s.a,a=s.b;return Object.keys(a).length>0&&this.alertErrorMessages_(this.computeErrorMessages_(a)),r},errorSeparator_:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],s="Something Is Not Right. Please Try Again Later.",r={},a={};if(null==t)this.defaultNotify_(s);else if(t.status&&t.data){var i=t.status,n=t.data;if(422==i){var o=n.errors||n.message;Object.keys(o).forEach((function(t){e.includes(t)?r[t]=o[t]:a[t]=o[t]}))}else s=400==i?n.message:s,this.defaultNotify_(s)}else console.error(t);return{a:r,b:a}},defaultNotify_:function(t){return this.$toast.warning(t),null},computeErrorMessages_:function(t){var e=Object.keys(t);if(e.length>0){var s=[];return e.forEach((function(e){s.push(t[e][0])})),s}return[]},alertErrorMessages_:function(t){this.$toast.warning(t.join("<br>"))}}}},4784:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});const r={mixins:[s(6399).v],data:function(){return{title:"Zlock",user:{email:null,password:null},errors:{},error_else:null,isLoading:!1,show_pass:!1}},created:function(){this.$auth.check()&&this.redirectUser(this.$auth.user().role_id)},methods:{login:function(){var t=this;this.errors={},this.error_else=null,this.isLoading=!0,this.$auth.login({data:{email:this.user.email,password:this.user.password,device_name:"web",platform:"web"},staySignedIn:!0,fetchUser:!0}).then((function(e){t.redirectUser(e.data.result.user.role_id)})).catch((function(e){t.errors=t.errorHandler_(e,["email","password"])})).finally((function(){t.isLoading=!1}))},redirectUser:function(){this.$router.push("home")}}};const a=(0,s(1900).Z)(r,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"fill-height"},[s("div",{staticClass:"rounded-banner primary elevation-1",style:(t.$vuetify.breakpoint.mdAndUp,"height: 55vh")}),t._v(" "),s("v-container",{staticClass:"text-center justify-center fill-height"},[s("v-row",{staticClass:"px-3",staticStyle:{"z-index":"1"},attrs:{justify:"center",dense:""}},[s("v-col",{attrs:{cols:"12",md:"8"}},[s("div",{staticClass:"py-1 px-6 mb-3 white--text",staticStyle:{"letter-spacing":"2px","font-size":"30px"}},[s("span",[t._v(t._s(t.title))])]),t._v(" "),s("v-card",{staticClass:"radius-05",attrs:{width:"100%"}},[s("v-card-title",{staticClass:"font-weight-bold justify-center",class:t.$vuetify.breakpoint.mdAndUp?"":"body-1"},[s("span",[t._v("Login")])]),t._v(" "),s("v-divider"),t._v(" "),s("v-card-text",{staticClass:"pa-6"},[s("v-text-field",{attrs:{label:"Email",placeholder:"Enter Email","prepend-icon":"mdi-account","error-messages":t.errors.email},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.$refs.password.focus()}},model:{value:t.user.email,callback:function(e){t.$set(t.user,"email",e)},expression:"user.email"}}),t._v(" "),s("v-text-field",{ref:"password",attrs:{type:t.show_pass?"text":"password",label:"Password",placeholder:"Enter Password","prepend-icon":"mdi-lock","error-messages":t.errors.password},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.login()}},scopedSlots:t._u([{key:"append",fn:function(){return[s("v-btn",{attrs:{small:"",icon:""},on:{click:function(e){t.show_pass=!t.show_pass}}},[s("v-icon",{attrs:{small:""}},[t._v(t._s(t.show_pass?"mdi-eye-off":"mdi-eye"))])],1)]},proxy:!0}]),model:{value:t.user.password,callback:function(e){t.$set(t.user,"password",e)},expression:"user.password"}})],1),t._v(" "),s("div",{staticClass:"caption error--text font-italic px-10"},[t._v("\n\t\t\t\t\t\t"+t._s(t.error_else)+"\n\t\t\t\t\t")]),t._v(" "),s("v-card-actions",{staticClass:"pa-6 pt-3"},[s("v-btn",{attrs:{rounded:"",block:"",color:"primary",loading:t.isLoading},on:{click:function(e){return t.login()}}},[t._v("\n\t\t\t\t\t\t\tLogin\n\t\t\t\t\t\t")])],1)],1),t._v(" "),s("div",{staticClass:"py-6"},[s("router-link",{staticClass:"body-2",attrs:{to:"/forgot-password"}},[t._v("Forgot password?")])],1)],1)],1)],1)],1)}),[],!1,null,null,null).exports}}]);