{"version":3,"sources":["webpack:///./src/components/TermsOfServiceForm.vue?bd3e","webpack:///./src/components/TermsOfServiceForm.vue?b741","webpack:///./src/components/TermsOfServiceForm.vue","webpack:///./src/components/TermsOfServiceForm.vue?3bad","webpack:///./src/components/TermsOfServiceForm.vue?4e98"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","_v","attrs","_l","item","i","key","_s","title","domProps","content","label","model","value","callback","$$v","accepted","expression","loading","on","accept","alert","error","$event","staticRenderFns","Vue","extend","components","AlertBar","data","mounted","$store","dispatch","computed","mapGetters","items","termsOfService","privacyPolicy","useAgreement","methods","valid","user","terms_accepted","id","commit","checkNotificationPromise","Notification","requestPermission","then","e","component","VBtn","VCheckbox","VCol","VExpansionPanel","VExpansionPanelContent","VExpansionPanelHeader","VExpansionPanels","VRow"],"mappings":"kHAAA,W,kECAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,QAAQ,CAACE,YAAY,YAAY,CAACF,EAAG,MAAM,CAACJ,EAAIO,GAAG,2GAA2GH,EAAG,qBAAqB,CAACI,MAAM,CAAC,UAAY,KAAKR,EAAIS,GAAIT,EAAS,OAAE,SAASU,EAAKC,GAAG,OAAOP,EAAG,oBAAoB,CAACQ,IAAID,GAAG,CAACP,EAAG,2BAA2B,CAACJ,EAAIO,GAAG,IAAIP,EAAIa,GAAGH,EAAKI,OAAO,OAAOV,EAAG,4BAA4B,CAACE,YAAY,cAAc,CAACF,EAAG,WAAW,CAACE,YAAY,qBAAqBE,MAAM,CAAC,SAAW,IAAIO,SAAS,CAAC,UAAYf,EAAIa,GAAGH,EAAKM,eAAe,MAAK,GAAGZ,EAAG,aAAa,CAACE,YAAY,aAAaE,MAAM,CAAC,eAAe,GAAG,MAAQR,EAAIiB,OAAOC,MAAM,CAACC,MAAOnB,EAAY,SAAEoB,SAAS,SAAUC,GAAMrB,EAAIsB,SAAS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O,iBAAkB,OAGrC,EAAKC,2BAhCG,+CAmCZA,yBApCK,WAqCD,IACIC,aAAaC,oBAAoBC,OACnC,MAAOC,GACL,OAAO,EAEX,OAAO,MC3G0X,I,6ICQzYC,EAAY,eACd,EACAzD,EACA+B,GACA,EACA,KACA,WACA,MAIa,aAAA0B,EAAiB,QAYhC,IAAkBA,EAAW,CAACC,OAAA,KAAKC,YAAA,KAAUC,OAAA,KAAKC,kBAAA,KAAgBC,yBAAA,KAAuBC,wBAAA,KAAsBC,mBAAA,KAAiBC,OAAA","file":"js/chunk-c8ff2dae.42325aa2.js","sourcesContent":["export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TermsOfServiceForm.vue?vue&type=style&index=0&id=6544f73b&scoped=true&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-col',{staticClass:\"tos-form\"},[_c('div',[_vm._v(\" Please take a moment to review the MessageDesk Terms of Service, Privacy Policy, and Use Agreement. \")]),_c('v-expansion-panels',{attrs:{\"accordion\":\"\"}},_vm._l((_vm.items),function(item,i){return _c('v-expansion-panel',{key:i},[_c('v-expansion-panel-header',[_vm._v(\" \"+_vm._s(item.title)+\" \")]),_c('v-expansion-panel-content',{staticClass:\"no-padding\"},[_c('textarea',{staticClass:\"read-only-textarea\",attrs:{\"readonly\":\"\"},domProps:{\"innerHTML\":_vm._s(item.content)}})])],1)}),1),_c('v-checkbox',{staticClass:\"tiny-label\",attrs:{\"hide-details\":\"\",\"label\":_vm.label},model:{value:(_vm.accepted),callback:function ($$v) {_vm.accepted=$$v},expression:\"accepted\"}}),_c('v-row',{staticClass:\"pa-2\",attrs:{\"justify\":\"center\"}},[_c('v-btn',{attrs:{\"outlined\":\"\",\"rounded\":\"\",\"color\":\"primary\",\"disabled\":_vm.loading,\"loading\":_vm.loading},on:{\"click\":_vm.accept}},[_vm._v(\" Accept \")])],1),_c('alert-bar',{staticClass:\"mb-4\",attrs:{\"isOpen\":_vm.alert,\"message\":_vm.error,\"type\":'error'},on:{\"close\":function($event){_vm.alert = false}}})],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\nimport Vue from 'vue'\nimport { mapGetters } from 'vuex'\nimport AlertBar from '@/components/AlertBar.vue'\nexport default Vue.extend({\n components: { AlertBar },\n data() {\n return {\n accepted: false,\n alert: false,\n error: `Please agree to the Terms of Service, Privacy Policy, and Use Agreement`,\n label: `I agree to the MessageDesk Terms of Service, Privacy Policy, and Use Agreement.`,\n loading: false\n }\n },\n mounted() {\n this.$store.dispatch('loadTermsOfService')\n },\n computed: {\n ...mapGetters(['privacyPolicy', 'termsOfService', 'useAgreement', 'user']),\n items() {\n return [\n {\n title: 'Terms of Service',\n content: this.termsOfService\n },\n {\n title: 'Privacy Policy',\n content: this.privacyPolicy\n },\n {\n title: 'Use Agreement',\n content: this.useAgreement\n }\n ]\n }\n },\n methods: {\n async accept(): Promise {\n // Validate the form\n const valid = this.accepted === true\n\n // If the form is NOT valid, pop alert\n if (!valid) return (this.alert = true)\n\n // Else, Set terms true on the currently authenticated user\n this.user.terms_accepted = true\n\n // Start the loader\n this.loading = true\n\n // Send update request to the API\n await this.$store.dispatch('authUserPut', this.user)\n\n // Get user with tenant's person\n const user = await this.$store.dispatch('usersFind', this.user.id)\n\n // Set auth user to user with tenant's person\n if (user) this.$store.commit('authUserSet', user)\n\n // Stop the loader\n this.loading = false\n\n // If the update failed, no nothing\n if (!user) return\n\n // Else, close the app dialog\n this.$store.commit('dialogCloseAll', 'APP')\n\n // Ask user for browser notification permission after accepting terms\n this.checkNotificationPromise()\n },\n //Check browser notification permission\n checkNotificationPromise(): boolean {\n try {\n Notification.requestPermission().then()\n } catch (e) {\n return false\n }\n return true\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!./TermsOfServiceForm.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!./TermsOfServiceForm.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./TermsOfServiceForm.vue?vue&type=template&id=6544f73b&scoped=true&\"\nimport script from \"./TermsOfServiceForm.vue?vue&type=script&lang=ts&\"\nexport * from \"./TermsOfServiceForm.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./TermsOfServiceForm.vue?vue&type=style&index=0&id=6544f73b&scoped=true&lang=css&\"\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 \"6544f73b\",\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 { VCheckbox } from 'vuetify/lib/components/VCheckbox';\nimport { VCol } from 'vuetify/lib/components/VGrid';\nimport { VExpansionPanel } from 'vuetify/lib/components/VExpansionPanel';\nimport { VExpansionPanelContent } from 'vuetify/lib/components/VExpansionPanel';\nimport { VExpansionPanelHeader } from 'vuetify/lib/components/VExpansionPanel';\nimport { VExpansionPanels } from 'vuetify/lib/components/VExpansionPanel';\nimport { VRow } from 'vuetify/lib/components/VGrid';\ninstallComponents(component, {VBtn,VCheckbox,VCol,VExpansionPanel,VExpansionPanelContent,VExpansionPanelHeader,VExpansionPanels,VRow})\n"],"sourceRoot":""}