{"version":3,"sources":["webpack:///./src/pages/objectcategories/Delete.vue?c210","webpack:///./src/pages/objectcategories/Delete.vue","webpack:///./src/pages/objectcategories/Delete.vue?4459","webpack:///./src/pages/objectcategories/Delete.vue?7861"],"names":["render","_vm","this","_h","$createElement","_c","_self","attrs","active","staticClass","on","$event","preventDefault","save","_v","category","name","isLoading","model","value","callback","$$v","confirmation","expression","$t","validated","_e","staticRenderFns","component","Base","extend","data","undefined","computed","mounted","getCategory","methods","get","$route","params","id","then","delete","$router","push","$emit"],"mappings":"yHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,SAAS,CAACE,MAAM,CAAC,GAAK,UAAU,CAACF,EAAG,UAAU,CAACE,MAAM,CAAC,OAASN,EAAIO,OAAO,cAAa,IAAQ,CAACH,EAAG,OAAO,CAACI,YAAY,aAAaC,GAAG,CAAC,OAAS,SAASC,GAAgC,OAAxBA,EAAOC,iBAAwBX,EAAIY,UAAU,CAACR,EAAG,SAAS,CAACI,YAAY,mBAAmB,CAACJ,EAAG,IAAI,CAACI,YAAY,oBAAoB,CAACR,EAAIa,GAAG,2BAA4Bb,EAAY,SAAE,CAACI,EAAG,UAAU,CAACI,YAAY,mBAAmB,CAACJ,EAAG,UAAU,CAACE,MAAM,CAAC,MAAQ,gBAAiBN,EAAIc,SAASC,KAAK,iBAAkB,CAACX,EAAG,UAAU,CAACE,MAAM,CAAC,SAAWN,EAAIgB,WAAWC,MAAM,CAACC,MAAOlB,EAAgB,aAAEmB,SAAS,SAAUC,GAAMpB,EAAIqB,aAAaD,GAAKE,WAAW,mBAAmB,IAAI,GAAGlB,EAAG,SAAS,CAACI,YAAY,mBAAmB,CAACJ,EAAG,UAAU,CAACE,MAAM,CAAC,IAAM,WAAW,GAAK,CAACS,KAAM,mBAAmB,MAAQf,EAAIuB,GAAG,SAAS,YAAY,WAAWnB,EAAG,WAAW,CAACE,MAAM,CAAC,SAAWN,EAAIgB,YAAehB,EAAIwB,UAAU,MAAQ,SAAS,KAAO,YAAY,cAAc,aAAa,IAAIxB,EAAIyB,MAAM,MAAM,IACjhCC,EAAkB,G,wBCgDhBC,EAAYC,EAAA,KAAKC,OAAO,CAC1BC,KAD0B,WAEtB,MAAO,CACHvB,QAAQ,EAERc,aAAc,GACdP,cAAUiB,IAGlBC,SAAU,CACNR,UADM,WAEF,OAAOvB,KAAKoB,eAAiBpB,KAAKa,SAASC,OAGnDkB,QAd0B,WAetBhC,KAAKM,QAAS,EACdN,KAAKiC,eAETC,QAAS,CACLD,YADK,WACM,WACPjC,KAAKmC,IAAL,4BAAuDnC,KAAKoC,OAAOC,OAAOC,KAAMC,MAAK,YAAa,IAAVV,EAAU,EAAVA,KACpF,EAAKhB,SAAWgB,EAAKA,SAG7BlB,KANK,WAMD,WACIX,KAAKuB,WACLvB,KAAKwC,OAAL,qBAA0BxC,KAAKa,SAASyB,KAAMC,MAAK,WAC/C,EAAKE,QAAQC,KAAK,CAAE5B,KAAM,oBAC1B,EAAK6B,MAAM,iBAOhB,ICpFoY,I,YCO/Y,EAAY,eACd,EACA7C,EACA2B,GACA,EACA,KACA,KACA,MAIa,e","file":"js/chunk-2d0d9f22.79a55fac.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('portal',{attrs:{\"to\":\"modal\"}},[_c('b-modal',{attrs:{\"active\":_vm.active,\"can-cancel\":false}},[_c('form',{staticClass:\"modal-card\",on:{\"submit\":function($event){$event.preventDefault();return _vm.save()}}},[_c('header',{staticClass:\"modal-card-head\"},[_c('p',{staticClass:\"modal-card-title\"},[_vm._v(\" Delete a category \")])]),(_vm.category)?[_c('section',{staticClass:\"modal-card-body\"},[_c('b-field',{attrs:{\"label\":'Please type \\''+_vm.category.name+'\\' to confirm'}},[_c('b-input',{attrs:{\"disabled\":_vm.isLoading},model:{value:(_vm.confirmation),callback:function ($$v) {_vm.confirmation=$$v},expression:\"confirmation\"}})],1)],1),_c('footer',{staticClass:\"modal-card-foot\"},[_c('sp-link',{attrs:{\"tag\":\"b-button\",\"to\":{name: 'categories.list'},\"label\":_vm.$t('close'),\"icon-left\":\"times\"}}),_c('b-button',{attrs:{\"disabled\":_vm.isLoading || ! _vm.validated,\"label\":\"Delete\",\"type\":\"is-danger\",\"native-type\":\"submit\"}})],1)]:_vm._e()],2)])],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\nimport Base from '@/mixins/Base.vue';\nimport { IObjectCategory, IObjectCategoryResponse } from '@/interfaces/objectcategory';\n\nconst component = Base.extend({\n data() {\n return {\n active: false,\n\n confirmation: '',\n category: undefined as any | IObjectCategory,\n };\n },\n computed: {\n validated() : boolean {\n return this.confirmation === this.category.name;\n },\n },\n mounted() {\n this.active = true;\n this.getCategory();\n },\n methods: {\n getCategory(): void {\n this.get(`object-categories/${this.$route.params.id}`).then(({ data }) => {\n this.category = data.data;\n });\n },\n save(): void {\n if (this.validated) {\n this.delete(`categories/${this.category.id}`).then(() => {\n this.$router.push({ name: 'categories.list' });\n this.$emit('reload');\n });\n }\n },\n },\n});\n\nexport default component;\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--15-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Delete.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--15-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Delete.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./Delete.vue?vue&type=template&id=767cc27c&\"\nimport script from \"./Delete.vue?vue&type=script&lang=ts&\"\nexport * from \"./Delete.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"],"sourceRoot":""}