(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[121],{ /***/ "./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/misc/SearchContactBasicList.vue?vue&type=script&lang=js": /*!***********************************************************************************************************************************************************************************************************************************************************************!*\ !*** ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/misc/SearchContactBasicList.vue?vue&type=script&lang=js ***! \***********************************************************************************************************************************************************************************************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.push.js */ \"./node_modules/core-js/modules/es.array.push.js\");\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'SearchContactBasicList',\n props: {\n value: {\n required: true\n },\n disabled: {\n type: Boolean,\n default: false\n },\n label: {\n type: String,\n default: 'Contact'\n },\n outlined: {\n type: Boolean,\n default: false\n },\n dense: {\n type: Boolean,\n default: false\n },\n readonly: {\n type: Boolean,\n default: false\n },\n multiple: {\n type: Boolean,\n default: false\n },\n error: {\n type: Boolean,\n default: false\n },\n editMode: {\n type: Boolean,\n default: false\n },\n contactTypeProp: {\n type: Array,\n default: () => [1, 2, 3, 4, 5]\n },\n appendIconProp: {\n type: String,\n default: ''\n },\n appendFunctionProp: {\n type: Function,\n default: () => {}\n },\n returnObject: {\n type: Boolean,\n default: false\n },\n projectFilterProp: {\n type: Array,\n default: () => [0]\n }\n },\n data() {\n return {\n search: null,\n contactsList: []\n };\n },\n beforeMount() {\n if (this.value && (Array.isArray(this.value) ? this.value.length > 0 : true) && !this.editMode) {\n if (!this.multiple) {\n this.initContactById(this.value);\n } else {\n for (const contactId of this.value) {\n this.initContactById(contactId);\n }\n }\n }\n },\n computed: {\n selectedContacts: {\n get() {\n return this.value;\n },\n set(val) {\n this.$emit('input', val);\n }\n },\n searchIsDifferent() {\n if (this.search === null) return undefined;\n return this.contactsList.find(c => this.search.includes(c.fullNameLastFirst));\n }\n },\n watch: {\n value(val) {\n if (val === null) {\n this.contactsList = [];\n return;\n }\n this.initContactById(val);\n },\n search(val) {\n if (this.contactsList.length > 0 && this.searchIsDifferent !== undefined) {\n return;\n }\n if (val && val.length >= 3) {\n this.searchContacts(val);\n } else {\n if (this.contactsList.length && val !== '') return;\n this.contactsList = [];\n this.selectedContacts = null;\n }\n },\n contactsList(list) {\n if (list.length === 1 && this.returnObject) {\n this.$emit('returnContactObj', list[0]);\n }\n }\n },\n methods: {\n initContactById(id) {\n this.$store.dispatch('Contact/searchContactWithBasicDataById', id).then(contact => {\n if (this.multiple) {\n this.contactsList.push(contact);\n } else {\n this.contactsList = [contact];\n }\n });\n },\n searchContacts: lodash__WEBPACK_IMPORTED_MODULE_1___default.a.debounce(function (search) {\n if (!search) return;\n this.$store.dispatch('Contact/searchContactsWithBasicData', {\n search: search,\n contactType: this.contactTypeProp,\n projectFilter: this.projectFilterProp\n }).then(contacts => {\n this.contactsList = contacts;\n });\n }, 300),\n remove(item) {\n const index = this.selectedContacts.indexOf(item);\n if (index >= 0) this.selectedContacts.splice(index, 1);\n }\n }\n});\n\n//# sourceURL=webpack:///./src/components/misc/SearchContactBasicList.vue?./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options"); /***/ }), /***/ "./node_modules/cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"57799412-vue-loader-template\"}!./node_modules/vuetify-loader/lib/loader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/misc/SearchContactBasicList.vue?vue&type=template&id=46779eb7&ref=searchContactBasicList": /*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ !*** ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"57799412-vue-loader-template"}!./node_modules/vuetify-loader/lib/loader.js??ref--4!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--7!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/misc/SearchContactBasicList.vue?vue&type=template&id=46779eb7&ref=searchContactBasicList ***! \*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ /*! exports provided: render, staticRenderFns */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\n/* harmony import */ var vuetify_lib_components_VAutocomplete__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vuetify/lib/components/VAutocomplete */ \"./node_modules/vuetify/lib/components/VAutocomplete/index.js\");\n/* harmony import */ var vuetify_lib_components_VChip__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vuetify/lib/components/VChip */ \"./node_modules/vuetify/lib/components/VChip/index.js\");\n/* harmony import */ var vuetify_lib_components_VList__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! vuetify/lib/components/VList */ \"./node_modules/vuetify/lib/components/VList/index.js\");\n\n\n\n\n\n\n\nvar render = function render() {\n var _vm = this,\n _c = _vm._self._c;\n return _c(vuetify_lib_components_VAutocomplete__WEBPACK_IMPORTED_MODULE_0__[\"VAutocomplete\"], {\n attrs: {\n \"search-input\": _vm.search,\n \"item-text\": \"fullNameLastFirst\",\n \"item-value\": \"id\",\n items: _vm.contactsList,\n outlined: _vm.outlined,\n dense: _vm.dense,\n label: _vm.label,\n chips: _vm.multiple,\n \"small-chips\": _vm.multiple,\n multiple: _vm.multiple,\n error: _vm.error,\n disabled: _vm.editMode || _vm.disabled,\n readonly: _vm.readonly,\n \"append-outer-icon\": _vm.appendIconProp,\n \"hide-no-data\": \"\",\n placeholder: \"Type at least 3 characters to search\"\n },\n on: {\n \"update:searchInput\": function ($event) {\n _vm.search = $event;\n },\n \"update:search-input\": function ($event) {\n _vm.search = $event;\n },\n \"click:append-outer\": function ($event) {\n _vm.appendIconProp ? _vm.appendFunctionProp() : \"\";\n }\n },\n scopedSlots: _vm._u([{\n key: \"item\",\n fn: function (data) {\n return [_c(vuetify_lib_components_VList__WEBPACK_IMPORTED_MODULE_2__[\"VListItemAvatar\"], {\n attrs: {\n horizontal: \"\",\n width: \"auto\",\n height: \"auto\"\n }\n }, [_c(vuetify_lib_components_VChip__WEBPACK_IMPORTED_MODULE_1__[\"VChip\"], {\n staticClass: \"ma-2\",\n attrs: {\n color: \"secondary\",\n pill: \"\"\n }\n }, [_vm._v(\" \" + _vm._s(data.item.fullNameLastFirst) + \" \")])], 1), _c(vuetify_lib_components_VList__WEBPACK_IMPORTED_MODULE_2__[\"VListItemContent\"], [_c(vuetify_lib_components_VList__WEBPACK_IMPORTED_MODULE_2__[\"VListItemTitle\"], [_vm._v(\" \" + _vm._s(data.item.email) + \" \")]), _c(vuetify_lib_components_VList__WEBPACK_IMPORTED_MODULE_2__[\"VListItemSubtitle\"], [_vm._v(\" \" + _vm._s(_vm._f(\"prettyPhoneNumber\")(data.item.primaryPhone)) + \" \")])], 1)];\n }\n }]),\n model: {\n value: _vm.selectedContacts,\n callback: function ($$v) {\n _vm.selectedContacts = $$v;\n },\n expression: \"selectedContacts\"\n }\n });\n};\nvar staticRenderFns = [];\nrender._withStripped = true;\n\n\n//# sourceURL=webpack:///./src/components/misc/SearchContactBasicList.vue?./node_modules/cache-loader/dist/cjs.js?%7B%22cacheDirectory%22:%22node_modules/.cache/vue-loader%22,%22cacheIdentifier%22:%2257799412-vue-loader-template%22%7D!./node_modules/vuetify-loader/lib/loader.js??ref--4!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--7!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options"); /***/ }), /***/ "./src/components/misc/SearchContactBasicList.vue": /*!********************************************************!*\ !*** ./src/components/misc/SearchContactBasicList.vue ***! \********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _SearchContactBasicList_vue_vue_type_template_id_46779eb7_ref_searchContactBasicList__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SearchContactBasicList.vue?vue&type=template&id=46779eb7&ref=searchContactBasicList */ \"./src/components/misc/SearchContactBasicList.vue?vue&type=template&id=46779eb7&ref=searchContactBasicList\");\n/* harmony import */ var _SearchContactBasicList_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./SearchContactBasicList.vue?vue&type=script&lang=js */ \"./src/components/misc/SearchContactBasicList.vue?vue&type=script&lang=js\");\n/* empty/unused harmony star reexport *//* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ \"./node_modules/vue-loader/lib/runtime/componentNormalizer.js\");\n\n\n\n\n\n/* normalize component */\n\nvar component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(\n _SearchContactBasicList_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n _SearchContactBasicList_vue_vue_type_template_id_46779eb7_ref_searchContactBasicList__WEBPACK_IMPORTED_MODULE_0__[\"render\"],\n _SearchContactBasicList_vue_vue_type_template_id_46779eb7_ref_searchContactBasicList__WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"],\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (false) { var api; }\ncomponent.options.__file = \"src/components/misc/SearchContactBasicList.vue\"\n/* harmony default export */ __webpack_exports__[\"default\"] = (component.exports);\n\n//# sourceURL=webpack:///./src/components/misc/SearchContactBasicList.vue?"); /***/ }), /***/ "./src/components/misc/SearchContactBasicList.vue?vue&type=script&lang=js": /*!********************************************************************************!*\ !*** ./src/components/misc/SearchContactBasicList.vue?vue&type=script&lang=js ***! \********************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_cache_loader_dist_cjs_js_ref_13_0_node_modules_babel_loader_lib_index_js_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SearchContactBasicList_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/babel-loader/lib!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib??vue-loader-options!./SearchContactBasicList.vue?vue&type=script&lang=js */ \"./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/misc/SearchContactBasicList.vue?vue&type=script&lang=js\");\n/* empty/unused harmony star reexport */ /* harmony default export */ __webpack_exports__[\"default\"] = (_node_modules_cache_loader_dist_cjs_js_ref_13_0_node_modules_babel_loader_lib_index_js_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SearchContactBasicList_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]); \n\n//# sourceURL=webpack:///./src/components/misc/SearchContactBasicList.vue?"); /***/ }), /***/ "./src/components/misc/SearchContactBasicList.vue?vue&type=template&id=46779eb7&ref=searchContactBasicList": /*!*****************************************************************************************************************!*\ !*** ./src/components/misc/SearchContactBasicList.vue?vue&type=template&id=46779eb7&ref=searchContactBasicList ***! \*****************************************************************************************************************/ /*! exports provided: render, staticRenderFns */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_57799412_vue_loader_template_node_modules_vuetify_loader_lib_loader_js_ref_4_node_modules_cache_loader_dist_cjs_js_ref_13_0_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_7_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SearchContactBasicList_vue_vue_type_template_id_46779eb7_ref_searchContactBasicList__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"57799412-vue-loader-template\"}!../../../node_modules/vuetify-loader/lib/loader.js??ref--4!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/babel-loader/lib!../../../node_modules/vue-loader/lib/loaders/templateLoader.js??ref--7!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib??vue-loader-options!./SearchContactBasicList.vue?vue&type=template&id=46779eb7&ref=searchContactBasicList */ \"./node_modules/cache-loader/dist/cjs.js?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"57799412-vue-loader-template\\\"}!./node_modules/vuetify-loader/lib/loader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/misc/SearchContactBasicList.vue?vue&type=template&id=46779eb7&ref=searchContactBasicList\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_57799412_vue_loader_template_node_modules_vuetify_loader_lib_loader_js_ref_4_node_modules_cache_loader_dist_cjs_js_ref_13_0_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_7_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SearchContactBasicList_vue_vue_type_template_id_46779eb7_ref_searchContactBasicList__WEBPACK_IMPORTED_MODULE_0__[\"render\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_57799412_vue_loader_template_node_modules_vuetify_loader_lib_loader_js_ref_4_node_modules_cache_loader_dist_cjs_js_ref_13_0_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_7_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SearchContactBasicList_vue_vue_type_template_id_46779eb7_ref_searchContactBasicList__WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"]; });\n\n\n\n//# sourceURL=webpack:///./src/components/misc/SearchContactBasicList.vue?"); /***/ }) }]);