{"version":3,"sources":["webpack:///./src/utilities/Date/parse.js","webpack:///./src/components/buttons/Button/index.vue?c8d3","webpack:///src/components/buttons/Button/index.vue","webpack:///./src/components/buttons/Button/index.vue?18df","webpack:///./src/components/buttons/Button/index.vue","webpack:///./src/pages/Management/communityCenter/tabs/suggestions/List.vue?6cba","webpack:///./src/pages/Management/communityCenter/tabs/suggestions/keys/methods.js","webpack:///./src/pages/Management/communityCenter/tabs/suggestions/keys/data.js","webpack:///src/pages/Management/communityCenter/tabs/suggestions/List.vue","webpack:///./src/pages/Management/communityCenter/tabs/suggestions/List.vue?92a2","webpack:///./src/pages/Management/communityCenter/tabs/suggestions/List.vue"],"names":["parseDate","date","format","console","debug","parsed","moment","isValid","exception","message","error","render","_vm","this","_h","$createElement","_c","_self","visible","undefined","class","isprimary","attrs","tooltip","disabled","on","$event","preventDefault","onClick","apply","arguments","_v","_s","text","_e","staticRenderFns","props","component","region","filters","rows","columns","perPage","loading","methods","determineRows","list","Array","isArray","map","entry","suggestionID","_get","suggestion","createdBy","createdDate","delete","Button","confirmDeleteSuggestion","askquestion","redirectToNewConversation","detail","redirectToDetail","$router","push","path","id","catch","ownerID","name","params","suggestionid","suggestionownerid","suggestionlabel","$buefy","dialog","confirm","title","confirmText","type","hasIcon","onConfirm","deleteSuggestion","suggestionStore","dispatch","done","reload","loadSuggestions","isDebug","hoaID","hoaId","ellipsisCharacterCount","then","data","showFilters","toggle","suggestions","formatDateFn","value","show","field","label","aria","width","sortable","searchable","styles","dateSelector","display","padding","textAlign","verticalAlign","flexWrap","alignItems","justifyContent","filterButton","float","marginTop","components","PageContentLayoutOnly","ModernTable","computed","watch","mounted","i18n","messages","en"],"mappings":"+HAAA,2DAQaA,EAAY,SAACC,GAAwB,IAAlBC,EAAkB,uDAAT,KACvC,GAAoB,kBAATD,EAET,OADAE,QAAQC,MAAR,+CAA8D,CAAEH,SACzDA,EAGT,IACE,IAAMI,EAASC,IAAOL,GAClBI,EAAOE,YACTN,EAAOK,IAAO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AF,EAEEjD,QAAF,EAEE6E,SAAU,OAAZ,OAAY,CAAZ,GACA,+BACI,MAAJ,YAAM,OAAN,uBACA,sDAIEC,MAAO,GAEPC,QApBF,WAqBI9G,KAAKyE,UAGPsC,KAAM,CACJC,SAAU,CACRC,GAAI,CAAV,sCCnD0Y,I,YCOtYzF,EAAY,eACd,EACA1B,EACAwB,GACA,EACA,KACA,KACA,MAIa,aAAAE,E","file":"js/communityCenter.suggestions.9cf3b441.js","sourcesContent":["/*\r\n Example:\r\n import { parseDate } from '@/utilities/Date/parse'\r\n\r\n const parsedDate = parseDate (date, 'LL');\r\n*/\r\nimport moment from 'moment'\r\n\r\nexport const parseDate = (date, format = 'LL') => {\r\n if (typeof date !== 'string') {\r\n console.debug(`parseDate can only parse a date string. got:`, { date })\r\n return date\r\n }\r\n\r\n try {\r\n const parsed = moment(date)\r\n if (parsed.isValid()) {\r\n date = moment(date).format(format)\r\n }\r\n } catch (exception) {\r\n if (exception && exception.message) {\r\n console.error(exception.message)\r\n } else {\r\n console.error(exception)\r\n }\r\n }\r\n\r\n return date\r\n}\r\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return ((_vm.visible && _vm.visible === true) || _vm.visible === undefined)?_c('b-button',{class:_vm.isprimary !== undefined && _vm.isprimary === true\n ? 'button is-primary is-small is-outline is-rounded'\n : 'button is-info is-light is-small is-outline is-rounded',attrs:{\"title\":_vm.tooltip,\"disabled\":_vm.disabled && _vm.disabled !== undefined && _vm.disabled === true},on:{\"click\":function($event){$event.preventDefault();return _vm.onClick.apply(null, arguments)}}},[_vm._v(_vm._s(_vm.text))]):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\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=036d99d6&\"\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","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('PageContentLayoutOnly',{attrs:{\"role\":\"region\"}},[_c('ModernTable',{attrs:{\"region\":_vm.region,\"filters\":_vm.filters,\"rows\":_vm.rows,\"columns\":_vm.columns,\"pagination\":{\n perPage: 12\n },\"loading\":_vm.loading,\"headerColor\":\"#FFF\",\"condensed\":\"\"}})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import Button from '@/components/buttons/Button'\r\nimport _get from 'lodash/get'\r\nimport { suggestionStore } from '@/services/Suggestion/store'\r\nimport { parseDate } from '@/utilities/Date/parse'\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 suggestionID = _get(entry, 'suggestionID', 0)\r\n const suggestion = _get(entry, 'suggestionText', '')\r\n const createdBy = _get(entry, 'identityInformation.name', '')\r\n const createdDate = parseDate(_get(entry, ['createdDate'], ''), 'LL')\r\n\r\n return {\r\n suggestion: suggestion,\r\n createdBy: createdBy,\r\n createdDate: createdDate,\r\n delete: {\r\n component: Button,\r\n props: {\r\n onClick: async () => {\r\n await this.confirmDeleteSuggestion(suggestionID, suggestion)\r\n },\r\n text: 'Delete'\r\n }\r\n },\r\n askquestion: {\r\n component: Button,\r\n props: {\r\n onClick: () => {\r\n this.redirectToNewConversation(entry)\r\n },\r\n text: 'Ask a Question'\r\n }\r\n },\r\n detail: {\r\n component: Button,\r\n props: {\r\n onClick: () => {\r\n this.redirectToDetail(suggestionID)\r\n },\r\n text: 'Detail'\r\n }\r\n }\r\n }\r\n })\r\n\r\n this.rows = rows\r\n },\r\n\r\n redirectToDetail(suggestionID) {\r\n if (suggestionID) {\r\n this.$router\r\n .push({\r\n path: `/suggestionTabs/${suggestionID}/suggestionDetail#tab`,\r\n id: suggestionID\r\n })\r\n .catch(() => {})\r\n }\r\n },\r\n\r\n redirectToNewConversation(suggestion) {\r\n if (suggestion) {\r\n const suggestionID = _get(suggestion, 'suggestionID', 0)\r\n const ownerID = _get(suggestion, 'ownerID', 0)\r\n const createdBy = _get(suggestion, 'identityInformation.name', '')\r\n\r\n this.$router.push({\r\n name: 'newconversation',\r\n params: {\r\n suggestionid: suggestionID,\r\n suggestionownerid: ownerID,\r\n suggestionlabel: `Add Homeowner - ${createdBy}`\r\n }\r\n })\r\n }\r\n },\r\n\r\n async confirmDeleteSuggestion(suggestionID, suggestion) {\r\n this.$buefy.dialog.confirm({\r\n title: 'Deleting Suggestion',\r\n message: `Are you sure you want to delete this suggestion: \"${suggestion}\"?`,\r\n confirmText: 'Delete Suggestion',\r\n type: 'is-danger',\r\n hasIcon: true,\r\n onConfirm: () => this.deleteSuggestion(suggestionID)\r\n })\r\n },\r\n\r\n async deleteSuggestion(suggestionID) {\r\n if (suggestionID) {\r\n await suggestionStore.dispatch('deleteSuggestion', {\r\n suggestionID: suggestionID,\r\n done: () => {\r\n this.loading = false\r\n this.reload()\r\n }\r\n })\r\n }\r\n },\r\n\r\n async loadSuggestions() {\r\n if (this.isDebug == true) console.debug('in loadSuggestions()...')\r\n\r\n await suggestionStore\r\n .dispatch('getSuggestionList', {\r\n hoaID: this.hoaId,\r\n ellipsisCharacterCount: 100\r\n })\r\n .then(async ({ list }) => {\r\n await this.determineRows(list)\r\n })\r\n },\r\n\r\n async reload() {\r\n this.loading = true\r\n\r\n this.rows = []\r\n await this.loadSuggestions()\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 suggestions: [],\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: 'suggestion',\r\n label: 'Suggestion',\r\n aria: 'Suggestion',\r\n width: '60%',\r\n sortable: true,\r\n searchable: true\r\n },\r\n {\r\n field: 'createdBy',\r\n label: 'Created By',\r\n aria: 'Created By',\r\n width: '15%',\r\n sortable: true,\r\n searchable: true\r\n },\r\n {\r\n field: 'createdDate',\r\n label: 'Created',\r\n date: true,\r\n width: '10%',\r\n sortable: true,\r\n searchable: true\r\n }\r\n ],\r\n\r\n styles: {\r\n dateSelector: {\r\n display: 'flex',\r\n padding: '12px',\r\n textAlign: 'center',\r\n verticalAlign: 'middle',\r\n flexWrap: 'wrap',\r\n alignItems: 'center',\r\n justifyContent: 'flex-end'\r\n },\r\n filterButton: {\r\n float: 'right',\r\n marginTop: '4px'\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=023944b4&\"\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":""}