{"version":3,"sources":["webpack:///./src/components/Base/BaseBreadcrumb.vue?654e","webpack:///./src/components/Base/BaseBreadcrumb.vue?80c2","webpack:///./src/components/Base/BaseBreadcrumb.vue?2bb0","webpack:///./src/components/Base/BaseBreadcrumb.vue","webpack:///./src/views/ContentBeheerPageMaken.vue?0331","webpack:///./src/views/ContentBeheerPageMaken.vue?b19f","webpack:///./src/views/ContentBeheerPageMaken.vue?d52d","webpack:///./src/views/ContentBeheerPageMaken.vue","webpack:///./src/mixins/requiresAdminMixin.ts"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","attrs","baseWithItems","staticRenderFns","name","props","items","type","Array","default","text","$t","computed","to","component","_v","_s","isLoading","class","isValidated","on","$event","preventDefault","register","directives","rawName","value","expression","domProps","target","composing","pagename","components","BaseBreadcrumb","BasePage","LoadingBlock","mixins","requiresAdminMixin","data","methods","saveContent","page","locale","i18n","html","then","$store","dispatch","catch","error","finally","$router","push","beforeRouteEnter","from","next","state","auth","roles","includes"],"mappings":"kHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,eAAe,CAACE,YAAY,wBAAwBC,MAAM,CAAC,MAAQP,EAAIQ,kBACtKC,EAAkB,G,qBCIP,GACbC,KAAM,iBACNC,MAAO,CACLC,MAAO,CACLC,KAAMC,MACNC,QAAS,iBAAM,CACb,CACEC,KAAM,EAAKC,GAAG,sBAKtBC,SAAU,CACRV,cADQ,WAEN,OACE,CACEQ,KAAMf,KAAKgB,GAAG,eACdE,GAAI,CAAET,KAAM,UAHhB,sBAKKT,KAAKW,WCxB2Y,I,YCOvZQ,EAAY,eACd,EACArB,EACAU,GACA,EACA,KACA,WACA,MAIa,OAAAW,E,kDClBf,IAAIrB,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,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EFC,OAAQ,CAACC,EAAA,MACTC,KARa,WASX,MAAO,CACLP,SAAU,GACVd,WAAW,EACXE,aAAa,IAGjBoB,QAAS,CACPhB,SADO,WACC,WACN5B,KAAKsB,WAAY,EAEjB,OACGuB,YAAY,CACXC,KAAM9C,KAAKoC,SACXW,OAAQC,EAAA,KAAKD,OACbE,KAAM,+CAEPC,MAAK,WACJ,EAAKd,SAAW,GAEhB,EAAKe,OAAOC,SAAS,gBAAiB,CACpCrC,KAAM,EAAKC,GAAG,wCACdJ,KAAM,eAGTyC,OAAM,SAAAC,GACL,EAAKH,OAAOC,SAAS,gBAAiB,CACpCrC,KAAM,EAAKC,GAAG,qBACdJ,KAAM,cAGT2C,SAAQ,WACP,EAAKjC,WAAY,EACjB,EAAKkC,QAAQC,KAAK,CAAEhD,KAAM,+BCnG6W,I,YCO7YU,EAAY,eACd,EACArB,EACAU,GACA,EACA,KACA,KACA,MAIa,aAAAW,E,iHChBFuB,EAAqB,CAChCgB,iBADgC,SACfxC,EAAIyC,EAAMC,GACpB,OAAMC,MAAMC,KAAKC,OAKlB,OAAMF,MAAMC,KAAKC,MAAMC,SAAS,SAClCJ,IALAA,EAAK,CAAEnD,KAAM","file":"js/chunk-748c663f.1eff5af0b554dd151550.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-breadcrumb',{staticClass:\"bg-white d-print-none\",attrs:{\"items\":_vm.baseWithItems}})}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\nexport default {\n name: \"BaseBreadcrumb\",\n props: {\n items: {\n type: Array,\n default: () => [\n {\n text: this.$t(\"Locatie.title\")\n }\n ]\n }\n },\n computed: {\n baseWithItems() {\n return [\n {\n text: this.$t(\"shared.home\"),\n to: { name: \"Home\" }\n },\n ...this.items\n ];\n }\n }\n};\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/ts-loader/index.js??ref--13-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./BaseBreadcrumb.vue?vue&type=script&lang=ts&\"; 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/ts-loader/index.js??ref--13-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./BaseBreadcrumb.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./BaseBreadcrumb.vue?vue&type=template&id=03bcfc46&scoped=true&\"\nimport script from \"./BaseBreadcrumb.vue?vue&type=script&lang=ts&\"\nexport * from \"./BaseBreadcrumb.vue?vue&type=script&lang=ts&\"\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 \"03bcfc46\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('base-page',[_c('div',{staticClass:\"container\"},[_c('base-breadcrumb',{staticClass:\"mt-4\",attrs:{\"items\":[\n {\n text: _vm.$t('shared.instellingen'),\n to: { name: 'Settings' }\n },\n {\n text: _vm.$t('ContentBeheer.page_maken')\n }\n ]}}),_c('h1',[_vm._v(_vm._s(_vm.$t(\"ContentBeheer.page_maken\")))]),_c('loading-block',{attrs:{\"loading\":_vm.isLoading}},[_c('hr'),_c('form',{class:{ 'was-validated': _vm.isValidated },on:{\"submit\":function($event){$event.preventDefault();return _vm.register($event)}}},[_c('div',{staticClass:\"form-group\"},[_c('label',{attrs:{\"for\":\"pagename\"}},[_vm._v(_vm._s(_vm.$t(\"ContentBeheer.form_pagename\")))]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.pagename),expression:\"pagename\"}],staticClass:\"form-control\",attrs:{\"id\":\"pagename\",\"type\":\"text\",\"required\":\"\"},domProps:{\"value\":(_vm.pagename)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.pagename=$event.target.value}}})]),_c('button',{staticClass:\"btn btn-primary mt-4\",attrs:{\"type\":\"submit\"},on:{\"click\":function($event){_vm.isValidated = true}}},[_vm._v(\" \"+_vm._s(_vm.$t(\"ContentBeheer.form_btn_pageaanmaken\"))+\" \")])])])],1)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { apiClient } from \"@/services/api-client\";\nimport { requiresAdminMixin } from \"@/mixins/requiresAdminMixin\";\nimport LoadingBlock from \"@/components/LoadingBlock.vue\";\nimport BasePage from \"@/components/Base/BasePage.vue\";\nimport BaseBreadcrumb from \"@/components/Base/BaseBreadcrumb.vue\";\nimport { i18n } from \"@/plugins/i18n\";\n\nexport default {\n name: \"ContentBeheerPageMaken\",\n components: {\n BaseBreadcrumb,\n BasePage,\n LoadingBlock\n },\n mixins: [requiresAdminMixin],\n data() {\n return {\n pagename: \"\",\n isLoading: false,\n isValidated: false\n };\n },\n methods: {\n register() {\n this.isLoading = true;\n\n apiClient\n .saveContent({\n page: this.pagename,\n locale: i18n.locale,\n html: \"klik op aanpassen op de pagina te bewerken\"\n })\n .then(() => {\n this.pagename = \"\";\n\n this.$store.dispatch(\"snackbarAdded\", {\n text: this.$t(\"ContentBeheer.page_aangemaakt_succes\"),\n type: \"success\"\n });\n })\n .catch(error => {\n this.$store.dispatch(\"snackbarAdded\", {\n text: this.$t(\"error.server_fout\"),\n type: \"danger\"\n });\n })\n .finally(() => {\n this.isLoading = false;\n this.$router.push({ name: \"ContentPaginasBeheer\" });\n });\n }\n }\n};\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/ts-loader/index.js??ref--13-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ContentBeheerPageMaken.vue?vue&type=script&lang=ts&\"; 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/ts-loader/index.js??ref--13-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ContentBeheerPageMaken.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./ContentBeheerPageMaken.vue?vue&type=template&id=83b1857c&\"\nimport script from \"./ContentBeheerPageMaken.vue?vue&type=script&lang=ts&\"\nexport * from \"./ContentBeheerPageMaken.vue?vue&type=script&lang=ts&\"\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","import store from \"@/store/store\";\n\nexport const requiresAdminMixin = {\n beforeRouteEnter(to, from, next) {\n if (!store.state.auth.roles) {\n next({ name: \"Home\" });\n return;\n }\n\n if (store.state.auth.roles.includes(\"Admin\")) {\n next();\n return;\n }\n\n next({ name: \"Home\" });\n }\n};\n"],"sourceRoot":""}