{"version":3,"sources":["webpack:///./src/pages/manage/events/zones/schedules/index.vue","webpack:///./src/pages/manage/events/zones/schedules/index.vue?c4a4","webpack:///./src/pages/manage/events/zones/schedules/index.vue?788e","webpack:///./src/pages/manage/events/zones/schedules/index.vue?11f5"],"names":["loaded","attrs","_vm","breadcrumbs","dataSource","scopedSlots","_u","key","fn","item","staticClass","on","setDefault","routeToPage","fields","_e","staticRenderFns","EventList","Vue","constructor","icons","plus","mdiPlus","headers","text","value","sortable","editor","type","outlined","label","name","validations","required","eventObjectDataSource","ObjectDataSource","id","this","$route","params","eventId","config","className","model","caption","ListDataSource","pageIndex","pageSize","filter","Filter","toFilterString","_this$eventObjectData","to","exact","disabled","get","updateField","fieldName","fieldValue","$message","update","add","$router","push","scheduleId","__decorate","Ref","Component","components","DataEditorDialog","component"],"mappings":"iKAAyF,EAAYA,W,IAAkCC,EAAM,K,EAAC,WAAoC,EAAC,kB,OAAa,SAAcC,EAAIC,SAAW,a,MAAC,CAAuC,iBAAiB,EAACC,QAAW,mBAACC,YAAgBC,EAAI,YAACC,4BAAS,SAACC,cAAG,EAAU,Y,YAA2B,O,aAAkB,W,MAAK,W,MAAC,CAAe,iBAAiBP,IAAO,MAAO,QAAK,CAACC,EAAG,OAAO,CAAyD,OAAM,KAAC,KAAW,UAAW,mD,OAAeO,GAAM,C,IAAE,Y,GAAuBC,e,UAAiD,UAAcR,CAA6D,YAAC,YAACS,MAAG,CAAC,eAAS,G,cAA4BC,wBAAmB,gCAAC,IAAI,oDAAsC,C,IAAE,U,GAAmBF,e,UAAqE,UAAWG,C,YAAoB,4BAAC,IAAIX,MAAO,SAAU,GAAsB,8BAAuE,MAAQ,+BAAQ,MAAO,EAAC,cAA4B,SAAY,EAACY,sBAAM,aAAG,MAAKC,CACnmC,kCACGC,SAAe,U,oICSnB,IAAqBC,EAArB,cAAuCC,OAAvCC,c,oBAEE,KAAAC,MAAa,CACXC,KAAMC,SAGR,KAAAC,QAAe,CACb,CACEC,KAAM,KACNC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,KAAKsB,SAAS,sBAGhB9C,YAAYuB,GACVC,KAAKyB,QAAQC,KAAK,CAChBhC,KAAM,oBACNQ,OAAQ,CAAEC,QAASH,KAAKC,OAAOC,OAAOC,QAASwB,WAAY5B,OAtHhD6B,eAAA,CAAdC,eAAI,W,6BADcjD,EAASgD,eAAA,CAH7BE,eAAU,CACTC,WAAY,CAAEC,4BAEKpD,WCXkb,I,YCOncqD,EAAY,eACd,EACA,EACAtD,GACA,EACA,KACA,KACA,MAIa,aAAAsD,E","file":"js/chunk-2d0c558a.30a185c6.js","sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return (_vm.loaded)?_c('div',[_c('data-list',{attrs:{\"custom-headers\":_vm.headers,\"title\":\"Расписание\",\"breadcrumbs\":_vm.breadcrumbs,\"custom-create-item-fields\":_vm.fields,\"data-source\":_vm.dataSource},scopedSlots:_vm._u([{key:\"add\",fn:function(){return [_c('v-btn',{attrs:{\"color\":\"primary\"},on:{\"click\":_vm.add}},[_c('v-icon',{attrs:{\"left\":\"\"}},[_vm._v(\" \"+_vm._s(_vm.icons.plus)+\" \")]),_vm._v(\" Добавить \")],1)]},proxy:true},{key:\"isDefault\",fn:function({ item }){return [_c('v-switch',{staticClass:\"pa-0 ma-0\",attrs:{\"hide-details\":\"\",\"input-value\":_vm.eventObjectDataSource.model.defaultScheduleId === item.id},on:{\"change\":function($event){return _vm.setDefault(item.id)}}})]}},{key:\"caption\",fn:function({ item }){return [_c('span',{staticClass:\"blue--text cursor-pointer\",on:{\"click\":function($event){return _vm.routeToPage(item.id)}}},[_vm._v(\" \"+_vm._s(item.caption)+\" \")])]}}],null,false,3332891156)}),(_vm.loaded)?_c('data-editor-dialog',{ref:\"editor\",attrs:{\"title\":\"Добавить новое расписание\",\"fields\":_vm.fields}}):_vm._e()],1):_vm._e()\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\nimport { Vue, Component, Ref } from \"vue-property-decorator\";\nimport { ListDataSource } from \"@/data/List/ListDataSource\";\nimport DataEditorDialog from \"@/components/helpers/data/editor-dialog.vue\";\nimport { mdiPlus } from \"@mdi/js\";\nimport { ObjectDataSource } from \"@/data/Object/ObjecDatatSource\";\nimport { required } from \"@/cms-services/consts\";\nimport { Filter } from \"@/cms-services/filter\";\n@Component({\n components: { DataEditorDialog },\n})\nexport default class EventList extends Vue {\n @Ref(\"editor\") editor!: DataEditorDialog;\n icons: any = {\n plus: mdiPlus,\n };\n\n headers: any = [\n {\n text: \"ID\",\n value: \"id\",\n sortable: true,\n },\n {\n text: \"Дата создания\",\n value: \"createDate\",\n sortable: true,\n },\n {\n text: \"Заголовок\",\n value: \"caption\",\n sortable: true,\n },\n {\n text: \"По умолчанию\",\n value: \"isDefault\",\n },\n {\n text: \"Статус\",\n value: \"instanceStateId\",\n sortable: false,\n },\n ];\n\n fields: any = [\n {\n editor: \"string\",\n attrs: {\n type: \"text\",\n outlined: true,\n label: \"Заголовок\",\n },\n name: \"caption\",\n validations: [required()],\n },\n ];\n\n eventObjectDataSource = new ObjectDataSource({\n id: +this.$route.params.eventId,\n config: {},\n className: \"event\",\n });\n\n model: any = {\n eventId: +this.$route.params.eventId,\n caption: null,\n };\n\n dataSource: any = new ListDataSource({\n config: {\n pageIndex: 1,\n pageSize: 15,\n filter: [\n new Filter(\"eventId\", +this.$route.params.eventId),\n ].toFilterString(),\n },\n className: \"EventSchedule\",\n });\n loaded: boolean = false;\n $message: any;\n\n get breadcrumbs() {\n return [\n {\n text: \"Главная\",\n to: \"/\",\n },\n {\n text: \"События\",\n to: \"/manage/events/\",\n exact: true,\n },\n {\n text: this.eventObjectDataSource.model?.caption,\n to: `/manage/events/${this.$route.params.eventId}`,\n exact: true,\n },\n {\n text: \"Расписание\",\n disabled: true,\n },\n ];\n }\n\n async created() {\n await this.eventObjectDataSource.get();\n\n this.loaded = true;\n }\n\n async setDefault(id: number) {\n await this.eventObjectDataSource.updateField({\n fieldName: \"defaultScheduleId\",\n fieldValue: id,\n });\n this.$message(\"Поле успешно обновлено\");\n }\n\n async add() {\n const model: any = await this.editor.update(this.model);\n if (!model) return;\n\n await this.dataSource.add(model);\n await this.dataSource.get();\n this.$message(\"Успешно добавлено\");\n }\n\n routeToPage(id: string) {\n this.$router.push({\n name: \"event-schedule-id\",\n params: { eventId: this.$route.params.eventId, scheduleId: id },\n });\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=34513594\"\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":""}