{"version":3,"sources":["webpack:///./src/components/Apis/ApplicationLocations.vue","webpack:///src/components/Apis/ApplicationLocations.vue","webpack:///./src/components/Apis/ApplicationLocations.vue?f235","webpack:///./src/components/Apis/ApplicationLocations.vue?80d4"],"names":["render","_vm","this","_c","_self","application","showAddLocation","attrs","selectedLocation","hideModal","_e","showEditLocation","showDeleteLocation","on","removeLocationFromList","ProfileToken","length","setShowAddLocation","scopedSlots","_u","key","fn","_v","_s","$t","proxy","staticClass","_l","Locations","location","index","LocationName","Status","$event","setShowEditLocation","setShowDeleteLocation","staticRenderFns","components","ModalAddLocation","ModalEditLocation","ModalDeleteLocation","props","data","computed","_objectSpread","mapState","created","methods","mapMutations","apiLocation","findIndex","l","LocationId","splice","setApplication","component"],"mappings":"yHAAA,IAAIA,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAG,OAAQF,EAAII,YAAaF,EAAG,MAAM,CAAEF,EAAIK,gBAAiBH,EAAG,mBAAmB,CAACI,MAAM,CAAC,UAAYN,EAAIK,gBAAgB,YAAcL,EAAIO,iBAAiB,cAAgBP,EAAIQ,aAAaR,EAAIS,KAAMT,EAAIU,iBAAkBR,EAAG,oBAAoB,CAACI,MAAM,CAAC,UAAYN,EAAIU,iBAAiB,cAAgBV,EAAIQ,UAAU,YAAcR,EAAIO,oBAAoBP,EAAIS,KAAMT,EAAIW,mBAAoBT,EAAG,sBAAsB,CAACI,MAAM,CAAC,UAAYN,EAAIW,mBAAmB,cAAgBX,EAAIQ,UAAU,YAAcR,EAAIO,kBAAkBK,GAAG,CAAC,gBAAkBZ,EAAIa,0BAA0Bb,EAAIS,KAAKP,EAAG,oBAAoB,CAACI,MAAM,CAAC,QAAUN,EAAII,YAAYU,aAAaC,OAAS,EAAE,YAAcf,EAAIgB,oBAAoBC,YAAYjB,EAAIkB,GAAG,CAAC,CAACC,IAAI,QAAQC,GAAG,WAAW,MAAO,CAACpB,EAAIqB,GAAGrB,EAAIsB,GAAGtB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CAACuB,YAAY,QAAQ,CAACvB,EAAG,oBAAoB,CAACI,MAAM,CAAC,KAAO,CAAC,MAAO,iBAAiB,kBAAiB,MAAM,GAAGN,EAAIS,MAE3nE0B,EAAkB,G,4EC6FP,GACfC,WAAA,CACAC,iBAAA,mEACAC,kBAAA,mEACAC,oBAAA,oEAGAC,MAAA,GAEAC,KAAA,WACA,OACApC,iBAAA,EACAK,kBAAA,EACAC,oBAAA,EACAJ,iBAAA,OAIAmC,SAAAC,eAAA,GACAC,eAAA,qCAGAC,QAAA,aAEAC,QAAAH,8BAAA,GACAI,eAAA,4CAEAlC,uBAAA,SAAAmC,GACA,IAAAnB,EAAA,KAAAzB,YAAAuB,UAAAsB,WACA,SAAAC,GAAA,OAAAA,EAAAC,aAAAH,EAAAG,cAEAtB,GAAA,IACA,KAAAzB,YAAAuB,UAAAyB,OAAAvB,EAAA,GACA,KAAAwB,eAAA,KAAAjD,eAIAY,mBAAA,WACA,KAAAX,iBAAA,GAGA4B,oBAAA,SAAAL,GACA,KAAAlB,kBAAA,EAEA,KAAAH,iBAAAqB,GAGAM,sBAAA,SAAAN,GACA,KAAAjB,oBAAA,EAEA,KAAAJ,iBAAAqB,GAGApB,UAAA,WACA,KAAAH,iBAAA,EACA,KAAAK,kBAAA,EACA,KAAAC,oBAAA,EAEA,KAAAJ,iBAAA,SCzJ4W,I,YCOxW+C,EAAY,eACd,EACAvD,EACAoC,GACA,EACA,KACA,KACA,MAIa,aAAAmB,E","file":"js/chunk-2d0e9b18.js?id=bcab26fe8b194c2c4df1","sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c;return (_vm.application)?_c('div',[(_vm.showAddLocation)?_c('ModalAddLocation',{attrs:{\"showModal\":_vm.showAddLocation,\"apiLocation\":_vm.selectedLocation,\"onClickCancel\":_vm.hideModal}}):_vm._e(),(_vm.showEditLocation)?_c('ModalEditLocation',{attrs:{\"showModal\":_vm.showEditLocation,\"onClickCancel\":_vm.hideModal,\"apiLocation\":_vm.selectedLocation}}):_vm._e(),(_vm.showDeleteLocation)?_c('ModalDeleteLocation',{attrs:{\"showModal\":_vm.showDeleteLocation,\"onClickCancel\":_vm.hideModal,\"apiLocation\":_vm.selectedLocation},on:{\"locationDeleted\":_vm.removeLocationFromList}}):_vm._e(),_c('ui-section-header',{attrs:{\"showAdd\":_vm.application.ProfileToken.length > 0,\"addFunction\":_vm.setShowAddLocation},scopedSlots:_vm._u([{key:\"title\",fn:function(){return [_vm._v(_vm._s(_vm.$t( 'Components.Applications.RegisteredApplications.Header_LocationAccess' )))]},proxy:true}],null,false,2544933986)}),_c('table',{staticClass:\"table is-fullwidth is-striped\"},[_c('thead',[_c('tr',[_c('th',[_vm._v(\" \"+_vm._s(_vm.$t( 'Components.Applications.RegisteredApplications.Label_Location' ))+\" \")]),_c('th',[_vm._v(\" \"+_vm._s(_vm.$t('Components.Applications.RegisteredApplications.Label_Status'))+\" \")]),_c('th',[_vm._v(\" \")])])]),_c('tbody',_vm._l((_vm.application.Locations),function(location,index){return _c('tr',{key:index},[_c('td',[_vm._v(\" \"+_vm._s(location.LocationName)+\" \")]),_c('td',{attrs:{\"width\":\"100\"}},[_vm._v(_vm._s(location.Status))]),_c('td',{staticClass:\"has-text-right\",attrs:{\"width\":\"75\"}},[_c('span',{staticClass:\"field is-grouped\"},[_c('span',{staticClass:\"control\"},[_c('span',{staticClass:\"has-text-danger\"},[_c('a',{on:{\"click\":function($event){return _vm.setShowEditLocation(location)}}},[_c('span',{staticClass:\"icon\"},[_c('font-awesome-icon',{attrs:{\"icon\":['fas', 'edit']}})],1)])])]),_c('span',{staticClass:\"control\"},[_c('span',{staticClass:\"has-text-danger\"},[_c('a',{staticClass:\"has-text-danger\",on:{\"click\":function($event){return _vm.setShowDeleteLocation(location)}}},[_c('span',{staticClass:\"icon\"},[_c('font-awesome-icon',{attrs:{\"icon\":['fas', 'trash-alt']}})],1)])])])])])])}),0)])],1):_vm._e()\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n  <div v-if=\"application\">\n    <ModalAddLocation\n      v-if=\"showAddLocation\"\n      :showModal=\"showAddLocation\"\n      :apiLocation=\"selectedLocation\"\n      :onClickCancel=\"hideModal\"\n    />\n\n    <ModalEditLocation\n      v-if=\"showEditLocation\"\n      :showModal=\"showEditLocation\"\n      :onClickCancel=\"hideModal\"\n      :apiLocation=\"selectedLocation\"\n    />\n\n    <ModalDeleteLocation\n      v-if=\"showDeleteLocation\"\n      :showModal=\"showDeleteLocation\"\n      :onClickCancel=\"hideModal\"\n      :apiLocation=\"selectedLocation\"\n      @locationDeleted=\"removeLocationFromList\"\n    />\n\n    <ui-section-header\n      :showAdd=\"application.ProfileToken.length > 0\"\n      :addFunction=\"setShowAddLocation\"\n    >\n      <template v-slot:title>{{\n        $t(\n          'Components.Applications.RegisteredApplications.Header_LocationAccess'\n        )\n      }}</template>\n    </ui-section-header>\n\n    <table class=\"table is-fullwidth is-striped\">\n      <thead>\n        <tr>\n          <th>\n            {{\n              $t(\n                'Components.Applications.RegisteredApplications.Label_Location'\n              )\n            }}\n          </th>\n          <th>\n            {{\n              $t('Components.Applications.RegisteredApplications.Label_Status')\n            }}\n          </th>\n          <th>&nbsp;</th>\n        </tr>\n      </thead>\n\n      <tbody>\n        <tr v-for=\"(location, index) in application.Locations\" :key=\"index\">\n          <td>\n            {{ location.LocationName }}\n          </td>\n          <td width=\"100\">{{ location.Status }}</td>\n          <td width=\"75\" class=\"has-text-right\">\n            <span class=\"field is-grouped\">\n              <span class=\"control\">\n                <span class=\"has-text-danger\">\n                  <a @click=\"setShowEditLocation(location)\">\n                    <span class=\"icon\">\n                      <font-awesome-icon :icon=\"['fas', 'edit']\" />\n                    </span>\n                  </a>\n                </span>\n              </span>\n\n              <span class=\"control\">\n                <span class=\"has-text-danger\">\n                  <a\n                    @click=\"setShowDeleteLocation(location)\"\n                    class=\"has-text-danger\"\n                  >\n                    <span class=\"icon\">\n                      <font-awesome-icon :icon=\"['fas', 'trash-alt']\" />\n                    </span>\n                  </a>\n                </span>\n              </span>\n            </span>\n          </td>\n        </tr>\n      </tbody>\n    </table>\n  </div>\n</template>\n\n<script>\nimport { mapState, mapMutations } from 'vuex'\n\nexport default {\n  components: {\n    ModalAddLocation: () => import('@/components/Apis/ModalAddLocation'),\n    ModalEditLocation: () => import('@/components/Apis/ModalEditLocation'),\n    ModalDeleteLocation: () => import('@/components/Apis/ModalDeleteLocation'),\n  },\n\n  props: {},\n\n  data() {\n    return {\n      showAddLocation: false,\n      showEditLocation: false,\n      showDeleteLocation: false,\n      selectedLocation: null,\n    }\n  },\n\n  computed: {\n    ...mapState('applicationStore', ['application']),\n  },\n\n  created() {},\n\n  methods: {\n    ...mapMutations('applicationStore', ['setApplication']),\n\n    removeLocationFromList(apiLocation) {\n      let index = this.application.Locations.findIndex(\n        (l) => l.LocationId === apiLocation.LocationId\n      )\n      if (index > -1) {\n        this.application.Locations.splice(index, 1)\n        this.setApplication(this.application)\n      }\n    },\n\n    setShowAddLocation() {\n      this.showAddLocation = true\n    },\n\n    setShowEditLocation(location) {\n      this.showEditLocation = true\n\n      this.selectedLocation = location\n    },\n\n    setShowDeleteLocation(location) {\n      this.showDeleteLocation = true\n\n      this.selectedLocation = location\n    },\n\n    hideModal() {\n      this.showAddLocation = false\n      this.showEditLocation = false\n      this.showDeleteLocation = false\n\n      this.selectedLocation = null\n    },\n  },\n}\n</script>\n\n<style></style>\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!./ApplicationLocations.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!./ApplicationLocations.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./ApplicationLocations.vue?vue&type=template&id=6a752094\"\nimport script from \"./ApplicationLocations.vue?vue&type=script&lang=js\"\nexport * from \"./ApplicationLocations.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":""}