{"version":3,"sources":["webpack:///src/components/Apis/ModalAddLocation.vue","webpack:///./src/components/Apis/ModalAddLocation.vue","webpack:///./src/components/Apis/ModalAddLocation.vue?14cb","webpack:///./src/components/Apis/ModalAddLocation.vue?b750","webpack:///./src/components/Apis/ModalAddLocation.vue?916f","webpack:///./src/components/Apis/ModalAddLocation.vue?fe0e","webpack:///./src/components/Apis/ModalAddLocation.vue?3707","webpack:///./src/components/Apis/ModalAddLocation.vue?71a4","webpack:///./src/eventbus/event-bus.js"],"names":["components","EditAccountRights","props","showModal","type","Boolean","default","onClickCancel","Function","required","data","back","isSaving","isSavingSuccess","isSavingError","itemsPerPage","isSearching","locations","apage","searchTerm","selectedAccount","ProfileId","LocationId","AccountLevel","InvoiceLevel","LocationLevel","OptionLevel","PriceLevel","ReportLevel","ReservationLevel","SpaceLevel","VoucherLevel","selectedLocation","computed","_objectSpread","mapState","created","beforeDestroy","methods","mapMutations","searchLocations","_this","length","locationProvider","getLocations","page","then","response","status","Results","finally","setSelectedLocation","location","addLocationAccount","_this2","self","accountRoleRights","$refs","editAccountRight","roleSettings","Id","application","Status","accountProvider","saveAccount","result","Result","LocationName","Name","Locations","push","setApplication","catch","e","render","_vm","_c","_self","attrs","modalTitle","disableSaveButton","hideFooterButtons","onClickSave","on","closeModal","scopedSlots","_u","key","fn","staticClass","tag","name","directives","rawName","value","expression","placeholder","domProps","keyup","$event","indexOf","keyCode","apply","arguments","input","target","composing","class","click","icon","_l","index","_v","_s","width","_e","mode","ref","editModeDisabled","account","proxy","slot","staticRenderFns","_withStripped","EventBus","Vue"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6FA;AACA;AACA;AACA;AACA;AAEe;EACfA,UAAA;IACAC,iBAAA,WAAAA,kBAAA;MAAA;IAAA;EACA;EAEAC,KAAA;IACAC,SAAA;MACAC,IAAA,EAAAC,OAAA;MACAC,OAAA;IACA;IAEAC,aAAA;MACAH,IAAA,EAAAI,QAAA;MACAC,QAAA;IACA;EAC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Title=\"\"\n    :isSaving=\"isSaving\"\n    :isSavingSuccess=\"isSavingSuccess\"\n    :isSavingError=\"isSavingError\"\n    :disableSaveButton=\"!selectedLocation || isSaving\"\n    :hideFooterButtons=\"isSavingError || isSavingSuccess\"\n    :onClickCancel=\"onClickCancel\"\n    :onClickSave=\"addLocationAccount\"\n    :showModal=\"showModal\"\n    @closeModal=\"onClickCancel\"\n  >\n    <template slot=\"modalTitle\"></template>\n    <template v-slot:content>\n      <div class=\"slider-wrapper\">\n        <transition-group\n          tag=\"div\"\n          class=\"div-slider\"\n          :name=\"back ? 'slideback' : 'slide'\"\n        >\n          <div v-if=\"!selectedLocation\" :key=\"1\" class=\"slideContent\">\n            <div class=\"field has-addons\">\n              <input\n                type=\"text\"\n                v-model=\"searchTerm\"\n                v-on:keyup.13=\"searchLocations\"\n                class=\"input is-small\"\n                placeholder=\"Search locations\"\n              />\n              <button\n                class=\"button is-primary is-small\"\n                :class=\"{ 'is-loading': isSearching }\"\n                @click=\"searchLocations\"\n              >\n                <font-awesome-icon :icon=\"['fas', 'search']\" />\n              </button>\n            </div>\n\n            <table class=\"table is-fullwidth\">\n              <tbody>\n                <tr v-for=\"(location, index) in locations\" :key=\"index\">\n                  <td>{{ location.Name }}</td>\n                  <td width=\"75\" class=\"has-text-right\">\n                    <a @click=\"setSelectedLocation(location)\">\n                      <span class=\"icon\">\n                        <font-awesome-icon :icon=\"['fas', 'plus']\" />\n                      </span>\n                    </a>\n                  </td>\n                </tr>\n              </tbody>\n            </table>\n          </div>\n\n          <div v-if=\"selectedLocation\" :key=\"2\" class=\"slideContent\">\n            <table class=\"table is-fullwidth\">\n              <tbody>\n                <tr>\n                  <td>{{ selectedLocation.Name }}</td>\n                  <td width=\"75\" class=\"has-text-right\">\n                    <a\n                      @click=\"setSelectedLocation(null)\"\n                      class=\"has-text-danger\"\n                    >\n                      <span class=\"icon\">\n                        <font-awesome-icon :icon=\"['fas', 'trash-alt']\" />\n                      </span>\n                    </a>\n                  </td>\n                </tr>\n              </tbody>\n            </table>\n\n            <div v-if=\"selectedLocation\">\n              <transition name=\"fade\" mode=\"out-in\">\n                <div key=\"setRights\">\n                  <EditAccountRights\n                    ref=\"editAccountRight\"\n                    :editModeDisabled=\"false\"\n                    :account=\"selectedAccount\"\n                  />\n                </div>\n              </transition>\n            </div>\n          </div>\n        </transition-group>\n      </div>\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 accountProvider from '@/providers/account'\nimport locationProvider from '@/providers/location'\n\nexport default {\n  components: {\n    EditAccountRights: () => import('@/components/Account/EditAccountRights'),\n  },\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      back: false,\n      isSaving: false,\n      isSavingSuccess: false,\n      isSavingError: false,\n      itemsPerPage: 25,\n      isSearching: false,\n      locations: [],\n      apage: 1,\n      searchTerm: '',\n      selectedAccount: {\n        ProfileId: 0,\n        LocationId: 0,\n        AccountLevel: 'None',\n        InvoiceLevel: 'None',\n        LocationLevel: 'None',\n        OptionLevel: 'None',\n        PriceLevel: 'None',\n        ReportLevel: 'None',\n        ReservationLevel: 'None',\n        SpaceLevel: 'None',\n        VoucherLevel: 'None',\n      },\n      selectedLocation: null,\n    }\n  },\n\n  computed: {\n    ...mapState('applicationStore', ['application']),\n  },\n\n  created() {},\n\n  beforeDestroy() {\n    this.selectedLocation = null\n    this.locations = []\n  },\n\n  methods: {\n    ...mapMutations('applicationStore', ['setApplication']),\n\n    searchLocations() {\n      if (!this.isSearching && this.searchTerm.length > 1) {\n        this.isSearching = true\n\n        locationProvider.methods\n          .getLocations(this.searchTerm, this.page, this.itemsPerPage)\n          .then((response) => {\n            if (response.status === 200) {\n              this.locations = response.data.Results\n            }\n          })\n          .finally(() => {\n            this.isSearching = false\n          })\n      }\n    },\n\n    setSelectedLocation(location) {\n      this.selectedLocation = location\n      this.back = location === null\n    },\n\n    addLocationAccount() {\n      let self = this\n\n      if (!self.isSaving) {\n        self.isSaving = true\n\n        let accountRoleRights = this.$refs.editAccountRight.roleSettings\n        accountRoleRights.LocationId = this.selectedLocation.Id\n        accountRoleRights.ProfileId = this.application.ProfileId\n        accountRoleRights.Status = 'Request'\n\n        accountProvider.methods\n          .saveAccount(accountRoleRights)\n          .then((response) => {\n            if (response.status === 200) {\n              self.isSavingSuccess = true\n\n              let result = response.data.Result\n\n              let location = {\n                LocationId: result.LocationId,\n                LocationName: this.selectedLocation.Name,\n                ProfileId: this.application.ProfileId,\n                AccountLevel: result.AccountLevel,\n                InvoiceLevel: result.InvoiceLevel,\n                LocationLevel: result.LocationLevel,\n                OptionLevel: result.OptionLevel,\n                PriceLevel: result.PriceLevel,\n                ReportLevel: result.ReportLevel,\n                ReservationLevel: result.ReservationLevel,\n                SpaceLevel: result.SpaceLevel,\n                VoucherLevel: result.VoucherLevel,\n                Status: 'Request',\n              }\n\n              this.application.Locations.push(location)\n\n              this.setApplication(this.application)\n\n              self.onClickCancel()\n            }\n          })\n          .catch((e) => {\n            self.isSavingError = true\n          })\n          .finally(() => {})\n      }\n    },\n  },\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.slider-wrapper {\n  .table-data {\n    td {\n      vertical-align: middle;\n      &:first-child {\n        white-space: nowrap;\n      }\n      &:nth-child(2) {\n        width: 100%;\n      }\n    }\n  }\n  .column-search-profile-top,\n  .column-search-company-top {\n    > div {\n      height: 100%;\n    }\n  }\n}\n</style>\n","var render = function render() {\n  var _vm = this,\n    _c = _vm._self._c\n  return _c(\n    \"ui-component-modal\",\n    {\n      attrs: {\n        modalTitle: \"\",\n        isSaving: _vm.isSaving,\n        isSavingSuccess: _vm.isSavingSuccess,\n        isSavingError: _vm.isSavingError,\n        disableSaveButton: !_vm.selectedLocation || _vm.isSaving,\n        hideFooterButtons: _vm.isSavingError || _vm.isSavingSuccess,\n        onClickCancel: _vm.onClickCancel,\n        onClickSave: _vm.addLocationAccount,\n        showModal: _vm.showModal,\n      },\n      on: { closeModal: _vm.onClickCancel },\n      scopedSlots: _vm._u([\n        {\n          key: \"content\",\n          fn: function () {\n            return [\n              _c(\n                \"div\",\n                { staticClass: \"slider-wrapper\" },\n                [\n                  _c(\n                    \"transition-group\",\n                    {\n                      staticClass: \"div-slider\",\n                      attrs: {\n                        tag: \"div\",\n                        name: _vm.back ? \"slideback\" : \"slide\",\n                      },\n                    },\n                    [\n                      !_vm.selectedLocation\n                        ? _c(\"div\", { key: 1, staticClass: \"slideContent\" }, [\n                            _c(\"div\", { staticClass: \"field has-addons\" }, [\n                              _c(\"input\", {\n                                directives: [\n                                  {\n                                    name: \"model\",\n                                    rawName: \"v-model\",\n                                    value: _vm.searchTerm,\n                                    expression: \"searchTerm\",\n                                  },\n                                ],\n                                staticClass: \"input is-small\",\n                                attrs: {\n                                  type: \"text\",\n                                  placeholder: \"Search locations\",\n                                },\n                                domProps: { value: _vm.searchTerm },\n                                on: {\n                                  keyup: function ($event) {\n                                    if (\n                                      !$event.type.indexOf(\"key\") &&\n                                      $event.keyCode !== 13\n                                    )\n                                      return null\n                                    return _vm.searchLocations.apply(\n                                      null,\n                                      arguments\n                                    )\n                                  },\n                                  input: function ($event) {\n                                    if ($event.target.composing) return\n                                    _vm.searchTerm = $event.target.value\n                                  },\n                                },\n                              }),\n                              _c(\n                                \"button\",\n                                {\n                                  staticClass: \"button is-primary is-small\",\n                                  class: { \"is-loading\": _vm.isSearching },\n                                  on: { click: _vm.searchLocations },\n                                },\n                                [\n                                  _c(\"font-awesome-icon\", {\n                                    attrs: { icon: [\"fas\", \"search\"] },\n                                  }),\n                                ],\n                                1\n                              ),\n                            ]),\n                            _c(\"table\", { staticClass: \"table is-fullwidth\" }, [\n                              _c(\n                                \"tbody\",\n                                _vm._l(\n                                  _vm.locations,\n                                  function (location, index) {\n                                    return _c(\"tr\", { key: index }, [\n                                      _c(\"td\", [_vm._v(_vm._s(location.Name))]),\n                                      _c(\n                                        \"td\",\n                                        {\n                                          staticClass: \"has-text-right\",\n                                          attrs: { width: \"75\" },\n                                        },\n                                        [\n                                          _c(\n                                            \"a\",\n                                            {\n                                              on: {\n                                                click: function ($event) {\n                                                  return _vm.setSelectedLocation(\n                                                    location\n                                                  )\n                                                },\n                                              },\n                                            },\n                                            [\n                                              _c(\n                                                \"span\",\n                                                { staticClass: \"icon\" },\n                                                [\n                                                  _c(\"font-awesome-icon\", {\n                                                    attrs: {\n                                                      icon: [\"fas\", \"plus\"],\n                                                    },\n                                                  }),\n                                                ],\n                                                1\n                                              ),\n                                            ]\n                                          ),\n                                        ]\n                                      ),\n                                    ])\n                                  }\n                                ),\n                                0\n                              ),\n                            ]),\n                          ])\n                        : _vm._e(),\n                      _vm.selectedLocation\n                        ? _c(\"div\", { key: 2, staticClass: \"slideContent\" }, [\n                            _c(\"table\", { staticClass: \"table is-fullwidth\" }, [\n                              _c(\"tbody\", [\n                                _c(\"tr\", [\n                                  _c(\"td\", [\n                                    _vm._v(_vm._s(_vm.selectedLocation.Name)),\n                                  ]),\n                                  _c(\n                                    \"td\",\n                                    {\n                                      staticClass: \"has-text-right\",\n                                      attrs: { width: \"75\" },\n                                    },\n                                    [\n                                      _c(\n                                        \"a\",\n                                        {\n                                          staticClass: \"has-text-danger\",\n                                          on: {\n                                            click: function ($event) {\n                                              return _vm.setSelectedLocation(\n                                                null\n                                              )\n                                            },\n                                          },\n                                        },\n                                        [\n                                          _c(\n                                            \"span\",\n                                            { staticClass: \"icon\" },\n                                            [\n                                              _c(\"font-awesome-icon\", {\n                                                attrs: {\n                                                  icon: [\"fas\", \"trash-alt\"],\n                                                },\n                                              }),\n                                            ],\n                                            1\n                                          ),\n                                        ]\n                                      ),\n                                    ]\n                                  ),\n                                ]),\n                              ]),\n                            ]),\n                            _vm.selectedLocation\n                              ? _c(\n                                  \"div\",\n                                  [\n                                    _c(\n                                      \"transition\",\n                                      {\n                                        attrs: { name: \"fade\", mode: \"out-in\" },\n                                      },\n                                      [\n                                        _c(\n                                          \"div\",\n                                          { key: \"setRights\" },\n                                          [\n                                            _c(\"EditAccountRights\", {\n                                              ref: \"editAccountRight\",\n                                              attrs: {\n                                                editModeDisabled: false,\n                                                account: _vm.selectedAccount,\n                                              },\n                                            }),\n                                          ],\n                                          1\n                                        ),\n                                      ]\n                                    ),\n                                  ],\n                                  1\n                                )\n                              : _vm._e(),\n                          ])\n                        : _vm._e(),\n                    ]\n                  ),\n                ],\n                1\n              ),\n            ]\n          },\n          proxy: true,\n        },\n      ]),\n    },\n    [_c(\"template\", { slot: \"modalTitle\" })],\n    2\n  )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \"/**\\n* Colors\\n*/\\n/**\\n* Text sizes\\n*/\\n/**\\n* Column settings\\n*/\\n/**\\n* Font properties\\n*/\\n.slider-wrapper .table-data td[data-v-13fbd0df] {\\n  vertical-align: middle;\\n}\\n.slider-wrapper .table-data td[data-v-13fbd0df]:first-child {\\n  white-space: nowrap;\\n}\\n.slider-wrapper .table-data td[data-v-13fbd0df]:nth-child(2) {\\n  width: 100%;\\n}\\n.slider-wrapper .column-search-profile-top > div[data-v-13fbd0df],\\n.slider-wrapper .column-search-company-top > div[data-v-13fbd0df] {\\n  height: 100%;\\n}\", \"\"]);\n// Exports\nmodule.exports = exports;\n","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ModalAddLocation.vue?vue&type=style&index=0&id=13fbd0df&lang=scss&scoped=true\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = require(\"!../../../node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"ce863422\", content, false, {\"sourceMap\":false,\"shadowMode\":false});\n// Hot Module Replacement\nif(module.hot) {\n // When the styles change, update the <style> tags\n if(!content.locals) {\n   module.hot.accept(\"!!../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ModalAddLocation.vue?vue&type=style&index=0&id=13fbd0df&lang=scss&scoped=true\", function() {\n     var newContent = require(\"!!../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ModalAddLocation.vue?vue&type=style&index=0&id=13fbd0df&lang=scss&scoped=true\");\n     if(newContent.__esModule) newContent = newContent.default;\n     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n     update(newContent);\n   });\n }\n // When the module is disposed, remove the <style> tags\n module.hot.dispose(function() { update(); });\n}","import { render, staticRenderFns } from \"./ModalAddLocation.vue?vue&type=template&id=13fbd0df&scoped=true\"\nimport script from \"./ModalAddLocation.vue?vue&type=script&lang=js\"\nexport * from \"./ModalAddLocation.vue?vue&type=script&lang=js\"\nimport style0 from \"./ModalAddLocation.vue?vue&type=style&index=0&id=13fbd0df&lang=scss&scoped=true\"\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  \"13fbd0df\",\n  null\n  \n)\n\n/* hot reload */\nif (module.hot) {\n  var api = require(\"/github/workspace/node_modules/vue-hot-reload-api/dist/index.js\")\n  api.install(require('vue'))\n  if (api.compatible) {\n    module.hot.accept()\n    if (!api.isRecorded('13fbd0df')) {\n      api.createRecord('13fbd0df', component.options)\n    } else {\n      api.reload('13fbd0df', component.options)\n    }\n    module.hot.accept(\"./ModalAddLocation.vue?vue&type=template&id=13fbd0df&scoped=true\", function () {\n      api.rerender('13fbd0df', {\n        render: render,\n        staticRenderFns: staticRenderFns\n      })\n    })\n  }\n}\ncomponent.options.__file = \"src/components/Apis/ModalAddLocation.vue\"\nexport default component.exports","import mod from \"-!../../../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!./ModalAddLocation.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../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!./ModalAddLocation.vue?vue&type=script&lang=js\"","export * from \"-!../../../node_modules/vue-style-loader/index.js??ref--9-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ModalAddLocation.vue?vue&type=style&index=0&id=13fbd0df&lang=scss&scoped=true\"","export * from \"-!../../../node_modules/cache-loader/dist/cjs.js?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"d2a26fb4-vue-loader-template\\\"}!../../../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--6!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ModalAddLocation.vue?vue&type=template&id=13fbd0df&scoped=true\"","import Vue from 'vue'\nexport const EventBus = new Vue()\n\nexport default EventBus\n"],"sourceRoot":""}