{"version":3,"sources":["webpack:///./src/website/views/auth/Login.vue?7982","webpack:///./src/website/views/auth/Login.vue","webpack:///./src/website/views/auth/Login.vue?8701","webpack:///./src/website/views/auth/Login.vue?8fd8","webpack:///./src/website/services/AuthService.ts"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","_m","attrs","on","$event","preventDefault","onSubmit","_v","directives","name","rawName","value","user","expression","class","errors","has","domProps","target","composing","$set","_s","first","_e","any","submitted","staticRenderFns","dict","custom","phone","required","password","$validator","localize","validate","then","valid","AuthService","login","response","data","isAuthorized","AuthUser","setToken","$router","push","path","AlertService","sendMessage","catch","error","components","component","post","JSON","stringify","registration","register","verify","ReSendCode","reSendCode","resetPasswordVerify","setPasswordGuest","resetPassword","phoneOrEmail","get","test"],"mappings":"uHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,YAAY,mBAAmB,CAACF,EAAG,MAAM,CAACE,YAAY,mCAAmC,CAACF,EAAG,MAAM,CAACE,YAAY,wBAAwB,CAACF,EAAG,MAAM,CAACE,YAAY,QAAQ,CAACN,EAAIO,GAAG,GAAGH,EAAG,MAAM,CAACE,YAAY,kBAAkB,CAACF,EAAG,MAAM,CAACE,YAAY,8BAA8B,CAACF,EAAG,MAAM,CAACE,YAAY,oBAAoB,CAACF,EAAG,OAAO,CAACI,MAAM,CAAC,aAAe,OAAOC,GAAG,CAAC,OAAS,SAASC,GAAgC,OAAxBA,EAAOC,iBAAwBX,EAAIY,SAASF,MAAW,CAACN,EAAG,MAAM,CAACE,YAAY,cAAc,CAACF,EAAG,QAAQ,CAACE,YAAY,2BAA2BE,MAAM,CAAC,IAAM,KAAK,CAACR,EAAIa,GAAG,iBAAiBT,EAAG,QAAQ,CAACU,WAAW,CAAC,CAACC,KAAK,QAAQC,QAAQ,UAAUC,MAAOjB,EAAIkB,KAAU,MAAEC,WAA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AY,eACd,EACA3D,EACAiC,GACA,EACA,KACA,KACA,MAIa,aAAA0B,E,2CClBf,4BAKe,QACbd,MADa,SACP1B,GACJ,OAAO,OAAYyC,KAAK,OAAQf,MAAOgB,KAAKC,UAAU3C,KAExD4C,aAJa,SAIA5C,GACX,OAAO,OAAYyC,KAAK,OAAQI,SAAUH,KAAKC,UAAU3C,KAE3D8C,OAPa,SAONlB,GACL,OAAO,OAAYa,KAAK,OAAQK,OAAQJ,KAAKC,UAAUf,KAEzDmB,WAVa,SAUFnB,GACT,OAAO,OAAYa,KAAK,OAAQO,WAAYN,KAAKC,UAAUf,KAE7DqB,oBAba,SAaO9B,EAAkBS,GACpC,OAAO,OAAYa,KAAZ,UACF,OAAQQ,oBADN,qBACsC9B,GAC3CuB,KAAKC,UAAUf,KAGnBsB,iBAnBa,SAmBI/B,EAAkBS,GACjC,OAAO,OAAYa,KAAZ,UACF,OAAQS,iBADN,qBACmC/B,GACxCuB,KAAKC,UAAUf,KAGnBuB,cAzBa,SAyBCC,GACZ,OAAO,OAAYC,IACjB,OAAQF,cAAgB,iBAAmBC,IAG/CE,KA9Ba,WA+BX,OAAO,OAAYD,IAAI","file":"js/chunk-36c21b18.f9b69589.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"container-fluid\"},[_c('div',{staticClass:\"row py-4 justify-content-center\"},[_c('div',{staticClass:\"col-lg-6 col-10 mb-5\"},[_c('div',{staticClass:\"card\"},[_vm._m(0),_c('div',{staticClass:\"card-body py-4\"},[_c('div',{staticClass:\"row justify-content-center\"},[_c('div',{staticClass:\"col-lg-10 col-12\"},[_c('form',{attrs:{\"autocomplete\":\"off\"},on:{\"submit\":function($event){$event.preventDefault();return _vm.onSubmit($event)}}},[_c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"h6 font-weight-bold mb-2\",attrs:{\"for\":\"\"}},[_vm._v(\"Phone/Email\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.user.phone),expression:\"user.phone\"},{name:\"validate\",rawName:\"v-validate\",value:('required'),expression:\"'required'\"}],staticClass:\"form-control phone\",class:_vm.errors.has('phone') ? 'is-invalid' : '',attrs:{\"type\":\"text\",\"name\":\"phone\",\"placeholder\":\"Phone/Email #\"},domProps:{\"value\":(_vm.user.phone)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.user, \"phone\", $event.target.value)}}}),(_vm.errors.has('phone'))?_c('span',{staticClass:\"text-danger\"},[_vm._v(\" \"+_vm._s(_vm.errors.first(\"phone\"))+\" \")]):_vm._e()]),_c('div',{staticClass:\"form-group mb-4\"},[_c('label',{staticClass:\"h6 font-weight-bold mb-2\",attrs:{\"for\":\"\"}},[_vm._v(\"Password\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.user.password),expression:\"user.password\"},{name:\"validate\",rawName:\"v-validate\",value:('required'),expression:\"'required'\"}],staticClass:\"form-control\",class:_vm.errors.has('password') ? 'is-invalid' : '',attrs:{\"type\":\"password\",\"name\":\"password\",\"placeholder\":\"Password\"},domProps:{\"value\":(_vm.user.password)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.user, \"password\", $event.target.value)}}}),(_vm.errors.has('password'))?_c('span',{staticClass:\"text-danger\"},[_vm._v(\" \"+_vm._s(_vm.errors.first(\"password\"))+\" \")]):_vm._e()]),_c('div',{staticClass:\"d-flex align-items-center\"},[_c('div',[_c('input',{staticClass:\"btn btn-secondary\",attrs:{\"type\":\"submit\",\"disabled\":_vm.errors.any() || _vm.submitted,\"value\":\"Login Now\"}})]),_c('div',{staticClass:\"ml-auto\"},[_c('router-link',{staticClass:\"ml-2\",attrs:{\"to\":\"/forgot-password\"}},[_vm._v(\"Forgot Password?\")]),_vm._v(\"| \"),_c('router-link',{staticClass:\"ml-2\",attrs:{\"to\":\"/registration\"}},[_vm._v(\"Not Registered?\")])],1)])])])])])])])])])}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"card-header\"},[_c('h4',{staticClass:\"text-uppercase playBold\"},[_vm._v(\"Login\")])])}]\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\nimport { Component, Vue } from \"vue-property-decorator\";\r\nimport { LoginViewModel } from \"../../models/LoginViewModel\";\r\nimport AuthService from \"../../services/AuthService\";\r\nimport AuthUser from \"../../../global-config/AuthUser\";\r\nimport AlertService from \"../../../common-app/service/AlertService\";\r\n\r\n@Component({\r\n components: {},\r\n})\r\nexport default class Login extends Vue {\r\n public submitted: boolean = false;\r\n public user: LoginViewModel = {} as LoginViewModel;\r\n // GetData() {\r\n // AuthService.test().then((response) => console.log(response));\r\n // }\r\n created(){\r\n const dict = {\r\n custom: {\r\n phone: {\r\n required: \"The phone or email is required\"\r\n },\r\n password: {\r\n required: \"The password is required\"\r\n }\r\n }\r\n };\r\n this.$validator.localize(\"en\", dict);\r\n }\r\n onSubmit() {\r\n this.$validator.validate().then((valid) => {\r\n if (valid) {\r\n this.submitted = true;\r\n AuthService.login(this.user)\r\n .then((response) => {\r\n if (response.data.isAuthorized) {\r\n AuthUser.setToken(response.data);\r\n this.$router.push({ path: \"user\" });\r\n } else {\r\n this.submitted = false;\r\n AlertService.sendMessage(response.data);\r\n }\r\n })\r\n .catch((error) => {\r\n this.submitted = false;\r\n });\r\n }\r\n });\r\n \r\n }\r\n}\r\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--14-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Login.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--14-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Login.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./Login.vue?vue&type=template&id=2995f6e8&\"\nimport script from \"./Login.vue?vue&type=script&lang=ts&\"\nexport * from \"./Login.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import { UnAuthAxios } from \"../../global-config/HttpConfig\";\r\nimport { LoginViewModel } from \"../models/LoginViewModel\";\r\nimport { RegViewModel } from \"../models/RegViewModel\";\r\nimport { ApiURIs } from \"../../global-config/ApiList\";\r\n\r\nexport default {\r\n login(user: LoginViewModel) {\r\n return UnAuthAxios.post(ApiURIs.login, JSON.stringify(user));\r\n },\r\n registration(user: RegViewModel) {\r\n return UnAuthAxios.post(ApiURIs.register, JSON.stringify(user));\r\n },\r\n verify(data: any) {\r\n return UnAuthAxios.post(ApiURIs.verify, JSON.stringify(data));\r\n },\r\n ReSendCode(data: any) {\r\n return UnAuthAxios.post(ApiURIs.reSendCode, JSON.stringify(data));\r\n },\r\n resetPasswordVerify(password: string, data: any) {\r\n return UnAuthAxios.post(\r\n `${ApiURIs.resetPasswordVerify}?password=${password}`,\r\n JSON.stringify(data)\r\n );\r\n },\r\n setPasswordGuest(password: string, data: any) {\r\n return UnAuthAxios.post(\r\n `${ApiURIs.setPasswordGuest}?password=${password}`,\r\n JSON.stringify(data)\r\n );\r\n },\r\n resetPassword(phoneOrEmail: string) {\r\n return UnAuthAxios.get(\r\n ApiURIs.resetPassword + \"?phoneOrEmail=\" + phoneOrEmail\r\n );\r\n },\r\n test() {\r\n return UnAuthAxios.get(\"api/user/test\");\r\n }\r\n};\r\n"],"sourceRoot":""}