{"version":3,"sources":["webpack:///./src/website/views/auth/Registration.vue?2fdb","webpack:///./src/website/views/auth/Registration.vue","webpack:///./src/website/views/auth/Registration.vue?42a9","webpack:///./src/website/views/auth/Registration.vue?1495","webpack:///./src/website/services/AuthService.ts"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","_m","on","$event","preventDefault","onSubmit","attrs","_v","directives","name","rawName","value","user","expression","class","errors","has","domProps","target","composing","$set","_s","first","_e","ref","any","submitted","staticRenderFns","dict","custom","firstName","required","phone","numeric","min","max","password","$validator","localize","validate","then","valid","AuthService","registration","response","result","data","status","$store","dispatch","userId","id","verifycode","securityVerification","code","$router","push","path","messageType","add","field","msg","message","AlertService","sendMessage","catch","error","components","component","login","post","JSON","stringify","register","verify","ReSendCode","reSendCode","resetPasswordVerify","setPasswordGuest","resetPassword","phoneOrEmail","get","test"],"mappings":"yHAAA,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,2CAA2C,CAACF,EAAG,MAAM,CAACE,YAAY,QAAQ,CAACN,EAAIO,GAAG,GAAGH,EAAG,MAAM,CAACE,YAAY,kBAAkB,CAACF,EAAG,OAAO,CAACI,GAAG,CAAC,OAAS,SAASC,GAAgC,OAAxBA,EAAOC,iBAAwBV,EAAIW,SAASF,MAAW,CAACL,EAAG,MAAM,CAACE,YAAY,YAAY,CAACF,EAAG,MAAM,CAACE,YAAY,UAAU,CAACF,EAAG,MAAM,CAACE,YAAY,cAAc,CAACF,EAAG,QAAQ,CAACE,YAAY,2BAA2BM,MAAM,CAAC,IAAM,KAAK,CAACZ,EAAIa,GAAG,eAAeT,EAAG,QAAQ,CAACU,WAAW,CAAC,CAACC,KAAK,QAAQC,QAAQ,UAAUC,MAAOjB,E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xC,WAAY,aArD7B,GAA0C,QAArB,EAAY,QAHhC,eAAU,CACTyC,WAAY,MAEO,WCtKsZ,I,YCOvaC,EAAY,eACd,EACA3E,EACAkC,GACA,EACA,KACA,KACA,MAIa,aAAAyC,E,2CClBf,4BAKe,QACbC,MADa,SACPzD,GACJ,OAAO,OAAY0D,KAAK,OAAQD,MAAOE,KAAKC,UAAU5D,KAExD+B,aAJa,SAIA/B,GACX,OAAO,OAAY0D,KAAK,OAAQG,SAAUF,KAAKC,UAAU5D,KAE3D8D,OAPa,SAON5B,GACL,OAAO,OAAYwB,KAAK,OAAQI,OAAQH,KAAKC,UAAU1B,KAEzD6B,WAVa,SAUF7B,GACT,OAAO,OAAYwB,KAAK,OAAQM,WAAYL,KAAKC,UAAU1B,KAE7D+B,oBAba,SAaOzC,EAAkBU,GACpC,OAAO,OAAYwB,KAAZ,UACF,OAAQO,oBADN,qBACsCzC,GAC3CmC,KAAKC,UAAU1B,KAGnBgC,iBAnBa,SAmBI1C,EAAkBU,GACjC,OAAO,OAAYwB,KAAZ,UACF,OAAQQ,iBADN,qBACmC1C,GACxCmC,KAAKC,UAAU1B,KAGnBiC,cAzBa,SAyBCC,GACZ,OAAO,OAAYC,IACjB,OAAQF,cAAgB,iBAAmBC,IAG/CE,KA9Ba,WA+BX,OAAO,OAAYD,IAAI","file":"js/chunk-010c5dba.eb12a882.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-10 col-sm-10 col-md-8 col-xl-4 mb-5\"},[_c('div',{staticClass:\"card\"},[_vm._m(0),_c('div',{staticClass:\"card-body py-4\"},[_c('form',{on:{\"submit\":function($event){$event.preventDefault();return _vm.onSubmit($event)}}},[_c('div',{staticClass:\"row mb-3\"},[_c('div',{staticClass:\"col-12\"},[_c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"h6 font-weight-bold mb-2\",attrs:{\"for\":\"\"}},[_vm._v(\"Full Name\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.user.firstName),expression:\"user.firstName\"},{name:\"validate\",rawName:\"v-validate\",value:('required'),expression:\"'required'\"}],staticClass:\"form-control\",class:_vm.errors.has('firstName') ? 'is-invalid' : '',attrs:{\"type\":\"text\",\"name\":\"firstName\",\"placeholder\":\"Full Name\"},domProps:{\"value\":(_vm.user.firstName)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.user, \"firstName\", $event.target.value)}}}),(_vm.errors.has('firstName'))?_c('span',{staticClass:\"text-danger\"},[_vm._v(\" \"+_vm._s(_vm.errors.first(\"firstName\"))+\" \")]):_vm._e()])]),_c('div',{staticClass:\"col-12\"},[_c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"h6 font-weight-bold mb-2\",attrs:{\"for\":\"\"}},[_vm._v(\"Phone\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.user.phone),expression:\"user.phone\"},{name:\"validate\",rawName:\"v-validate\",value:('required|numeric|min:11|max:11'),expression:\"'required|numeric|min:11|max:11'\"}],staticClass:\"form-control phone\",class:_vm.errors.has('phone') ? 'is-invalid' : '',attrs:{\"type\":\"tel\",\"maxlength\":\"11\",\"placeholder\":\"Phone\",\"name\":\"phone\"},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:\"col-12\"},[_c('div',{staticClass:\"form-group\"},[_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|min:6'),expression:\"'required|min:6'\"}],ref:\"password\",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\":\"Next Step\"}})]),_c('div',{staticClass:\"ml-auto\"},[_c('router-link',{staticClass:\"ml-2\",attrs:{\"to\":\"/login\"}},[_vm._v(\"Back to Login Page\")])],1)]),_c('div',{staticClass:\"mt-2\"},[_vm._v(\" By Creating an account, you agree to BDDOT's \"),_c('router-link',{staticClass:\"font-weight-bold\",attrs:{\"to\":\"/terms-conditions\",\"target\":\"_blank\"}},[_vm._v(\"Terms of use\")]),_vm._v(\" and \"),_c('router-link',{staticClass:\"font-weight-bold\",attrs:{\"to\":\"privacy-policy\",\"target\":\"_blank\"}},[_vm._v(\"Privacy Policy\")]),_vm._v(\". \")],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(\"Register\")])])}]\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\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\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 Header from \"@/website/components/Header.vue\";\r\nimport Footer from \"@/website/components/footer.vue\";\r\nimport { RegViewModel } from \"../../models/RegViewModel\";\r\nimport AuthService from \"../../services/AuthService\";\r\nimport AlertService from \"../../../common-app/service/AlertService\";\r\n\r\n@Component({\r\n components: {},\r\n})\r\nexport default class Registration extends Vue {\r\n public submitted = false;\r\n public user: RegViewModel = {} as RegViewModel;\r\n\r\n created() {\r\n const dict = {\r\n custom: {\r\n firstName: {\r\n required: \"Your full name is required.\",\r\n },\r\n phone: {\r\n required: \"The phone is required.\",\r\n numeric: \"The phone number can only contain numeric characters.\",\r\n min: \"The phone number must be at least 11 characters.\",\r\n max: \"Phone number cannot be more than 11 characters.\",\r\n },\r\n password: {\r\n required: \"A password is required.\",\r\n min: \"The password must be at least 6 characters.\",\r\n },\r\n },\r\n };\r\n\r\n this.$validator.localize(\"en\", dict);\r\n }\r\n\r\n onSubmit() {\r\n this.$validator.validate().then((valid) => {\r\n if (valid) {\r\n this.submitted = true;\r\n AuthService.registration(this.user)\r\n .then((response) => {\r\n let result = response.data as any;\r\n if (result.status) {\r\n //console.log(result.result.securityVerification.code);\r\n this.$store.dispatch(\"addVerify\", {\r\n userId: result.result.user.id,\r\n verifycode: result.result.securityVerification.code,\r\n });\r\n this.$router.push({ path: \"registration-verify\" });\r\n } else {\r\n this.submitted = false;\r\n if (result.messageType == \"unique\") {\r\n this.$validator.errors.add({\r\n field: \"phone\",\r\n msg: result.message,\r\n });\r\n } else {\r\n AlertService.sendMessage(result.message);\r\n }\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","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!./Registration.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!./Registration.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./Registration.vue?vue&type=template&id=88ff7330&\"\nimport script from \"./Registration.vue?vue&type=script&lang=ts&\"\nexport * from \"./Registration.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":""}