{"version":3,"sources":["webpack:///./src/pages/Homeowner/communityCenter/tabs/hoaContacts/List.vue?366d","webpack:///./src/services/HoaContacts/store.js","webpack:///./src/pages/Homeowner/communityCenter/tabs/hoaContacts/keys/methods.js","webpack:///./src/pages/Homeowner/communityCenter/tabs/hoaContacts/keys/data.js","webpack:///src/pages/Homeowner/communityCenter/tabs/hoaContacts/List.vue","webpack:///./src/pages/Homeowner/communityCenter/tabs/hoaContacts/List.vue?170d","webpack:///./src/pages/Homeowner/communityCenter/tabs/hoaContacts/List.vue"],"names":["render","_vm","this","_h","$createElement","_c","_self","attrs","_l","item","key","hoaContactID","staticClass","_v","_s","title","phone","description","email","rows","length","_e","staticRenderFns","isDebug","actions","getHoaContactsList","hoaID","console","log","kms","get","results","debug","JSON","stringify","list","notifyProblem","error","deleteHoaContacts","dispatch","done","path","delete","undefined","wasDeleted","_get","notifyMessage","notifyError","addHoaContact","payload","post","updateHoaContact","put","Vue","use","Vuex","hoaContactsStore","Store","state","mutations","getters","methods","determineRows","Array","isArray","map","entry","confirmDeleteHoaContact","$buefy","dialog","confirm","message","confirmText","type","hasIcon","onConfirm","deleteHoaContact","loading","reload","editHoaContact","hoaContact","toggle","selectedHoaContact","createHoaContactModal","currentHoaId","then","data","showFilters","formatDateFn","value","moment","format","filters","show","region","columns","field","label","aria","width","sortable","searchable","date","name","components","PageContentLayoutOnly","computed","watch","mounted","i18n","messages","en","component"],"mappings":"oIAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,wBAAwB,CAACE,MAAM,CAAC,KAAO,WAAW,CAACN,EAAIO,GAAIP,EAAQ,MAAE,SAASQ,GAAM,OAAOJ,EAAG,MAAM,CAACK,IAAID,EAAKE,aAAaC,YAAY,QAAQ,CAACP,EAAG,MAAM,CAACO,YAAY,mCAAmC,CAACP,EAAG,MAAM,CAACO,YAAY,WAAW,CAACP,EAA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D,EAAW,EAAXA,KACP,EAAK2B,cAAc3B,GACnB,EAAK0C,SAAU,KAXN,OAcb,EAAKA,SAAU,EAdF,+C,qBC7DJS,EAAO,iBAAO,CACzB/D,SAAS,EACTsD,SAAS,EACTU,aAAa,EACbN,QAAQ,EACRO,aAAc,SAASC,GACrB,OAAgB,MAATA,EAAgBC,IAAOD,EAAO,uBAAuBE,OAAO,cAAgB,IAGrFC,QAAS,CACPC,MAAM,GAGRC,OAAQ,GAER3E,KAAM,GAEN4E,QAAS,CACP,CACEC,MAAO,QACPC,MAAO,QACPC,KAAM,QACNC,MAAO,MACPC,UAAU,EACVC,YAAY,GAEd,CACEL,MAAO,cACPC,MAAO,cACPC,KAAM,cACNC,MAAO,KACPC,UAAU,EACVC,YAAY,GAEd,CACEL,MAAO,QACPC,MAAO,QACPC,KAAM,QACNC,MAAO,MACPC,UAAU,EACVC,YAAY,GAEd,CACEL,MAAO,QACPC,MAAO,QACPC,KAAM,QACNI,MAAM,EACNH,MAAO,MACPC,UAAU,EACVC,YAAY,MCrBlB,GACEE,KAAM,cACNC,WAAY,CACVC,sBAAJ,QAGEnB,KAAF,EAEEzB,QAAF,EAEE6C,SAAU,OAAZ,OAAY,CAAZ,GACA,iCACA,qEAIEC,MAAO,GAEPC,QAlBF,WAmBI1G,KAAK4E,UAGP+B,KAAM,CACJC,SAAU,CACRC,GAAI,CAAV,uCCtD0Y,I,YCOtYC,EAAY,eACd,EACAhH,EACAsB,GACA,EACA,KACA,KACA,MAIa,aAAA0F,E","file":"js/communityCenter.hoaContacts.8c69f073.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('PageContentLayoutOnly',{attrs:{\"role\":\"region\"}},[_vm._l((_vm.rows),function(item){return _c('div',{key:item.hoaContactID,staticClass:\"pb-2\"},[_c('div',{staticClass:\"container notification is-white\"},[_c('div',{staticClass:\"columns\"},[_c('div',{staticClass:\"column is-8 font-bold\",attrs:{\"position\":\"is-left\"}},[_vm._v(_vm._s(item.title))]),_c('div',{staticClass:\"column is-1\",attrs:{\"position\":\"is-right\"}},[_vm._v(\"Phone:\")]),_c('div',{staticClass:\"column is-3\",attrs:{\"position\":\"is-left\"}},[_vm._v(_vm._s(item.phone))])]),_c('div',{staticClass:\"columns\"},[_c('div',{staticClass:\"column is-8\",attrs:{\"position\":\"is-left\"}},[_vm._v(_vm._s(item.description))]),_c('div',{staticClass:\"column is-1\",attrs:{\"position\":\"is-right\"}},[_vm._v(\"Email:\")]),_c('div',{staticClass:\"column is-3\",attrs:{\"position\":\"is-left\"}},[_vm._v(_vm._s(item.email))])])])])}),(_vm.rows.length === 0)?_c('div',[_c('div',{staticClass:\"container notification is-white\"},[_vm._v(\" There are currently no contacts assigned. \")])]):_vm._e()],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/*\r\n import { hoaContactsStore } from '@/services/HoaContacts/store'\r\n*/\r\n\r\nimport Vue from 'vue'\r\nimport Vuex from 'vuex'\r\nimport _get from 'lodash/get'\r\nimport { notifyProblem, notifyError, notifyMessage } 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 hoaContactsStore.dispatch ('getHoaContactsList', {\r\n hoaId\r\n });\r\n */\r\n\r\n async getHoaContactsList({}, { hoaID }) {\r\n console.log('in getHoaContactsList...' + hoaID)\r\n try {\r\n const results = await kms.get(`/HoaContacts/HoaContact/List?hoaID=${hoaID}`)\r\n\r\n if (isDebug == true) console.debug('getHoaContactsList log=' + JSON.stringify(results))\r\n\r\n return {\r\n list: results.results\r\n }\r\n } catch (exception) {\r\n notifyProblem(`The HOA Contacts 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 deleteHoaContacts({ dispatch }, { hoaContactID, done }) {\r\n try {\r\n const path = `/HoaContacts/HoaContact/${hoaContactID}?forceDelete=false`\r\n\r\n const results = await kms.delete(path)\r\n\r\n if (this.isDebug == true) console.debug('results=' + JSON.stringify(results))\r\n\r\n if (dispatch && dispatch != undefined) console.debug(dispatch)\r\n\r\n const wasDeleted = _get(results, 'deleted', false)\r\n\r\n if (wasDeleted === true) {\r\n notifyMessage(`Successfully deleted the hoa contact.`)\r\n done()\r\n } else {\r\n notifyError('There was a problem deleting the hoa contact.')\r\n }\r\n } catch (exception) {\r\n notifyProblem(`There was a problem deleting the hoa contact.`)\r\n console.error(exception)\r\n }\r\n },\r\n\r\n async addHoaContact({ dispatch }, { payload, done }) {\r\n if (isDebug == true) console.debug('...in addHoaContact')\r\n try {\r\n const results = await kms.post(`/HoaContacts/HoaContact`, {\r\n hoaID: payload.hoaID,\r\n description: payload.description,\r\n phone: payload.phone,\r\n title: payload.title,\r\n email: payload.email\r\n })\r\n\r\n if (this.isDebug == true) console.debug('results=' + JSON.stringify(results))\r\n\r\n if (dispatch && dispatch != undefined) console.debug(dispatch)\r\n\r\n if (results.hoaContactID > 0) {\r\n notifyMessage(`Successfully added the hoa contact.`)\r\n done()\r\n } else {\r\n notifyError('There was a problem adding this hoa contact.')\r\n }\r\n } catch (exception) {\r\n notifyError(`There was a problem adding this hoa contact.`)\r\n console.error(exception)\r\n }\r\n },\r\n\r\n async updateHoaContact({ dispatch }, { payload = {}, done }) {\r\n try {\r\n const results = await kms.put(`/HoaContacts/HoaContact`, payload)\r\n\r\n if (this.isDebug == true) console.debug('results=' + JSON.stringify(results))\r\n\r\n if (dispatch && dispatch != undefined) console.debug(dispatch)\r\n\r\n if (results.hoaContactID > 0) {\r\n notifyMessage(`Successfully updated this hoa contact.`)\r\n done()\r\n } else {\r\n notifyError('There was a problem updating this hoa contact.')\r\n }\r\n } catch (exception) {\r\n notifyError(`There was a problem processing the update for this hoa contact.`)\r\n console.error(exception)\r\n }\r\n }\r\n}\r\n/* eslint-enable no-empty-pattern */\r\n\r\nVue.use(Vuex)\r\nexport const hoaContactsStore = new Vuex.Store({\r\n state: {},\r\n mutations: {},\r\n getters: {},\r\n actions\r\n})\r\n","import _get from 'lodash/get'\r\nimport { hoaContactsStore } from '@/services/HoaContacts/store'\r\n\r\nexport const methods = {\r\n determineRows: async function(list) {\r\n if (!Array.isArray(list)) {\r\n return\r\n }\r\n\r\n var rows = list.map(entry => {\r\n const description = _get(entry, 'description', '')\r\n const title = _get(entry, 'title', '')\r\n const email = _get(entry, 'email', '')\r\n const phone = _get(entry, 'phone', '')\r\n\r\n return {\r\n title,\r\n description,\r\n email,\r\n phone\r\n }\r\n })\r\n\r\n this.rows = rows\r\n },\r\n\r\n async confirmDeleteHoaContact(entry) {\r\n this.$buefy.dialog.confirm({\r\n title: 'Deleting Hoa Contact',\r\n message: `Are you sure you want to delete this Hoa Contact, \"${entry.title}\"?`,\r\n confirmText: 'Delete Hoa Contact',\r\n type: 'is-danger',\r\n hasIcon: true,\r\n onConfirm: async () => await this.deleteHoaContact(entry.hoaContactID)\r\n })\r\n },\r\n\r\n async deleteHoaContact(hoaContactID) {\r\n try {\r\n await hoaContactsStore.dispatch('deleteHoaContacts', {\r\n hoaContactID,\r\n done: () => {\r\n this.loading = false\r\n this.reload()\r\n }\r\n })\r\n } catch (e) {\r\n console.debug('There was an issue deleting this hoa contact.' + e)\r\n }\r\n },\r\n\r\n editHoaContact(hoaContact) {\r\n if (hoaContact) {\r\n this.toggle = true\r\n this.selectedHoaContact = hoaContact\r\n }\r\n },\r\n\r\n createHoaContactModal() {\r\n this.toggle = true\r\n this.selectedHoaContact = null\r\n },\r\n\r\n async reload() {\r\n this.loading = true\r\n\r\n this.rows = []\r\n\r\n await hoaContactsStore\r\n .dispatch('getHoaContactsList', {\r\n hoaID: this.currentHoaId\r\n })\r\n .then(({ list }) => {\r\n this.determineRows(list)\r\n this.loading = false\r\n })\r\n\r\n this.loading = false\r\n }\r\n}\r\n","import moment from 'moment'\r\n\r\nexport const data = () => ({\r\n isDebug: true,\r\n loading: false,\r\n showFilters: false,\r\n toggle: false,\r\n formatDateFn: function(value) {\r\n return value != null ? moment(value, 'YYYY/MM/DD HH:mm:ss').format('MM-DD-YYYY') : ''\r\n },\r\n\r\n filters: {\r\n show: false\r\n },\r\n\r\n region: {},\r\n\r\n rows: [],\r\n\r\n columns: [\r\n {\r\n field: 'title',\r\n label: 'Title',\r\n aria: 'Title',\r\n width: '25%',\r\n sortable: true,\r\n searchable: true\r\n },\r\n {\r\n field: 'description',\r\n label: 'Description',\r\n aria: 'Description',\r\n width: '35',\r\n sortable: true,\r\n searchable: true\r\n },\r\n {\r\n field: 'email',\r\n label: 'Email',\r\n aria: 'Email',\r\n width: '20%',\r\n sortable: true,\r\n searchable: true\r\n },\r\n {\r\n field: 'phone',\r\n label: 'Phone',\r\n aria: 'Phone',\r\n date: true,\r\n width: '20%',\r\n sortable: true,\r\n searchable: true\r\n }\r\n ]\r\n})\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!./List.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!./List.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./List.vue?vue&type=template&id=82e7a0d6&\"\nimport script from \"./List.vue?vue&type=script&lang=js&\"\nexport * from \"./List.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":""}