{"version":3,"sources":["webpack:///./src/views/Opt.vue?ad86","webpack:///./src/views/Opt.vue?d4b4","webpack:///./src/views/Opt.vue","webpack:///./src/views/Opt.vue?dab2","webpack:///./src/views/Opt.vue?25e2"],"names":["render","_vm","this","_h","$createElement","_c","_self","attrs","toolbar","staticClass","staticStyle","_l","item","i","key","$vuetify","breakpoint","xsOnly","_v","_s","title","_e","on","updateConsentSettings","model","value","consent","callback","$$v","$set","expression","loading","description","outbound","j","keywordMsg","type","personMsg","caption","$colors","mdPurple70","$event","$router","push","staticRenderFns","Vue","extend","components","SmsInboundBubble","SmsOutboundBubble","data","left","icon","back","tooltip","permission","feature","right","color","editWarning","learnMoreLink","tempOptInMessage","tempOptOutMessage","mounted","cloneConsentMessages","computed","A2PRegistered","a2pEnabled","$store","getters","settingGet","companyName","tenant","company_name","modified","opt_in_message","opt_out_message","supportEmail","support_email","tiles","messages","popEditOptIn","popEditOptOut","changeEmails","methods","inputs","name","label","path","validate","dispatch","component","closeable","props","organizationUpdate","object","text","selectedObject","find","x","success","commit","message","closeOnSubmit","width","insert","updateConsentMessages","$validator","validateAll","valid","payload","bool","append_all","watch","VBtn","VIcon","VRow","VSheet","VSwitch"],"mappings":"uGAAA,W,gECAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,gBAAgB,CAACE,MAAM,CAAC,QAAUN,EAAIO,UAAU,CAAEP,EAAW,QAAEI,EAAG,QAAQ,CAACI,YAAY,uDAAuDC,YAAY,CAAC,YAAY,UAAU,CAACT,EAAIU,GAAIV,EAAS,OAAE,SAASW,EAAKC,GAAG,MAAO,CAACR,EAAG,UAAU,CAACS,IAAID,EAAEJ,YAAY,yBAAyBC,YAAY,CAAC,SAAW,YAAYH,MAAM,CAAC,MAAQ,QAAQ,UAAY,IAAI,MAAQN,EAAIc,SAASC,WAAWC,OAAS,OAAS,IAAI,aAAa,QAAQ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KACA,WACA,MAIa,aAAA+C,EAAiB,QAShC,IAAkBA,EAAW,CAACuB,OAAA,KAAKC,QAAA,KAAMC,OAAA,KAAKC,SAAA,KAAOC,UAAA","file":"js/opt.49a9959e.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!./Opt.vue?vue&type=style&index=0&id=ac4f7de2&scoped=true&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('page-template',{attrs:{\"toolbar\":_vm.toolbar}},[(_vm.consent)?_c('v-row',{staticClass:\"flex-column justify-center align-center mx-auto mb-4\",staticStyle:{\"max-width\":\"800px\"}},[_vm._l((_vm.tiles),function(item,i){return [_c('v-sheet',{key:i,staticClass:\"mx-auto my-2 py-2 px-3\",staticStyle:{\"position\":\"relative\"},attrs:{\"color\":\"white\",\"elevation\":\"2\",\"width\":_vm.$vuetify.breakpoint.xsOnly ? '100%' : 450,\"min-height\":\"200\"}},[_c('v-row',{staticClass:\"px-3\",attrs:{\"justify\":\"space-between\",\"align\":\"center\"}},[_c('h5',[_vm._v(_vm._s(item.title))]),(i === 0)?_c('div',{staticClass:\"tiny grey--text text--darken-2\",staticStyle:{\"margin-top\":\"5px\"}},[_vm._v(\" Append to All \")]):_vm._e(),(i === 0)?_c('v-switch',{staticClass:\"ma-0\",attrs:{\"hide-details\":\"\"},on:{\"change\":_vm.updateConsentSettings},model:{value:(_vm.consent.append_all),callback:function ($$v) {_vm.$set(_vm.consent, \"append_all\", $$v)},expression:\"consent.append_all\"}}):_vm._e(),_c('v-btn',{attrs:{\"icon\":\"\",\"disabled\":_vm.loading},on:{\"click\":item.callback}},[_c('v-icon',{attrs:{\"size\":\"20\",\"color\":\"primary\"}},[_vm._v(\"bi-pencil-square\")])],1)],1),_c('div',{staticStyle:{\"font-size\":\"14px\"}},[_vm._v(\" \"+_vm._s(item.description)+\" \")]),_vm._l((item.messages),function(outbound,j){return [(outbound)?_c('sms-outbound-bubble',{key:j,staticClass:\"mt-2\",attrs:{\"fullWidth\":\"\",\"message\":_vm.keywordMsg(item.type)}}):(!outbound)?_c('sms-inbound-bubble',{key:j,staticClass:\"mb-2\",attrs:{\"fullWidth\":\"\",\"message\":_vm.personMsg(item.type)}}):_vm._e()]}),_c('div',{staticClass:\"compliance-caption px-3 pb-2\",attrs:{\"align\":\"center\"}},[_c('i',[_vm._v(\" \"+_vm._s(item.caption)+\" \")])])],2)]}),(_vm.A2PRegistered)?_c('v-sheet',{staticClass:\"mx-auto my-2 py-2 px-3\",attrs:{\"color\":\"white\",\"elevation\":\"2\",\"width\":_vm.$vuetify.breakpoint.xsOnly ? '100%' : 450,\"min-height\":\"200\"}},[_c('v-row',{staticClass:\"px-3\",attrs:{\"justify\":\"space-between\",\"align\":\"center\"}},[_c('h5',{staticClass:\"mb-2\"},[_vm._v(\"Phone Number Registration\")]),_c('div',{staticStyle:{\"font-size\":\"14px\"}},[_vm._v(\"By registering your phone number with Carriers, you can protect your phone line against failed messages and SPAM. \")])]),_c('div',{staticStyle:{\"position\":\"relative\"}},[_c('sms-outbound-bubble',{staticClass:\"mt-2 mb-0\",attrs:{\"fullWidth\":\"\",\"message\":_vm.keywordMsg('register')}}),_c('span',{staticStyle:{\"position\":\"absolute\",\"bottom\":\"0\",\"right\":\"55px\",\"color\":\"#A10000\",\"font-size\":\"11px\"}},[_vm._v(\" failed \")])],1),_c('div',{staticClass:\"text-center pt-5\"},[_c('v-btn',{attrs:{\"dark\":\"\",\"color\":_vm.$colors.mdPurple70},on:{\"click\":function($event){return _vm.$router.push('/brand-info')}}},[_vm._v(\" Register \")])],1)],1):_vm._e()],2):_vm._e()],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\nimport Consent from '@/types/Consent.interface'\nimport SmsInboundBubble from '@/components/SmsInboundBubble.vue'\nimport SmsOutboundBubble from '@/components/SmsOutboundBubble.vue'\nimport Tenant from '@/types/Tenant.interface'\nimport Vue from 'vue'\nexport default Vue.extend({\n components: { SmsInboundBubble, SmsOutboundBubble },\n data() {\n return {\n loading: false,\n toolbar: {\n title: 'Compliance Settings',\n left: [\n {\n title: 'Back',\n icon: 'mdi-chevron-left',\n back: '/settings',\n tooltip: 'Back',\n permission: 0,\n feature: null\n }\n ],\n right: []\n },\n color: 'primary',\n editWarning: false,\n learnMoreLink: `Learn More`,\n tempOptInMessage: null,\n tempOptOutMessage: null\n }\n },\n async mounted() {\n // If consent is already loaded, clone it\n if (this.consent) this.cloneConsentMessages()\n },\n computed: {\n // Function pulls from api to get the settings data table to see if a user is a2p enabled or not\n A2PRegistered(): boolean {\n const a2pEnabled = this.$store.getters.settingGet('a2pEnabled')\n\n // Ensure that the value isn't null, if it is we don't return it\n return a2pEnabled != null\n },\n companyName(): string {\n return this.$store.getters.tenant.company_name\n },\n consent(): Consent {\n return this.$store.getters.consent\n },\n modified(): boolean {\n // Returns bool, true if either of the opt in or opt out messages have been changed\n return (\n this.tempOptInMessage != this.consent.opt_in_message ||\n this.tempOptOutMessage != this.consent.opt_out_message\n )\n },\n supportEmail(): string {\n return this.$store.getters.tenant.support_email\n },\n tenant(): Tenant {\n return this.$store.getters.tenant\n },\n tiles() {\n return [\n {\n title: 'Compliance Message',\n description:\n \"Contacts receive this phrase if they aren't opted-in before receiving a text\",\n caption:\n 'Industry standards require promotional mass-texts only get sent to contacts who have explicit Opt-In',\n type: 'compliance',\n messages: [true, false],\n callback: () => this.popEditOptIn()\n },\n {\n title: 'Opt-Out Keyword: STOP',\n description:\n 'Contacts who reply \"STOP\" will be unreachable by MessageDesk',\n caption: 'MessageDesk will NOT send messages to Opted-Out Contacts',\n type: 'stop',\n messages: [false, true],\n callback: () => this.popEditOptOut()\n },\n {\n title: 'Help Keyword: HELP',\n description:\n 'Contacts can reply HELP at anytime to get the following message',\n caption: 'By law, all business phone lines must autorespond to HELP',\n type: 'help',\n messages: [false, true],\n callback: () => this.changeEmails()\n }\n ]\n }\n },\n methods: {\n changeEmails(): void {\n // Assemble form inputs\n const inputs = [\n {\n type: 'TEXT',\n name: 'Organization Name',\n label: 'Organization Name',\n icon: 'mdi-format-size',\n path: 'company_name',\n validate: 'required|max:45'\n },\n {\n type: 'TEXT',\n name: 'Support Email',\n label: 'Support Email',\n icon: 'mdi-format-size',\n path: 'support_email',\n validate: 'required|max:191|email'\n }\n ]\n // Pop an app-form dialog\n this.$store.dispatch('dialogOpen', {\n type: 'APP',\n title: 'Edit Organization',\n component: 'app-form',\n color: 'primary',\n closeable: true,\n props: {\n color: 'primary',\n model: this.tenant,\n inputs: inputs\n },\n callback: (tenant: Tenant): void => this.organizationUpdate(tenant)\n })\n },\n cloneConsentMessages(): void {\n // Set a temp variable for the current opt in message changes\n this.tempOptInMessage = this.consent.opt_in_message\n\n // Set a temp variable for the current opt out message changes\n this.tempOptOutMessage = this.consent.opt_out_message\n },\n keywordMsg(type: string): object {\n const object = [\n {\n text: `
${this.tempOptInMessage}
`,\n type: 'compliance',\n key: 'compliance'\n },\n {\n text: `
${this.tempOptOutMessage}
`,\n type: 'compliance',\n key: 'stop'\n },\n {\n text: `
${this.companyName}: For help, email \n ${this.supportEmail}.\\nReply STOP to Opt-Out
`,\n type: 'compliance',\n key: 'help'\n },\n {\n text: 'Example Text Message',\n type: 'compliance',\n key: 'register'\n }\n ]\n const selectedObject = object.find((x) => x.key === type)\n\n return selectedObject\n },\n async organizationUpdate(tenant: Tenant): Promise {\n // Start the loading spinner\n this.loading = true\n\n // Update the tenant\n const success = await this.$store.dispatch('tenantPut', tenant)\n\n // Stop the loading spinner\n this.loading = false\n\n // If the request failed, no nothing\n if (!success) return\n\n // Else, close dialog\n this.$store.dispatch('dialogClose', 'APP')\n\n // Pop notification\n this.$store.commit('appNotificationBarSet', {\n message: 'Organization Updated',\n type: 'success'\n })\n },\n personMsg(type: string): object {\n const object = [\n {\n text: 'Subscribe',\n type: 'compliance'\n },\n {\n text: 'STOP',\n type: 'stop'\n },\n {\n text: 'HELP',\n type: 'help'\n }\n ]\n const selectedObject = object.find((x) => x.type === type)\n\n return selectedObject\n },\n popEditOptIn(): void {\n this.$store.dispatch('dialogOpen', {\n type: 'APP',\n title: 'Compliance Message',\n component: 'message-text-form-save',\n color: 'primary',\n closeable: true,\n closeOnSubmit: true,\n width: '600px',\n props: {\n insert: this.tempOptInMessage\n },\n callback: (message: string): void => {\n // Set Opt in message to temp variable\n this.tempOptInMessage = message\n\n // Update the message\n this.updateConsentMessages()\n }\n })\n },\n popEditOptOut(): void {\n this.$store.dispatch('dialogOpen', {\n type: 'APP',\n title: 'Opt-Out Keyword: STOP',\n component: 'message-text-form-save',\n color: 'primary',\n closeable: true,\n closeOnSubmit: true,\n width: '600px',\n props: {\n insert: this.tempOptOutMessage\n },\n callback: (message: string): void => {\n // Set Opt Out message to temp variable\n this.tempOptOutMessage = message\n\n // Update the message\n this.updateConsentMessages()\n }\n })\n },\n async updateConsentMessages(): Promise {\n // Validate the opt in and opt out messages\n const valid = await this.$validator.validateAll()\n\n // If not valid, return\n if (!valid) return\n\n // Create payload to save opt messages\n const payload = {\n opt_in_message: this.tempOptInMessage,\n opt_out_message: this.tempOptOutMessage\n }\n\n // Start the loading spinner\n this.loading = true\n\n // Dispatch api request to save the messages to the tenant's sms account\n const consent = await this.$store.dispatch('consentPut', payload)\n\n // Stop the loading spinner\n this.loading = false\n\n // If request failed, return\n if (!consent) return\n\n // Update the sms account in the client store\n this.$store.commit('consentSet', consent)\n\n // Confirmation app notification bar\n this.$store.commit('appNotificationBarSet', {\n message: 'Opt Messages Updated.'\n })\n },\n async updateConsentSettings(bool: boolean): Promise {\n // Give pop-up warning if boolean is false (i.e they turned this setting off) that all messages require opt-out and having this off may affect delivery \n if (!bool) {\n this.$store.dispatch('dialogOpen', {\n type: 'MESSAGE',\n title: 'Message Compliance',\n text: 'WARNING: All Messages Require Opt-Out Verbiage, Turning This Setting Off May Affect Delivery',\n icon: 'mdi-alert',\n color: 'primary',\n closeable: true\n })\n }\n\n // Assemble the API payload\n const payload = { append_all: bool }\n\n // Start the loading spinner\n this.loading = true\n\n // Send the changes to the server\n await this.$store.dispatch('consentPut', payload)\n\n // Stop the loading spinner\n this.loading = false\n }\n },\n watch: {\n consent(): void {\n this.cloneConsentMessages()\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!./Opt.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!./Opt.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./Opt.vue?vue&type=template&id=ac4f7de2&scoped=true&\"\nimport script from \"./Opt.vue?vue&type=script&lang=ts&\"\nexport * from \"./Opt.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./Opt.vue?vue&type=style&index=0&id=ac4f7de2&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 \"ac4f7de2\",\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 { VIcon } from 'vuetify/lib/components/VIcon';\nimport { VRow } from 'vuetify/lib/components/VGrid';\nimport { VSheet } from 'vuetify/lib/components/VSheet';\nimport { VSwitch } from 'vuetify/lib/components/VSwitch';\ninstallComponents(component, {VBtn,VIcon,VRow,VSheet,VSwitch})\n"],"sourceRoot":""}