(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7280f99d"],{2613:function(t,a,e){t.exports=e.p+"img/photo-long-3.f4e38da9.jpg"},"2bf5":function(t,a,e){t.exports=e.p+"img/bwa-inovasiwakaf.1c464355.png"},"57f8":function(t,a,e){},b9ed:function(t,a,e){t.exports=e.p+"img/photo-wide-6.ab5dcacd.png"},d70a:function(t,a,e){"use strict";e("57f8")},f6ee:function(t,a,e){"use strict";e.r(a);var s=function(){var t=this,a=t._self._c;return a("div",{staticClass:"auth-layout-wrap",style:{backgroundImage:"url("+t.bgImage+")"}},[a("div",{staticClass:"auth-content"},[a("div",{staticClass:"card o-hidden"},[a("div",{staticClass:"row"},[a("div",{staticClass:"col-md-12"},[a("div",{staticClass:"p-4"},[a("div",{staticClass:"auth-logo text-center mb-30"},[a("img",{attrs:{src:t.logo}})]),a("h1",{staticClass:"mb-3 text-18"},[t._v("Sign In")]),a("b-form",{on:{submit:function(a){return a.preventDefault(),t.formSubmit.apply(null,arguments)}}},[a("b-form-group",{staticClass:"text-12",attrs:{label:"Email Address"}},[a("b-form-input",{staticClass:"form-control-rounded",attrs:{type:"text",placeholder:"E-mail Address",email:"",required:""},model:{value:t.email,callback:function(a){t.email=a},expression:"email"}})],1),a("b-form-group",{staticClass:"text-12",attrs:{label:"Password"}},[a("b-form-input",{staticClass:"form-control-rounded",attrs:{placeholder:"Password",type:"password"},model:{value:t.password,callback:function(a){t.password=a},expression:"password"}})],1),a("b-button",{staticClass:"btn-rounded btn-block mt-2",attrs:{type:"submit",tag:"button",variant:"primary mt-2",disabled:t.loading}},[t._v("Sign In")]),t.loading?t._m(0):t._e()],1),a("div",{staticClass:"mt-3 text-center"},[t._v(" Belum punya akun? "),a("router-link",{staticClass:"text-muted",attrs:{to:"signUp",tag:"a"}},[a("u",[t._v("Registrasi Akun")])])],1),a("div",{staticClass:"mt-3 text-center"},[a("router-link",{staticClass:"text-muted",attrs:{to:"forgot",tag:"a"}},[a("u",[t._v("Forgot Password?")])])],1)],1)])])])])])},o=[function(){var t=this,a=t._self._c;return a("div",{staticClass:"typo__p"},[a("div",{staticClass:"spinner sm spinner-primary mt-3"})])}],n=(e("14d9"),e("e9c4"),{metaInfo:{title:"SignIn"},data:function(){return{loading:!1,email:"",password:"",bgImage:e("b9ed"),logo:e("2bf5"),signInImage:e("2613")}},watch:{"$route.query.access_token":{handler:function(t){if(t){var a={access_token:t};this.storeAccessToken(a)}},immediate:!0}},methods:{storeAccessToken:function(t){var a=this;this.loading=!0,this.$store.dispatch("getAccountData",t.access_token).then((function(e){a.$store.dispatch("saveTokens",{tokens:t,accountData:JSON.stringify(e),isLocalLogin:!1}).then((function(){a.loading=!1,a.$router.push(void 0!==a.$route.query.redirect?a.$route.query.redirect:"/").then((function(){localStorage.getItem("updateProfile")||"AE"!==a.$store.getters.accountData.role&&"AR"!==a.$store.getters.accountData.role||null!==a.$store.getters["accountData"].detail.first_name&&null!==a.$store.getters["accountData"].detail.last_name&&null!==a.$store.getters["accountData"].detail.bank_name&&null!==a.$store.getters["accountData"].detail.bank_account_number&&null!==a.$store.getters["accountData"].detail.kecamatan&&null!==a.$store.getters["accountData"].detail.kelurahan&&null!==a.$store.getters["accountData"].detail.kota&&null!==a.$store.getters["accountData"].detail.kode_pos&&null!==a.$store.getters["accountData"].detail.phone_number&&null!==a.$store.getters["accountData"].detail.provinsi&&null!==a.$store.getters["accountData"].detail.telp_rumah||localStorage.setItem("updateProfile",!0)}))}))})).catch((function(t){a.loading=!1,a.$store.dispatch("error",t)}))},formSubmit:function(){var t=this;if(this.loading)return!1;this.loading=!0,this.$store.dispatch("login",{username:this.email,password:this.password}).then((function(){t.loading=!1,t.$router.push(void 0!==t.$route.query.redirect?t.$route.query.redirect:"/")})).catch((function(a){console.log(a),t.loading=!1,t.$store.dispatch("error",a)}))}}}),r=n,i=(e("d70a"),e("2877")),l=Object(i["a"])(r,s,o,!1,null,null,null);a["default"]=l.exports}}]);