{"version":3,"sources":["webpack:///./src/components/Settings/Location/BasicInformation/ModalEditSocialMedia.vue","webpack:///src/components/Settings/Location/BasicInformation/ModalEditSocialMedia.vue","webpack:///./src/components/Settings/Location/BasicInformation/ModalEditSocialMedia.vue?1b7d","webpack:///./src/components/Settings/Location/BasicInformation/ModalEditSocialMedia.vue?bc86"],"names":["render","_vm","this","_c","_self","attrs","$t","isSaving","isSavingSuccess","isSavingError","onClickCancel","saveLocation","showModal","on","scopedSlots","_u","key","fn","staticClass","_l","mLocation","SocialMediaAccounts","account","index","_v","_s","Name","Url","replace","directives","name","rawName","value","Value","expression","domProps","$event","target","composing","$set","_e","proxy","staticRenderFns","components","props","type","Boolean","default","Function","required","data","computed","_objectSpread","mapState","created","JSON","parse","stringify","location","methods","mapMutations","self","locationProvider","saveLocationSocialMediaAccounts","Id","then","response","status","setLocation","setTimeout","catch","error","finally","component"],"mappings":"iJAAIA,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAG,OAAOA,EAAG,qBAAqB,CAACE,MAAM,CAAC,WAAaJ,EAAIK,GAC9G,8EACA,SAAWL,EAAIM,SAAS,gBAAkBN,EAAIO,gBAAgB,cAAgBP,EAAIQ,cAAc,kBAAoBR,EAAIQ,eAAiBR,EAAIO,gBAAgB,cAAgBP,EAAIS,cAAc,YAAcT,EAAIU,aAAa,UAAYV,EAAIW,WAAWC,GAAG,CAAC,WAAaZ,EAAIS,eAAeI,YAAYb,EAAIc,GAAG,CAAC,CAACC,IAAI,UAAUC,GAAG,WAAW,MAAO,CAACd,EAAG,QAAQ,CAACe,YAAY,iCAAiC,CAACf,EAAG,QAAQF,EAAIkB,GAAIlB,EAAImB,UAAUC,qBAAqB,SAASC,EAAQC,GAAO,OAAOpB,EAAG,KAAK,CAACa,IAAIO,GAAO,CAACpB,EAAG,KAAK,CAACA,EAAG,MAAM,CAACF,EAAIuB,GAAGvB,EAAIwB,GAAGH,EAAQI,SAASvB,EAAG,MAAM,C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C,EAAArD,iBAAA,EAEA6D,YAAA,WACAR,EAAAnD,kBACA,SAGA4D,OAAA,SAAAC,GACAV,EAAApD,eAAA,KAEA+D,SAAA,WACAX,EAAAtD,UAAA,SCtH0Y,I,YCOtYkE,EAAY,eACd,EACAzE,EACA0C,GACA,EACA,KACA,KACA,MAIa,aAAA+B,E","file":"js/chunk-2d0aeb67.js?id=e9b196150bc2e8c4f579","sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c;return _c('ui-component-modal',{attrs:{\"modalTitle\":_vm.$t(\n      'Components.Settings.Location.BasicInformation.SocialMedia.Modal.Main_Title'\n    ),\"isSaving\":_vm.isSaving,\"isSavingSuccess\":_vm.isSavingSuccess,\"isSavingError\":_vm.isSavingError,\"hideFooterButtons\":_vm.isSavingError || _vm.isSavingSuccess,\"onClickCancel\":_vm.onClickCancel,\"onClickSave\":_vm.saveLocation,\"showModal\":_vm.showModal},on:{\"closeModal\":_vm.onClickCancel},scopedSlots:_vm._u([{key:\"content\",fn:function(){return [_c('table',{staticClass:\"table is-striped is-fullwidth\"},[_c('tbody',_vm._l((_vm.mLocation.SocialMediaAccounts),function(account,index){return _c('tr',{key:index},[_c('td',[_c('div',[_vm._v(_vm._s(account.Name))]),_c('div',{staticClass:\"is-size-7 has-text-weight-light is-italic has-text-grey\"},[_vm._v(\" \"+_vm._s(account.Url.replace('##value##', ''))+\" \")])]),_c('td',[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(account.Value),expression:\"account.Value\"}],staticClass:\"input\",attrs:{\"type\":\"text\"},domProps:{\"value\":(account.Value)},on:{\"input\":function($event){if($event.target.composing)return;_vm.$set(account, \"Value\", $event.target.value)}}})]),_c('td',[(account.Value)?_c('a',{staticClass:\"has-icon\",attrs:{\"href\":account.Url.replace('##value##', account.Value),\"target\":\"_blank\"}},[_c('span',{staticClass:\"icon\"},[_c('font-awesome-icon',{attrs:{\"icon\":['fas', 'link']}})],1)]):_vm._e()])])}),0)])]},proxy:true}])})\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n  <ui-component-modal\n    :modalTitle=\"\n      $t(\n        'Components.Settings.Location.BasicInformation.SocialMedia.Modal.Main_Title'\n      )\n    \"\n    :isSaving=\"isSaving\"\n    :isSavingSuccess=\"isSavingSuccess\"\n    :isSavingError=\"isSavingError\"\n    :hideFooterButtons=\"isSavingError || isSavingSuccess\"\n    :onClickCancel=\"onClickCancel\"\n    :onClickSave=\"saveLocation\"\n    :showModal=\"showModal\"\n    @closeModal=\"onClickCancel\"\n  >\n    <template v-slot:content>\n      <table class=\"table is-striped is-fullwidth\">\n        <tbody>\n          <tr\n            v-for=\"(account, index) in mLocation.SocialMediaAccounts\"\n            :key=\"index\"\n          >\n            <td>\n              <div>{{ account.Name }}</div>\n              <div\n                class=\"is-size-7 has-text-weight-light is-italic has-text-grey\"\n              >\n                {{ account.Url.replace('##value##', '') }}\n              </div>\n            </td>\n            <td>\n              <input type=\"text\" v-model=\"account.Value\" class=\"input\" />\n            </td>\n            <td>\n              <a\n                v-if=\"account.Value\"\n                :href=\"account.Url.replace('##value##', account.Value)\"\n                target=\"_blank\"\n                class=\"has-icon\"\n              >\n                <span class=\"icon\">\n                  <font-awesome-icon :icon=\"['fas', 'link']\" />\n                </span>\n              </a>\n            </td>\n          </tr>\n        </tbody>\n      </table>\n    </template>\n  </ui-component-modal>\n</template>\n\n<script>\nimport Vue from 'vue'\nimport { mapState, mapMutations } from 'vuex'\nimport { EventBus } from '@/eventbus/event-bus'\nimport locationProvider from '@/providers/location'\n\nexport default {\n  components: {},\n\n  props: {\n    showModal: {\n      type: Boolean,\n      default: false,\n    },\n\n    onClickCancel: {\n      type: Function,\n      required: true,\n    },\n  },\n\n  data() {\n    return {\n      isSaving: false,\n      isSavingSuccess: false,\n      isSavingError: false,\n      mLocation: null,\n    }\n  },\n\n  computed: {\n    ...mapState('locationStore', ['location']),\n  },\n\n  created() {\n    this.mLocation = JSON.parse(JSON.stringify(this.location))\n  },\n\n  methods: {\n    ...mapMutations('locationStore', ['setLocation']),\n\n    saveLocation() {\n      let self = this\n      self.isSaving = true\n\n      locationProvider.methods\n        .saveLocationSocialMediaAccounts(\n          self.location.Id,\n          self.mLocation.SocialMediaAccounts\n        )\n        .then((response) => {\n          if (response.status === 204) {\n            self.setLocation(self.mLocation)\n\n            self.isSavingSuccess = true\n\n            setTimeout(() => {\n              self.onClickCancel()\n            }, 1000)\n          }\n        })\n        .catch((error) => {\n          self.isSavingError = true\n        })\n        .finally(() => {\n          self.isSaving = false\n        })\n    },\n  },\n}\n</script>\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/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ModalEditSocialMedia.vue?vue&type=script&lang=js\"; 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/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ModalEditSocialMedia.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./ModalEditSocialMedia.vue?vue&type=template&id=3ce47d84\"\nimport script from \"./ModalEditSocialMedia.vue?vue&type=script&lang=js\"\nexport * from \"./ModalEditSocialMedia.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":""}