{"version":3,"sources":["webpack:///./src/pages/roles/Delete.vue?fa95","webpack:///./src/pages/roles/Delete.vue","webpack:///./src/pages/roles/Delete.vue?4a88","webpack:///./src/pages/roles/Delete.vue?01b4"],"names":["render","_vm","this","_h","$createElement","_c","_self","attrs","active","staticClass","on","$event","preventDefault","save","_v","role","name","isLoading","model","value","callback","$$v","confirmation","expression","$t","validated","_e","staticRenderFns","component","Base","extend","data","undefined","computed","mounted","getRole","methods","get","$route","params","id","then","delete","$router","push","$emit"],"mappings":"uHAAA,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,uBAAwBb,EAAQ,KAAE,CAACI,EAAG,UAAU,CAACI,YAAY,mBAAmB,CAACJ,EAAG,UAAU,CAACE,MAAM,CAAC,MAAQ,gBAAiBN,EAAIc,KAAKC,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,cAAc,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,IAChgCC,EAAkB,G,wBCgDhBC,EAAYC,EAAA,KAAKC,OAAO,CAC1BC,KAD0B,WAEtB,MAAO,CACHvB,QAAQ,EAERc,aAAc,GACdP,UAAMiB,IAGdC,SAAU,CACNR,UADM,WAEF,OAAOvB,KAAKoB,eAAiBpB,KAAKa,KAAKC,OAG/CkB,QAd0B,WAetBhC,KAAKM,QAAS,EACdN,KAAKiC,WAETC,QAAS,CACLD,QADK,WACE,WACHjC,KAAKmC,IAAL,gBAAiCnC,KAAKoC,OAAOC,OAAOC,KAC/CC,MAAK,YAAa,IAAVV,EAAU,EAAVA,KACL,EAAKhB,KAAOgB,EAAKA,SAG7BlB,KAPK,WAOD,WACIX,KAAKuB,WACLvB,KAAKwC,OAAL,gBAAqBxC,KAAKa,KAAKyB,KAAMC,MAAK,WACtC,EAAKE,QAAQC,KAAK,CAAE5B,KAAM,eAC1B,EAAK6B,MAAM,iBAOhB,ICrFoY,I,YCO/Y,EAAY,eACd,EACA7C,EACA2B,GACA,EACA,KACA,KACA,MAIa,e","file":"js/chunk-2d207f92.b3021090.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 role \")])]),(_vm.role)?[_c('section',{staticClass:\"modal-card-body\"},[_c('b-field',{attrs:{\"label\":'Please type \\''+_vm.role.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: 'roles.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 { IRole, IRoleResponse } from '@/interfaces/role';\n\nconst component = Base.extend({\n data() {\n return {\n active: false,\n\n confirmation: '',\n role: undefined as any | IRole,\n };\n },\n computed: {\n validated() : boolean {\n return this.confirmation === this.role.name;\n },\n },\n mounted() {\n this.active = true;\n this.getRole();\n },\n methods: {\n getRole(): void {\n this.get(`roles/${this.$route.params.id}`)\n .then(({ data }) => {\n this.role = data.data;\n });\n },\n save(): void {\n if (this.validated) {\n this.delete(`roles/${this.role.id}`).then(() => {\n this.$router.push({ name: 'roles.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=0bae7937&\"\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":""}