{"version":3,"sources":["webpack:///./src/pages/manage/certificate-templates/index.vue","webpack:///./src/data/List/CertificateTemplateListDataSource.ts","webpack:///./src/pages/manage/certificate-templates/index.vue?bdfc","webpack:///./src/pages/manage/certificate-templates/index.vue?e47a","webpack:///./src/pages/manage/certificate-templates/index.vue?350c"],"names":["scopedSlots","_vm","attrs","data","on","getObject","remove","CertificateTemplateListDataSource","ListDataSource","constructor","super","config","pageIndex","pageSize","className","id","idx","this","items","findIndex","i","Error","axios","post","baseUrl","unshift","changePriority","error","CertificateTemplates","Vue","dataSource","text","to","disabled","item","copy","$message","__decorate","Component","component","staticRenderFns"],"mappings":"qMAA4J,W,IAAwB,OAA4B,EAAC,WAACA,EAAYC,MAAM,Y,OAAM,EAAC,YAAS,C,MAAI,C,YAA0B,c,MAAe,uB,cAAE,EAAY,Y,YAAkC,O,IAACD,U,YAAyB,G,MAAc,CAAC,SAAS,C,MAAI,C,WAAEE,mBAAM,WAAE,I,YAAyC,O,mBAAU,aAAC,EAAC,MAA4E,IAAmB,MAAC,GAAS,kBAAM,MAAC,CAAC,KAAQ,KAAS,WAAc,uDAAK,MAAO,I,GAAkB,OAAOC,C,MAA+B,CAAC,WAA6GC,CAAE,EAAC,Q,GAAC,C,MAAgCD,SAAKE,GAAoB,oCAA6ED,CAAE,EAAC,uE,GAAC,C,MAAgCD,SAAKG,GAAiB,8BAAuEF,CAAE,EAAC,8C,GAAC,C,MAAgCH,SAASE,GAAU,2BAAgE,2CAAG,IAAG,kBAC/oC,yB,8HCEK,MAAOI,UAA0CC,OACrDC,cACEC,MAAM,CACJC,OAAQ,CACNC,UAAW,EACXC,SAAU,IAEZC,UAAW,wBAIR,WAAWC,GAChB,MAAMC,EAAMC,KAAKC,MAAMC,UAAWC,GAAWA,EAAEL,IAAMA,GACrD,IAAa,IAATC,EAAY,MAAM,IAAIK,MAAM,qBAEhC,IACE,MAAM,KAAElB,SAAemB,IAAMC,KAAK,GAAGN,KAAKO,WAAWT,WAIrD,OAHAE,KAAKC,MAAMO,QAAQtB,SACbc,KAAKS,iBAEJvB,EACP,MAAOwB,GACP,MAAMA,ICrBZ,IAAqBC,EAArB,cAAkDC,OAAlDpB,c,oBACE,KAAAqB,WACE,IAAIvB,EAGN,kBACE,MAAO,CACL,CACEwB,KAAM,UACNC,GAAI,KAEN,CACED,KAAM,uBACNE,UAAU,IAKhB,WAAWC,SACHjB,KAAKa,WAAWK,KAAKD,EAAKnB,IAChCE,KAAKmB,SAAS,+BApBGR,EAAoBS,eAAA,CADxCC,QACoBV,WCJ8Y,I,YCO/ZW,EAAY,eACd,EACA,EACAC,GACA,EACA,KACA,KACA,MAIa,aAAAD,E","file":"js/chunk-2d20fb27.30f6596b.js","sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return _c('data-list',{attrs:{\"breadcrumbs\":_vm.breadcrumbs,\"title\":\"Шаблоны сертификатов\",\"data-source\":_vm.dataSource},scopedSlots:_vm._u([{key:\"actions\",fn:function(data){return [_c('v-menu',{attrs:{\"transition\":\"scale-transition\",\"offset-y\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function({ on, attrs }){return [_c('v-btn',_vm._g(_vm._b({attrs:{\"icon\":\"\"}},'v-btn',attrs,false),on),[_c('v-icon',[_vm._v(\" mdi-dots-vertical \")])],1)]}}],null,true)},[_c('v-list',{attrs:{\"dense\":\"\"}},[_c('v-list-item',{on:{\"click\":function($event){return data.changeItemState(data.item)}}},[_c('v-list-item-title',[_vm._v(\" \"+_vm._s(data.getItemStateName(data.item))+\" \")])],1),_c('v-list-item',{on:{\"click\":function($event){return data.getObject(data.item)}}},[_c('v-list-item-title',[_vm._v(\"Редактировать\")])],1),_c('v-list-item',{on:{\"click\":function($event){return data.remove(data.item)}}},[_c('v-list-item-title',[_vm._v(\"Удалить\")])],1),_c('v-list-item',{on:{\"click\":function($event){return _vm.copy(data.item)}}},[_c('v-list-item-title',[_vm._v(\"Копировать\")])],1)],1)],1)]}}])})\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import axios from \"axios\";\nimport { ListDataSource } from \"./ListDataSource\";\n\nexport class CertificateTemplateListDataSource extends ListDataSource {\n constructor() {\n super({\n config: {\n pageIndex: 1,\n pageSize: 20,\n },\n className: \"certificatetemplate\",\n });\n }\n\n public async copy(id: number) {\n const idx = this.items.findIndex((i: any) => i.id == id);\n if (idx === -1) throw new Error(\"Элемент не найден\");\n\n try {\n const { data } = await axios.post(`${this.baseUrl}/${id}/copy/`);\n this.items.unshift(data);\n await this.changePriority();\n\n return data;\n } catch (error) {\n throw error;\n }\n }\n}\n","\nimport { Vue, Component } from \"vue-property-decorator\";\nimport { CertificateTemplateListDataSource } from \"@/data/List/CertificateTemplateListDataSource\";\n@Component\nexport default class CertificateTemplates extends Vue {\n dataSource: CertificateTemplateListDataSource =\n new CertificateTemplateListDataSource();\n $message: any;\n\n get breadcrumbs() {\n return [\n {\n text: \"Главная\",\n to: \"/\",\n },\n {\n text: \"Шаблоны сертификатов\",\n disabled: true,\n },\n ];\n }\n\n async copy(item: any) {\n await this.dataSource.copy(item.id);\n this.$message(\"Шаблон успешно скопирован\");\n }\n}\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--14-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=ts\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--14-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=ts\"","import { render, staticRenderFns } from \"./index.vue?vue&type=template&id=55bb6b57\"\nimport script from \"./index.vue?vue&type=script&lang=ts\"\nexport * from \"./index.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":""}