{"version":3,"sources":["webpack:///./src/pages/Homeowner/helpCenter/index.vue?52f2","webpack:///./src/pages/Homeowner/helpCenter/keys/data.js","webpack:///./src/services/HelpCenterDocument/store.js","webpack:///./src/pages/Homeowner/helpCenter/keys/methods.js","webpack:///src/pages/Homeowner/helpCenter/index.vue","webpack:///./src/pages/Homeowner/helpCenter/index.vue?3c31","webpack:///./src/pages/Homeowner/helpCenter/index.vue"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","attrs","_v","_s","$t","_l","d","i","key","style","padding","marginBottom","display","justifyContent","margin","name","description","on","$event","downloadPdf","helpCenterDocumentID","staticRenderFns","data","documents","loading","isDebug","actions","getHelpCenterDocuentList","console","log","kms","get","results","debug","JSON","stringify","list","notifyProblem","error","getDocumentFile","dispatch","params","done","path","result","undefined","details","Vue","use","Vuex","helpCenterDocumentStore","Store","state","mutations","getters","methods","asBase64","asRawBase64","contentType","blob","base64toBlob","showPdf","notifyMessage","notifyWarning","reload","loadHelpCenterSubjects","then","components","PageContentLayoutOnly","mounted","i18n","messages","en","helpCenter","title","component"],"mappings":"mHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,wBAAwB,CAACE,YAAY,YAAYC,MAAM,CAAC,KAAO,WAAW,CAACH,EAAG,MAAM,CAACE,YAAY,+BAA+B,CAACN,EAAIQ,GAAGR,EAAIS,GAAGT,EAAIU,GAAG,wBAAwBV,EAAIW,GAAIX,EAAa,WAAE,SAASY,EAAEC,GAAG,OAAOT,EAAG,MAAM,CAACU,IAAID,EAAEP,YAAY,OAAOS,MAAM,CAChWC,QAAS,OACTC,aAAc,MACdC,QAAS,OACTC,eAAgB,kBACd,CAACf,EAAG,MAAM,CAACA,EAAG,KAAK,CAACW,MAAM,CAAGK,OAAQ,IAAM,CAACpB,EAAIQ,GAAGR,EAAIS,GAAGG,EAAES,SAASjB,EAAG,IAAI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AC3BiB,eAAc,iDAJsB,SAQ9BI,EAAS,CACbrB,uBACAoC,UAAU,EACVC,aAAa,GAXqB,SAc9BP,EAAwBV,SAAS,kBAAmB,CACxDC,SACAC,KAAM,YAAiB,IAAdI,EAAc,EAAdA,QACP,GAAIA,EAAS,CACS,GAAhB,EAAKrB,SAAiBG,QAAQK,MAAM,oCAAsCa,GAE9E,IAAMY,EAAc,kBACdC,EAAOC,eAAad,EAASY,GAGnC,OAFAG,eAAQF,QACRG,eAAc,kEAvBgB,0DA6BhB,GAAhB,EAAKrC,SAAiBG,QAAQK,MAAR,MAC1B8B,eAAc,yDA9BsB,4DAkClCC,OAnCe,WAmCN,+JACbpC,QAAQK,MAAM,iBACd,EAAKT,SAAU,EAFF,SAIP,EAAKyC,yBAJE,OAMb,EAAKzC,SAAU,EANF,8CASTyC,uBA5Ce,WA4CU,+JAC7B,EAAKzC,SAAU,EADc,kBAIrB0B,EAAwBV,SAAS,4BAA4B0B,MAAK,YAAc,IAAX9B,EAAW,EAAXA,KACzE,EAAKb,UAAYa,EACjB,EAAKZ,SAAU,KANU,yDAS3B,EAAKA,SAAU,EATY,OAW7B,EAAKA,SAAU,EAXc,6DCdjC,GACET,KAAM,aACNoD,WAAY,CACVC,sBAAJ,QAGE9C,KAAF,EACEiC,QAAF,EAEEc,QATF,WAUI1E,KAAKqE,UAGPM,KAAM,CACJC,SAAU,CACRC,GAAI,CACFC,WAAY,CACVC,MAAO,mBCnD4V,I,YCOzWC,EAAY,eACd,EACAlF,EACA4B,GACA,EACA,KACA,KACA,MAIa,aAAAsD,E","file":"js/helpCenter.47a38027.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('PageContentLayoutOnly',{staticClass:\"is-center\",attrs:{\"role\":\"region\"}},[_c('div',{staticClass:\"level-left level-item title\"},[_vm._v(_vm._s(_vm.$t('helpCenter.title')))]),_vm._l((_vm.documents),function(d,i){return _c('div',{key:i,staticClass:\"card\",style:({\n padding: '20px',\n marginBottom: '8px',\n display: 'flex',\n justifyContent: 'space-between'\n })},[_c('div',[_c('h4',{style:({ margin: 0 })},[_vm._v(_vm._s(d.name))]),_c('p',{style:({ padding: '12px 0' })},[_vm._v(_vm._s(d.description))])]),_c('b-button',{staticClass:\"button is-info is-light is-small is-outline is-rounded\",attrs:{\"size\":\"is-small\"},on:{\"click\":function($event){return _vm.downloadPdf(d.helpCenterDocumentID)}}},[_vm._v(\"View Document\")])],1)})],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export const data = () => ({\r\n documents: [],\r\n loading: false\r\n})\r\n","/*\r\n import { helpCenterDocumentStore } from '@/services/HelpDeskSubject/store'\r\n*/\r\n\r\nimport Vue from 'vue'\r\nimport Vuex from 'vuex'\r\nimport { notifyProblem } from '@/services/notify'\r\nimport kms from '@/services/kms'\r\n\r\nconst isDebug = true\r\n\r\n/* eslint-disable no-empty-pattern */\r\nconst actions = {\r\n /*\r\n const { list } = await helpDeskSubjectStore.dispatch ('getHelpDeskSubjectList'});\r\n */\r\n\r\n async getHelpCenterDocuentList({}) {\r\n console.log('in getHelpCenterDocuentList...')\r\n try {\r\n const results = await kms.get(`/HelpCenterDocuments/HelpCenterDocument/List`)\r\n\r\n if (isDebug == true) console.debug('getHelpCenterDocuentList log=' + JSON.stringify(results))\r\n\r\n return {\r\n list: results.results\r\n }\r\n } catch (exception) {\r\n notifyProblem(`The help desk documents list could not be retrieved.`)\r\n console.error(exception)\r\n }\r\n\r\n return {\r\n list: []\r\n }\r\n },\r\n\r\n async getDocumentFile({ dispatch }, { params, done }) {\r\n const path = `/HelpCenterDocuments/HelpCenterDocument/GetFile`\r\n const result = await kms.get(path, {\r\n params\r\n })\r\n\r\n if (this.isDebug == true) console.debug('getDocumentFile=' + JSON.stringify(result))\r\n\r\n if (dispatch && dispatch != undefined) console.debug(dispatch)\r\n\r\n if (result) {\r\n console.debug(`Successfully opened the help center document in a new tab.`)\r\n done({ details: result })\r\n } else {\r\n console.error('There was a problem opening the help center document.')\r\n }\r\n }\r\n}\r\n/* eslint-enable no-empty-pattern */\r\n\r\nVue.use(Vuex)\r\nexport const helpCenterDocumentStore = new Vuex.Store({\r\n state: {},\r\n mutations: {},\r\n getters: {},\r\n actions\r\n})\r\n","import { helpCenterDocumentStore } from '@/services/HelpCenterDocument/store'\r\nimport { base64toBlob, showPdf } from '@/services/blobutility'\r\nimport { notifyMessage, notifyProblem, notifyWarning } from '@/services/notify'\r\n\r\nexport const methods = {\r\n async downloadPdf(helpCenterDocumentID) {\r\n if (this.isDebug == true) console.debug('downloadPdf...' + helpCenterDocumentID)\r\n\r\n if (!helpCenterDocumentID || helpCenterDocumentID == undefined) {\r\n notifyProblem('There is a problem downloading this document.')\r\n }\r\n\r\n try {\r\n const params = {\r\n helpCenterDocumentID,\r\n asBase64: true,\r\n asRawBase64: true\r\n }\r\n\r\n await helpCenterDocumentStore.dispatch('getDocumentFile', {\r\n params,\r\n done: ({ details }) => {\r\n if (details) {\r\n if (this.isDebug == true) console.debug('base64pdf........................' + details)\r\n\r\n const contentType = 'application/pdf'\r\n const blob = base64toBlob(details, contentType)\r\n showPdf(blob)\r\n notifyMessage(`Successfully opened the help center document in a new tab.`)\r\n return\r\n }\r\n }\r\n })\r\n } catch (e) {\r\n if (this.isDebug == true) console.debug(e)\r\n notifyWarning('There was a problem opening the help center document.')\r\n }\r\n },\r\n\r\n async reload() {\r\n console.debug('in reload....')\r\n this.loading = true\r\n\r\n await this.loadHelpCenterSubjects()\r\n\r\n this.loading = false\r\n },\r\n\r\n async loadHelpCenterSubjects() {\r\n this.loading = false\r\n\r\n try {\r\n await helpCenterDocumentStore.dispatch('getHelpCenterDocuentList').then(({ list }) => {\r\n this.documents = list\r\n this.loading = false\r\n })\r\n } catch (e) {\r\n this.loading = false\r\n }\r\n this.loading = false\r\n }\r\n}\r\n","\r\n\r\n\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!./index.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!./index.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./index.vue?vue&type=template&id=3a025af8&\"\nimport script from \"./index.vue?vue&type=script&lang=js&\"\nexport * from \"./index.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":""}