{"version":3,"sources":["webpack:///./src/components/Shared/Modal.vue","webpack:///src/components/Shared/Modal.vue","webpack:///./src/components/Shared/Modal.vue?3a8c","webpack:///./src/components/Shared/Modal.vue?e0a5","webpack:///./src/components/Users/ViewFor.vue","webpack:///src/components/Users/ViewFor.vue","webpack:///./src/components/Users/ViewFor.vue?d4c1","webpack:///./src/components/Users/ViewFor.vue?02f7","webpack:///./src/components/Users/ViewFor.vue?f5e0","webpack:///./src/service/OrganizationService.js","webpack:///./src/utils/jwt.js","webpack:///./src/components/Shared/Header.vue","webpack:///src/components/Shared/Header.vue","webpack:///./src/components/Shared/Header.vue?44b0","webpack:///./src/components/Shared/Header.vue?db74","webpack:///./src/components/Shared/Footer.vue?5f20","webpack:///./src/components/Shared/Footer.vue","webpack:///./src/components/Shared/Footer.vue?9559","webpack:///./src/components/Users/ViewFor.vue?5336"],"names":["render","_vm","this","_c","_self","staticClass","staticStyle","_t","staticRenderFns","components","Header","Footer","component","attrs","filtered","$t","on","$event","searchUsers","model","value","selectedValue","callback","$$v","expression","onSubmit","Modal","Button","data","options","loading","service","created","mounted","then","id","label","option","queue","methods","setTimeout","axios","localStorage","location","response","OrganizationService","organizationId","get","responseType","base64logo","Convert","arrayBufferToBase64","userId","role","email","post","userDetails","delete","JwtToken","token","getItem","jwtDecode","decoded","isPresent","getProperty","parseInt","orgId","systemAdmin","roles","JSON","parse","association","find","x","orgid","associations","profileSwitcher","toLowerCase","name","style","customStyle","_v","props","type","default","fontSize","_m","script","module","exports","Component","__i18n","push","_Ctor"],"mappings":"kHAAA,IAAIA,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAG,OAAOA,EAAG,MAAM,CAACE,YAAY,mCAAmC,CAACF,EAAG,MAAM,CAACE,YAAY,WAAWC,YAAY,CAAC,YAAY,UAAU,CAACH,EAAG,SAAS,CAACG,YAAY,CAAC,OAAS,WAAWL,EAAIM,GAAG,WAAWJ,EAAG,SAAS,CAACG,YAAY,C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AAG,MAAM,CAACE,YAAY,WAAWQ,MAAM,CAAC,GAAK,OAAO,IAAM,0BAA0B,IAAM,4BAA4BV,EAAG,KAAK,CAACE,YAAY,WAAWQ,MAAM,CAAC,GAAK,mBAAmB,CAACZ,EAAIgF,GAAG,oCAAoC9E,EAAG,MAAMF,EAAIgF,GAAG,uBAAuB9E,EAAG,IAAI,CAACU,MAAM,CAAC,KAAO,oBAAoB,CAACZ,EAAIgF,GAAG,mBAAmB9E,EAAG,MAAMF,EAAIgF,GAAG,sBAAsB9E,EAAG,IAAI,CAACU,MAAM,CAAC,KAAO,2CAA2C,CAACZ,EAAIgF,GAAG,2C,wBCD5jBM,EAAS,GAMT3E,EAAY,eACd2E,EACAvF,EACAQ,GACA,EACA,KACA,WACA,MAIa,OAAAI,E,4BClBf4E,EAAOC,QAAU,SAAUC,GACzBA,EAAU7D,QAAQ8D,OAASD,EAAU7D,QAAQ8D,QAAU,GACvDD,EAAU7D,QAAQ8D,OAAOC,KAAK,sGACvBF,EAAU7D,QAAQgE","file":"js/chunk-50245bb1.0fef024c.js","sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"p-grid p-fluid p-justify-center\"},[_c('div',{staticClass:\"p-col-12\",staticStyle:{\"max-width\":\"460px\"}},[_c('Header',{staticStyle:{\"margin\":\"2em 0\"}}),_vm._t(\"default\"),_c('Footer',{staticStyle:{\"margin-top\":\"4em\"}})],2)])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n \n\n\n\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!./Modal.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!./Modal.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Modal.vue?vue&type=template&id=2199b5e2&\"\nimport script from \"./Modal.vue?vue&type=script&lang=js&\"\nexport * from \"./Modal.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 render(){var _vm=this,_c=_vm._self._c;return _c('Modal',[_c('form',{staticClass:\"p-grid p-fluid p-justify-end\",attrs:{\"method\":\"post\"}},[_c('AutoComplete',{staticClass:\"p-col-12\",attrs:{\"field\":\"label\",\"suggestions\":_vm.filtered,\"placeholder\":this.$t('loginAs'),\"dropdown\":true},on:{\"complete\":function($event){return _vm.searchUsers($event)}},model:{value:(_vm.selectedValue),callback:function ($$v) {_vm.selectedValue=$$v},expression:\"selectedValue\"}}),_c('div',{staticClass:\"p-col-6\"},[_c('Button',{staticStyle:{\"margin-top\":\"4em\"},attrs:{\"id\":\"continue\",\"label\":this.$t('continue')},on:{\"click\":function($event){return _vm.onSubmit()}}})],1)],1)])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n \n \n \n\n\n\n\n\n loginAs: \"Choose company to view for\"\n currentlyLoggedInAs: \"currently logged in\"\n\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!./ViewFor.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!./ViewFor.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ViewFor.vue?vue&type=template&id=2e7d8a07&\"\nimport script from \"./ViewFor.vue?vue&type=script&lang=js&\"\nexport * from \"./ViewFor.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\n/* custom blocks */\nimport block0 from \"./ViewFor.vue?vue&type=custom&index=0&blockType=i18n&lang=yaml&locale=en\"\nif (typeof block0 === 'function') block0(component)\n\nexport default component.exports","import mod from \"-!../../../node_modules/@kazupon/vue-i18n-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ViewFor.vue?vue&type=custom&index=0&blockType=i18n&lang=yaml&locale=en\"; export default mod; export * from \"-!../../../node_modules/@kazupon/vue-i18n-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ViewFor.vue?vue&type=custom&index=0&blockType=i18n&lang=yaml&locale=en\"","import axios from \"axios\";\nimport {Convert} from \"@/utils/convert\";\n\nexport default class OrganizationService {\n\n getOrganizationLogo(organizationId) {\n return axios.get(`api/v4/organizations/${organizationId}/logo`, {responseType: 'arraybuffer'})\n .then((response) => {\n const base64logo = Convert.arrayBufferToBase64(response.data);\n return `data:image/png;base64,${base64logo}`;\n });\n }\n\n getOrganizationTree() {\n return axios.get(`/api/v4/organizations?summarized=true`);\n }\n\n getAssociate(organizationId, userId) {\n return axios.get(`/api/v4/organizations/${organizationId}/associates/${userId}`);\n }\n\n getAssociates(organizationId) {\n return axios.get(`/api/v4/organizations/${organizationId}/associates`);\n }\n\n associateUser(organizationId, role, email) {\n return axios.post(`/api/v4/organizations/${organizationId}/associates`, {\n email: email,\n role: role\n });\n }\n\n createGuest(organizationId, userDetails) {\n return axios.post(`/api/v4/organizations/${organizationId}/associates/guests`, userDetails);\n }\n\n disassociateUser(organizationId, userId) {\n return axios.delete(`/api/v4/organizations/${organizationId}/associates/${userId}`);\n }\n}\n","import jwtDecode from \"jwt-decode\";\n\nexport class JwtToken {\n\n static decoded() {\n const token = localStorage.getItem('access_token');\n\n return token ? jwtDecode(token) : null;\n }\n\n static isPresent() {\n return this.decoded();\n }\n\n static notPresent() {\n return !this.isPresent();\n }\n\n static userId() {\n const userId = this.getProperty('user_id');\n\n return parseInt(userId);\n }\n\n static organizationId() {\n const orgId = this.getProperty('orgid');\n\n return parseInt(orgId);\n }\n\n static isSystemAdmin() {\n const systemAdmin = this.getProperty('system_admin');\n\n return systemAdmin === 'true';\n }\n\n static isGuest() {\n const roles = JSON.parse(this.getProperty('roles'));\n\n const organizationId = this.organizationId();\n const association = roles.find(x => x.orgid === organizationId);\n\n return association && association.role === 'Guest';\n }\n\n static associations() {\n return JSON.parse(this.getProperty('roles'))\n }\n\n static isAdmin() {\n const associations = JwtToken.associations();\n\n const organizationId = this.organizationId();\n const association = associations.find(x => x.orgid === organizationId);\n\n return association && association.role === 'Admin';\n }\n\n static isProfileSwitcher() {\n\n const profileSwitcher = this.getProperty('ProfilSwitcher');\n\n return profileSwitcher && profileSwitcher.toLowerCase() === \"true\";\n }\n\n static getProperty(name) {\n\n const token = this.decoded();\n\n if (token) {\n return token[name];\n }\n\n return null;\n }\n}","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('nav',{staticClass:\"p-grid p-fluid p-justify-center\"},[_c('header',{staticClass:\"p-col-12\",staticStyle:{\"text-align\":\"center\"}},[_c('h1',{style:(_vm.customStyle)},[_vm._t(\"default\",function(){return [_vm._v(\"m-navigator\")]})],2)])])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n \n\n\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!./Header.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!./Header.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Header.vue?vue&type=template&id=3d3dae3f&\"\nimport script from \"./Header.vue?vue&type=script&lang=js&\"\nexport * from \"./Header.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","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Footer.vue?vue&type=style&index=0&id=da3b6fa8&prod&scoped=true&lang=css&\"","var render = function render(){var _vm=this,_c=_vm._self._c;return _vm._m(0)\n}\nvar staticRenderFns = [function (){var _vm=this,_c=_vm._self._c;return _c('footer',{staticClass:\"p-grid p-fluid p-justify-center\"},[_c('img',{staticClass:\"p-col-12\",attrs:{\"id\":\"logo\",\"src\":\"/assets/images/logo.png\",\"alt\":\"Intersolia Danmark A/S\"}}),_c('h6',{staticClass:\"p-col-12\",attrs:{\"id\":\"footer-details\"}},[_vm._v(\"\\n Intersolia Danmark A/S\"),_c('br'),_vm._v(\"\\n Telefon: \"),_c('a',{attrs:{\"href\":\"tel:+4588532453\"}},[_vm._v(\"+45 8853 2453\")]),_c('br'),_vm._v(\"\\n E-mail: \"),_c('a',{attrs:{\"href\":\"mailto:Intersolia@intersoliadenmark.dk\"}},[_vm._v(\"intersolia@intersoliadenmark.dk\")])])])\n}]\n\nexport { render, staticRenderFns }","import { render, staticRenderFns } from \"./Footer.vue?vue&type=template&id=da3b6fa8&scoped=true&\"\nvar script = {}\nimport style0 from \"./Footer.vue?vue&type=style&index=0&id=da3b6fa8&prod&scoped=true&lang=css&\"\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 \"da3b6fa8\",\n null\n \n)\n\nexport default component.exports","module.exports = function (Component) {\n Component.options.__i18n = Component.options.__i18n || []\n Component.options.__i18n.push('{\"en\":{\"loginAs\":\"Choose company to view for\",\"currentlyLoggedInAs\":\"currently logged in\"}}')\n delete Component.options._Ctor\n}\n"],"sourceRoot":""}