{"version":3,"sources":["webpack:///./src/components/TenantCreateForm.vue?9eb7","webpack:///./src/components/TenantCreateForm.vue","webpack:///./src/components/TenantCreateForm.vue?292c","webpack:///./src/components/TenantCreateForm.vue?2e11"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","model","value","callback","$$v","step","expression","attrs","_v","directives","name","rawName","errors","collect","on","submitWorkspace","scopedSlots","_u","key","fn","copy","proxy","resellerLink","staticStyle","loading","getLink","_s","resellText","$event","preventDefault","submit","apply","arguments","email","_e","$images","buildingSite","staticRenderFns","Vue","extend","mixins","tenantNavMixin","data","mounted","reseller","$store","dispatch","computed","mapGetters","getters","user","methods","back","close","txt","document","getElementById","select","setSelectionRange","execCommand","commit","message","type","link","$validator","validate","valid","tenant","company_name","newTenant","token","goToTenant","id","component","VBtn","VCol","VForm","VIcon","VProgressCircular","VRow","VStepper","VStepperContent","VStepperItems","VTextField"],"mappings":"yHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACA,EAAG,YAAY,CAACE,YAAY,cAAcC,MAAM,CAACC,MAAOR,EAAQ,KAAES,SAAS,SAAUC,GAAMV,EAAIW,KAAKD,GAAKE,WAAW,SAAS,CAACR,EAAG,kBAAkB,CAACA,EAAG,oBAAoB,CAACS,MAAM,CAAC,KAAO,MAAM,CAACT,EAAG,QAAQ,CAACS,MAAM,CAAC,aAAa,KAAK,CAACT,EAAG,QAAQ,CAACE,YAAY,QAAQ,CAACF,EAAG,QAAQ,CAACE,YAAY,6BAA6B,CAACN,EAAIc,GAAG,yBAAyBV,EAAG,QAAQ,CAACE,YAAY,QAAQ,CAACF,EAAG,eAAe,CAACW,WAAW,CAAC,CAACC,KAAK,WAAWC,QAAQ,aAAaT,MAAM,mBAAqBI,WAAW,uBAAuBC,MAAM,CAAC,SAAW,GAAG,MAAQ,oBAAoB,KAAO,oBAAoB,UAA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,SAAU,EAGf,EAAK6B,QAEL,EAAKR,OAAOe,OAAO,wBAAyB,CACxCC,QAAS,wDACTC,KAAM,YAvBF,+CA0BN/C,gBAlED,WAkEgB,uKAEjB,EAAKV,KAAO,EAGN8D,EAAS,CAAEC,aAAc,EAAK1D,MAGpC,EAAKc,SAAU,EARE,SAWO,EAAKqB,OAAOC,SAAS,aAAcqB,GAX1C,UAWXE,EAXW,OAcZA,EAdY,yCAcM,EAAKjB,QAdX,wBAiBE,EAAKP,OAAOC,SAAS,cAAe,EAAKwB,OAjB3C,eAoBjB,EAAKzB,OAAOC,SAAS,wBAGrB,EAAKtB,SAAU,EAGf,EAAK6B,QAGL,EAAKkB,WAAWF,EAAUG,IA7BT,kDCjL8W,I,yJCOvYC,EAAY,eACd,EACAhF,EACA4C,GACA,EACA,KACA,KACA,MAIa,aAAAoC,EAAiB,QAchC,IAAkBA,EAAW,CAACC,OAAA,KAAKC,OAAA,KAAKC,QAAA,KAAMC,QAAA,KAAMC,oBAAA,KAAkBC,OAAA,KAAKC,WAAA,KAASC,kBAAA,KAAgBC,cAAA,OAAcC,aAAA","file":"js/chunk-2d0a517f.a4298263.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('v-stepper',{staticClass:\"elevation-0\",model:{value:(_vm.step),callback:function ($$v) {_vm.step=$$v},expression:\"step\"}},[_c('v-stepper-items',[_c('v-stepper-content',{attrs:{\"step\":\"1\"}},[_c('v-row',{attrs:{\"no-gutters\":\"\"}},[_c('v-col',{staticClass:\"pa-0\"},[_c('v-col',{staticClass:\"subtitle-1 pa-0 pt-4 pb-2\"},[_vm._v(\" Organization Name \")]),_c('v-col',{staticClass:\"pa-0\"},[_c('v-text-field',{directives:[{name:\"validate\",rawName:\"v-validate\",value:('required|max:160'),expression:\"'required|max:160'\"}],attrs:{\"outlined\":\"\",\"label\":\"Organization Name\",\"name\":\"Organization Name\",\"autofocus\":\"\",\"error-messages\":_vm.errors.collect('Organization Name')},model:{value:(_vm.name),callback:function ($$v) {_vm.name=$$v},expression:\"name\"}}),_c('v-row',{staticClass:\"pa-1\",attrs:{\"justify\":\"center\"}},[_c('v-btn',{attrs:{\"rounded\":\"\",\"medium\":\"\",\"outlined\":\"\",\"color\":\"primary\",\"type\":\"submit\",\"disabled\":!_vm.name},on:{\"click\":_vm.submitWorkspace}},[_vm._v(\" Create New Workspace \")])],1)],1)],1),(_vm.reseller)?_c('v-col',{staticClass:\"mt-6\",attrs:{\"cols\":\"12\"}},[_c('v-col',{staticClass:\"title black--text pa-0 pb-4\"},[_vm._v(\" Or invite others to create additional workspaces. \")]),_c('v-col',{staticClass:\"subtitle-1 pa-0 pt-4\"},[_vm._v(\"Invite with link\")]),_c('v-col',{staticClass:\"pa-0\"},[_c('v-text-field',{staticClass:\"my-2\",attrs:{\"name\":\"Reseller Link\",\"outlined\":\"\",\"placeholder\":\"Reseller Link\",\"readonly\":true,\"id\":\"reseller-link\"},scopedSlots:_vm._u([{key:\"append\",fn:function(){return [_c('v-icon',{on:{\"click\":_vm.copy}},[_vm._v(\" mdi-content-copy \")])]},proxy:true}],null,false,1141298110),model:{value:(_vm.resellerLink),callback:function ($$v) {_vm.resellerLink=$$v},expression:\"resellerLink\"}})],1),_c('v-col',{staticClass:\"pa-0\"},[_c('v-row',{attrs:{\"no-gutters\":\"\",\"justify\":\"center\"}},[_c('v-btn',{staticClass:\"mb-4\",staticStyle:{\"flex-grow\":\"0\",\"width\":\"200px\"},attrs:{\"outlined\":\"\",\"rounded\":\"\",\"small\":\"\",\"color\":\"primary\",\"disabled\":_vm.loading,\"loading\":_vm.loading},on:{\"click\":_vm.getLink}},[_vm._v(\" \"+_vm._s(_vm.resellText)+\" Reseller Link \")])],1)],1),_c('v-col',{staticClass:\"subtitle-1 pa-0 pt-4\"},[_vm._v(\"Invite with email\")]),_c('v-col',{staticClass:\"pa-0\"},[_c('v-form',{on:{\"submit\":function($event){$event.preventDefault();return _vm.submit.apply(null, arguments)}}},[_c('v-text-field',{directives:[{name:\"validate\",rawName:\"v-validate\",value:('required|max:160|email'),expression:\"'required|max:160|email'\"}],staticClass:\"my-2\",attrs:{\"outlined\":\"\",\"label\":\"Email\",\"name\":\"Email\",\"error-messages\":_vm.errors.collect('Email')},model:{value:(_vm.email),callback:function ($$v) {_vm.email=$$v},expression:\"email\"}}),_c('v-row',{staticClass:\"pa-1\",attrs:{\"justify\":\"center\"}},[_c('v-btn',{attrs:{\"rounded\":\"\",\"medium\":\"\",\"outlined\":\"\",\"color\":\"primary\",\"type\":\"submit\",\"width\":\"120\",\"disabled\":!_vm.email}},[_vm._v(\" Send \")])],1)],1)],1)],1):_vm._e()],1)],1),_c('v-stepper-content',{staticClass:\"pa-0\",staticStyle:{\"height\":\"230px\"},attrs:{\"step\":\"2\"}},[_c('v-col',{attrs:{\"align\":\"center\"}},[_c('div',[_c('img',{staticStyle:{\"width\":\"30%\"},attrs:{\"src\":_vm.$images.buildingSite}})]),_c('v-progress-circular',{attrs:{\"indeterminate\":\"\",\"color\":\"primary\",\"size\":40}}),_c('div',{staticClass:\"my-3 grey--text text--darken-2\"},[_vm._v(\" Just a sec... We're building your new workspace \")])],1)],1)],1)],1)],1)}\nvar staticRenderFns = []\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\nimport Vue from 'vue'\nimport { mapGetters } from 'vuex'\nimport tenantNavMixin from '@/mixins/tenant-nav-mixin'\nexport default Vue.extend({\n mixins: [tenantNavMixin],\n data() {\n return {\n email: null,\n loading: false,\n name: null,\n step: 1\n }\n },\n mounted() {\n if (!this.resellerLink && this.reseller) {\n this.$store.dispatch('resellerGet')\n }\n },\n computed: {\n ...mapGetters(['resellerLink', 'token']),\n resellText(): string {\n return this.resellerLink ? 'Reset' : 'Get'\n },\n reseller(): object {\n return this.$store.getters.user.reseller\n }\n },\n methods: {\n back(): void {\n // Reset the form\n this.email = null\n this.name = null\n\n // Nav to step 1\n this.step = 1\n },\n close(): void {\n // Reset the form\n this.email = null\n this.name = null\n\n // Close the app dialog\n this.$store.dispatch('dialogClose', 'APP')\n },\n copy(): void {\n let txt = document.getElementById('reseller-link') as HTMLInputElement\n txt.select()\n txt.setSelectionRange(0, 99999)\n document.execCommand('copy')\n this.$store.commit('appNotificationBarSet', {\n message: 'Reseller Link Copied to Clipboard!',\n type: 'success'\n })\n },\n async getLink(): Promise {\n // Start the loading spinner\n this.loading = true\n\n const link = await this.$store.dispatch('resellerGet')\n\n // Stop the loading spinner\n this.loading = false\n\n if (!link) return\n\n return link\n },\n async submit(): Promise {\n // Validate the form\n const valid = await this.$validator.validate()\n\n // If the form is NOT valid, do nothing\n if (!valid) return\n\n // Start the loading spinner\n this.loading = true\n\n // Post the tenant to the API\n const invited = await this.$store.dispatch('resellerPost', {\n email: this.email\n })\n\n // Stop the loading spinner\n this.loading = false\n\n // Close the app dialog\n this.close()\n\n this.$store.commit('appNotificationBarSet', {\n message: 'Your workspace invite has been successfully sent out.',\n type: 'success'\n })\n },\n async submitWorkspace(): Promise {\n // Advance to the next step\n this.step = 2\n\n // Assemble a tenant payload\n const tenant = { company_name: this.name }\n\n // Start the loading spinner\n this.loading = true\n\n // Post the tenant to the API\n const newTenant = await this.$store.dispatch('tenantPost', tenant)\n\n // If the tenant was NOT created, return to step 1\n if (!newTenant) return this.back()\n\n // Else, fetch the auth user again to refresh the user's memberships\n const user = await this.$store.dispatch('authUserGet', this.token)\n\n // Get the memberships async\n this.$store.dispatch('tenantMembershipsGet')\n\n // Stop the loading spinner\n this.loading = false\n\n // Close the app dialog\n this.close()\n\n // Route the user into their new workspace\n this.goToTenant(newTenant.id)\n }\n }\n})\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--13-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TenantCreateForm.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--13-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TenantCreateForm.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./TenantCreateForm.vue?vue&type=template&id=b8ac82fa&\"\nimport script from \"./TenantCreateForm.vue?vue&type=script&lang=ts&\"\nexport * from \"./TenantCreateForm.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\n\n/* vuetify-loader */\nimport installComponents from \"!../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VBtn } from 'vuetify/lib/components/VBtn';\nimport { VCol } from 'vuetify/lib/components/VGrid';\nimport { VForm } from 'vuetify/lib/components/VForm';\nimport { VIcon } from 'vuetify/lib/components/VIcon';\nimport { VProgressCircular } from 'vuetify/lib/components/VProgressCircular';\nimport { VRow } from 'vuetify/lib/components/VGrid';\nimport { VStepper } from 'vuetify/lib/components/VStepper';\nimport { VStepperContent } from 'vuetify/lib/components/VStepper';\nimport { VStepperItems } from 'vuetify/lib/components/VStepper';\nimport { VTextField } from 'vuetify/lib/components/VTextField';\ninstallComponents(component, {VBtn,VCol,VForm,VIcon,VProgressCircular,VRow,VStepper,VStepperContent,VStepperItems,VTextField})\n"],"sourceRoot":""}