{"version":3,"sources":["webpack:///./src/containers/PageContent.vue?c88c","webpack:///src/containers/PageContent.vue","webpack:///./src/containers/PageContent.vue?67b1","webpack:///./src/containers/PageContent.vue","webpack:///./src/services/registration.js","webpack:///./src/pages/Vendor/registration/VendorSignUp.vue?9ca4","webpack:///src/pages/Vendor/registration/VendorSignUp.vue","webpack:///./src/pages/Vendor/registration/VendorSignUp.vue?2c35","webpack:///./src/pages/Vendor/registration/VendorSignUp.vue"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","attrs","title","style","_v","_s","_e","subtitle","_t","staticRenderFns","props","String","sectionStyles","type","Object","default","containerStyles","computed","_sectionStyles","component","registration","RegisterHOABoardMember","payload","url","KMS_BACKEND","axios","post","catch","handleServiceErrors","resp","data","ConfirmEmail","userID","confirmEmailToken","scope","appId","token","refreshToken","expiration","auth","saveToken","initUser","GetBoardMemberQuestions","get","headers","authHeaders","SubmitBoardMemberAnswers","boardMemberAnswers","ValidateOwnerSignupCode","signupCode","params","ValidateOwnerSignupCodeWithSuccess","ValidateVendorSignupCodeWithSuccess","ValidateVendorSignupCode","CheckUserExists","emailAddress","RegisterOwner","RegisterVendor","ref","on","$event","preventDefault","onFormSubmit","apply","arguments","model","value","formData","callback","$$v","$set","expression","scopedSlots","_u","key","fn","errors","notifyError","e","duration","message","position","vendorSetupCode","components","PageContent","ValidInput","ValidationObserver","ValidationProvider","isDebug","formComplete","watch","hoaId","resetForm","methods","$refs","form","reset"],"mappings":"gHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,YAAY,OAAOC,MAAM,CAAC,KAAO,OAAO,aAAaP,EAAIQ,MAAM,WAAY,eAAiBR,EAAIQ,QAAS,CAACJ,EAAG,MAAM,CAACE,YAAY,YAAYG,MAAOT,EAAmB,iBAAG,CAACI,EAAG,MAAM,CAACE,YAAY,UAAUG,MAAO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,oCAEA,QA7CA,QA+CA,aA/CA,sECtGoX,I,YCOhX7E,EAAY,eACd,EACA1B,EACAgB,GACA,EACA,KACA,KACA,MAIa,aAAAU,E","file":"js/chunk-69c86afe.00a5d71d.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"page\",attrs:{\"role\":\"main\",\"aria-label\":_vm.title,\"tests-id\":(\"PageContent-\" + _vm.title)}},[_c('div',{staticClass:\"container\",style:(_vm.containerStyles)},[_c('div',{staticClass:\"section\",style:(_vm._sectionStyles)},[(_vm.title)?_c('h3',[_vm._v(_vm._s(_vm.title))]):_vm._e(),(_vm.subtitle)?_c('span',{staticClass:\"subtitle\"},[_vm._v(_vm._s(_vm.subtitle))]):_vm._e(),_vm._t(\"default\")],2)])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\r\n <div class=\"page\" role=\"main\" :aria-label=\"title\" :tests-id=\"`PageContent-${title}`\">\r\n <div class=\"container\" :style=\"containerStyles\">\r\n <div class=\"section\" :style=\"_sectionStyles\">\r\n <h3 v-if=\"title\">{{ title }}</h3>\r\n <span v-if=\"subtitle\" class=\"subtitle\">{{ subtitle }}</span>\r\n <slot></slot>\r\n </div>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script>\r\n/*\r\n <PageContent \r\n title=\"title\"\r\n >\r\n \r\n \r\n </PageContent>\r\n*/\r\n\r\nimport { mapState } from 'vuex'\r\nimport _merge from 'lodash/merge'\r\nimport _get from 'lodash/get'\r\n\r\nexport default {\r\n props: {\r\n title: String,\r\n subtitle: String,\r\n sectionStyles: {\r\n type: Object,\r\n default: () => {\r\n return {}\r\n }\r\n },\r\n containerStyles: {\r\n type: Object,\r\n default: () => {\r\n return {}\r\n }\r\n }\r\n },\r\n computed: {\r\n ...mapState({\r\n // _get is actually only for testing purposes\r\n // so that the win(dow) store doesn't need\r\n // to be added to every unit test\r\n breakpoint: state => _get(state, ['win', 'breakpoint'], null)\r\n }),\r\n _sectionStyles() {\r\n const breakpoint = this.breakpoint\r\n\r\n return _merge(\r\n {},\r\n {\r\n ...(breakpoint === 'mobile' && { padding: '.25em' })\r\n },\r\n this.sectionStyles\r\n )\r\n }\r\n }\r\n}\r\n</script>\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PageContent.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PageContent.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./PageContent.vue?vue&type=template&id=2b51c2b9&\"\nimport script from \"./PageContent.vue?vue&type=script&lang=js&\"\nexport * from \"./PageContent.vue?vue&type=script&lang=js&\"\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 axios from 'axios'\r\nimport auth from '@/services/_auth'\r\nimport { KMS_BACKEND, appId } from '@/config'\r\nimport { handleServiceErrors } from '@/services/errors'\r\n\r\n// KMS Backend Registration Service\r\nconst registration = {\r\n // Register management user\r\n RegisterHOABoardMember: async payload => {\r\n const url = `${KMS_BACKEND}/User/RegisterHOABoardMember`\r\n const resp = await axios.post(url, payload).catch(handleServiceErrors)\r\n return resp.data\r\n },\r\n\r\n ConfirmEmail: async (userID, confirmEmailToken) => {\r\n const url = `${KMS_BACKEND}/User/ConfirmEmail`\r\n const data = { userID, confirmEmailToken, scope: appId() }\r\n const resp = await axios.post(url, data).catch(handleServiceErrors)\r\n\r\n // Email confirmation gives back valid token\r\n // Use it to init authenticated user\r\n const { token, refreshToken, expiration } = resp.data\r\n auth.saveToken(token, refreshToken, expiration)\r\n return await auth.initUser()\r\n },\r\n\r\n GetBoardMemberQuestions: async () => {\r\n const url = `${KMS_BACKEND}/BoardMemberQuestion/List`\r\n const resp = await axios.get(url, { headers: auth.authHeaders() }).catch(handleServiceErrors)\r\n return resp.data\r\n },\r\n\r\n SubmitBoardMemberAnswers: async payload => {\r\n const url = `${KMS_BACKEND}/BoardMemberAnswer/SubmitAnswers`\r\n const resp = await axios\r\n .post(url, { boardMemberAnswers: payload }, { headers: auth.authHeaders() })\r\n .catch(handleServiceErrors)\r\n return resp.data\r\n },\r\n\r\n // Validates that a signup code exists, and if it does,\r\n // returns the unit/owner info to display to the user for verification.\r\n ValidateOwnerSignupCode: async signupCode => {\r\n const url = `${KMS_BACKEND}/User/ValidateOwnerSignupCode`\r\n const resp = await axios.get(url, { params: { signupCode } }).catch(handleServiceErrors)\r\n return resp.data\r\n },\r\n\r\n // Validates that a signup code exists, and if it does,\r\n // returns the unit/owner info to display to the user for verification.\r\n ValidateOwnerSignupCodeWithSuccess: async signupCode => {\r\n const url = `${KMS_BACKEND}/User/ValidateOwnerSignupCodeWithSuccess`\r\n const resp = await axios.get(url, { params: { signupCode } }).catch(handleServiceErrors)\r\n return resp.data\r\n },\r\n\r\n // Validates that a signup code exists, and if it does,\r\n // returns true for verification.\r\n ValidateVendorSignupCodeWithSuccess: async signupCode => {\r\n const url = `${KMS_BACKEND}/User/ValidateVendorSignupCodeWithSuccess`\r\n const resp = await axios.get(url, { params: { signupCode } }).catch(handleServiceErrors)\r\n return resp.data\r\n },\r\n\r\n // Validates that a signup code exists, and if it does,\r\n // returns the vendor info to display to the user for verification.\r\n ValidateVendorSignupCode: async signupCode => {\r\n const url = `${KMS_BACKEND}/User/ValidateVendorSignupCode`\r\n const resp = await axios.get(url, { params: { signupCode } }).catch(handleServiceErrors)\r\n return resp.data\r\n },\r\n\r\n // Checks whether an identity exists for a given email address in the database.\r\n // Valid signup code required to prevent possible brute force email address checks\r\n CheckUserExists: async (emailAddress, signupCode) => {\r\n const url = `${KMS_BACKEND}/User/CheckUserExists`\r\n const resp = await axios\r\n .get(url, { params: { emailAddress, signupCode } })\r\n .catch(handleServiceErrors)\r\n return resp.data\r\n },\r\n\r\n // Register homeowner\r\n RegisterOwner: async payload => {\r\n const url = `${KMS_BACKEND}/User/RegisterOwner`\r\n const resp = await axios.post(url, payload).catch(handleServiceErrors)\r\n return resp.data\r\n },\r\n\r\n // Register vendor\r\n RegisterVendor: async payload => {\r\n const url = `${KMS_BACKEND}/User/RegisterVendor`\r\n const resp = await axios.post(url, payload).catch(handleServiceErrors)\r\n return resp.data\r\n }\r\n}\r\n\r\nexport default registration\r\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('PageContent',{attrs:{\"title\":\"Vendor Sign-Up\"}},[_c('div',{staticClass:\"box is-8\"},[_c('ValidationObserver',{ref:\"form\"},[_c('transition',{attrs:{\"name\":\"fade\",\"mode\":\"out-in\",\"appear\":\"\"}},[_c('form',{staticClass:\"form\",on:{\"submit\":function($event){$event.preventDefault();return _vm.onFormSubmit.apply(null, arguments)}}},[_c('fieldset',[_c('div',{staticClass:\"form-grid\"},[_c('div',{staticClass:\"column is-6\"},[_c('valid-input',{attrs:{\"label\":\"Vendor Setup Code\",\"type\":\"text\",\"vid\":\"setupcode\",\"placeholder\":\"Setup Code\",\"rules\":\"required|max:20\"},model:{value:(_vm.formData.vendorSetupCode),callback:function ($$v) {_vm.$set(_vm.formData, \"vendorSetupCode\", $$v)},expression:\"formData.vendorSetupCode\"}})],1)])]),_c('fieldset',[_c('ValidationProvider',{attrs:{\"vid\":\"terms\",\"rules\":\"required\"},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar errors = ref.errors;\nreturn [_c('div',{staticClass:\"field\"},[_c('span',[_vm._v(_vm._s(errors[0]))])])]}}])})],1),_c('button',{staticClass:\"button is-primary is-rounded\",attrs:{\"type\":\"submit\"}},[_vm._v(\" Submit \")])])])],1)],1)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\r\n <PageContent title=\"Vendor Sign-Up\">\r\n <div class=\"box is-8\">\r\n <ValidationObserver ref=\"form\">\r\n <transition name=\"fade\" mode=\"out-in\" appear>\r\n <form @submit.prevent=\"onFormSubmit\" class=\"form\">\r\n <fieldset>\r\n <div class=\"form-grid\">\r\n <div class=\"column is-6\">\r\n <valid-input\r\n label=\"Vendor Setup Code\"\r\n type=\"text\"\r\n vid=\"setupcode\"\r\n placeholder=\"Setup Code\"\r\n rules=\"required|max:20\"\r\n v-model=\"formData.vendorSetupCode\"\r\n />\r\n </div>\r\n </div>\r\n </fieldset>\r\n <fieldset>\r\n <ValidationProvider vid=\"terms\" rules=\"required\" v-slot=\"{ errors }\">\r\n <div class=\"field\">\r\n <span>{{ errors[0] }}</span>\r\n </div>\r\n </ValidationProvider>\r\n </fieldset>\r\n <button type=\"submit\" class=\"button is-primary is-rounded\">\r\n Submit\r\n </button>\r\n </form>\r\n </transition>\r\n </ValidationObserver>\r\n </div>\r\n </PageContent>\r\n</template>\r\n\r\n<script>\r\nimport { ValidationObserver, ValidationProvider } from 'vee-validate'\r\nimport { ValidationError } from '@/services/errors'\r\nimport PageContent from '@/containers/PageContent'\r\nimport { ToastProgrammatic as Toast } from 'buefy'\r\nimport { mapState } from 'vuex'\r\nimport registration from '@/services/registration'\r\n\r\nimport ValidInput from '@/components/inputs/ValidInput'\r\n\r\nfunction notifyError(e) {\r\n Toast.open({\r\n duration: 7000,\r\n message: e.message || e,\r\n position: 'is-bottom',\r\n type: 'is-danger'\r\n })\r\n}\r\n\r\nlet DEFAULT_FORM_VALUES = {\r\n vendorSetupCode: ''\r\n}\r\n\r\nexport default {\r\n components: {\r\n PageContent,\r\n ValidInput,\r\n ValidationObserver,\r\n ValidationProvider\r\n },\r\n\r\n data: function() {\r\n return {\r\n isDebug: true,\r\n formComplete: false,\r\n formData: {\r\n ...DEFAULT_FORM_VALUES\r\n }\r\n }\r\n },\r\n\r\n async mounted() {\r\n this.resetForm()\r\n },\r\n\r\n watch: {\r\n hoaId() {\r\n this.resetForm()\r\n }\r\n },\r\n\r\n computed: {\r\n ...mapState({\r\n hoaId: state => state.user.selectedHoaId\r\n })\r\n },\r\n\r\n methods: {\r\n resetForm() {\r\n this.formData = { ...DEFAULT_FORM_VALUES }\r\n if (this.$refs.form) {\r\n this.$refs.form.reset()\r\n }\r\n },\r\n\r\n async onFormSubmit() {\r\n if (this.isDebug == true) console.debug('...onFormSubmit')\r\n try {\r\n if (\r\n !this.formData ||\r\n this.formData == undefined ||\r\n !this.formData.vendorSetupCode ||\r\n this.formData.vendorSetupCode == undefined\r\n ) {\r\n notifyError(`Please enter a proper sign-up code for proper processing.`)\r\n return\r\n }\r\n\r\n try {\r\n let results = await registration.ValidateVendorSignupCodeWithSuccess(\r\n this.formData.vendorSetupCode\r\n )\r\n\r\n if (results && results != undefined) {\r\n if (this.isDebug == true) console.debug('results...' + JSON.stringify(results))\r\n\r\n if (results == false) {\r\n notifyError(`The vendor sign-up code is not valid.`)\r\n return\r\n }\r\n } else {\r\n notifyError(`The vendor sign-up code is not valid.`)\r\n return\r\n }\r\n } catch (e) {\r\n notifyError(`The vendor sign-up code is not valid.`)\r\n return\r\n }\r\n\r\n // redirect to registration with sign-up code\r\n this.formComplete = true\r\n this.$router.push({\r\n name: 'registerVendor',\r\n params: { code: this.formData.vendorSetupCode }\r\n })\r\n } catch (e) {\r\n // If this is a validation error, get the details for each field\r\n if (e instanceof ValidationError) {\r\n this.$refs.form.setErrors(e.fields)\r\n }\r\n notifyError(e)\r\n }\r\n this.loading = false\r\n }\r\n }\r\n}\r\n</script>\r\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./VendorSignUp.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./VendorSignUp.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./VendorSignUp.vue?vue&type=template&id=65a7d122&\"\nimport script from \"./VendorSignUp.vue?vue&type=script&lang=js&\"\nexport * from \"./VendorSignUp.vue?vue&type=script&lang=js&\"\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"],"sourceRoot":""}