(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-031747b2"],{"2b07":function(e,t,s){},"719c":function(e,t,s){"use strict";s("2b07")},7803:function(e,t,s){"use strict";s.r(t);var a=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"auth-page register"},[s("div",{staticClass:"auth-page__content my-auto"},[s("h1",{staticClass:"logo mb-5"},[e._v("POSIQ")]),s("input-field",{staticClass:"mb-4",attrs:{id:"firstname",type:"text",label:"Firstname"},model:{value:e.firstName,callback:function(t){e.firstName=t},expression:"firstName"}}),s("input-field",{staticClass:"mb-4",attrs:{id:"lastname",type:"text",label:"Lastname"},model:{value:e.lastName,callback:function(t){e.lastName=t},expression:"lastName"}}),s("hr",{staticClass:"mb-4"}),s("input-field",{staticClass:"mb-4",attrs:{id:"username",autocomplete:"off",type:"text",label:"Username"},model:{value:e.username,callback:function(t){e.username=t},expression:"username"}}),s("input-field",{staticClass:"mb-4",attrs:{id:"password",autocomplete:"off",type:"password",label:"Password"},model:{value:e.password,callback:function(t){e.password=t},expression:"password"}}),s("input-field",{staticClass:"mb-4",attrs:{id:"confirmPassword",autocomplete:"off",type:"password",label:"Confirm password"},model:{value:e.confirmPassword,callback:function(t){e.confirmPassword=t},expression:"confirmPassword"}}),s("hr",{staticClass:"mb-4"}),s("input-field",{staticClass:"mb-4",attrs:{id:"imieNumber",type:"text",label:"IMIE-number"},scopedSlots:e._u([{key:"right-label",fn:function(){return[s("span",{staticClass:"action-small"},[e._v("Where can I find it?")])]},proxy:!0}]),model:{value:e.imeiNumber,callback:function(t){e.imeiNumber=t},expression:"imeiNumber"}}),s("hr",{staticClass:"mb-4"}),s("input-field",{staticClass:"mb-4",attrs:{id:"address",type:"text",label:"Address"},model:{value:e.address,callback:function(t){e.address=t},expression:"address"}}),s("input-field",{staticClass:"mb-4",attrs:{id:"zipCode",type:"text",label:"Zipcode"},model:{value:e.zipCode,callback:function(t){e.zipCode=t},expression:"zipCode"}}),s("input-field",{staticClass:"mb-4",attrs:{id:"city",type:"text",label:"City"},model:{value:e.city,callback:function(t){e.city=t},expression:"city"}}),s("input-field",{staticClass:"mb-4",attrs:{id:"country",type:"text",label:"Country"},model:{value:e.country,callback:function(t){e.country=t},expression:"country"}}),s("input-field",{staticClass:"mb-5",attrs:{id:"phone",type:"text",label:"Phone"},model:{value:e.phone,callback:function(t){e.phone=t},expression:"phone"}}),s("app-button",{staticClass:"btn btn--block btn--blue",attrs:{loading:e.loading},on:{click:e.register}},[e._v("Let's do this!")])],1)])},i=[],n=s("1da1"),r=(s("96cf"),s("19c8")),o=s("5c40"),l=s("a789"),c={components:{AppButton:o["a"],InputField:r["a"]},data:function(){return{firstName:"",lastName:"",username:"",password:"",confirmPassword:"",imeiNumber:"",address:"",zipCode:"",city:"",country:"",phone:"",loading:!1}},methods:{validate:function(){return""===this.username?(this.$notify.warning("Username is required!"),!0):""===this.password?(this.$notify.warning("Password is required!"),!0):this.confirmPassword!==this.password?(this.$notify.warning("Confirm password must match password!"),!0):""===this.imeiNumber&&(this.$notify.warning("IMEI number is required!"),!0)},register:function(){var e=this;return Object(n["a"])(regeneratorRuntime.mark((function t(){var s,a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!e.loading){t.next=2;break}return t.abrupt("return");case 2:if(s=e.validate(),!s){t.next=5;break}return t.abrupt("return");case 5:return a={firstname:e.firstname,lastname:e.lastname,username:e.username,password:e.password,password_repeat:e.confirmPassword,imei_number:e.imeiNumber,address:e.address,zipcode:e.zipcode,city:e.city,country:e.country,phone:e.phone},t.prev=6,e.loading=!0,t.next=10,l["a"].signup(a);case 10:return t.next=12,e.$router.push("/login");case 12:t.next=17;break;case 14:t.prev=14,t.t0=t["catch"](6),e.notify.error("Something went wrong!");case 17:return t.prev=17,e.loading=!1,t.finish(17);case 20:case"end":return t.stop()}}),t,null,[[6,14,17,20]])})))()}}},u=c,d=(s("719c"),s("2877")),p=Object(d["a"])(u,a,i,!1,null,"4858c8a4",null);t["default"]=p.exports}}]); //# sourceMappingURL=chunk-031747b2.d951fc31.js.map