{"version":3,"sources":["webpack:///./src/views/admin/activities/Create.vue?0403","webpack:///./src/views/admin/activities/Create.vue","webpack:///./src/views/admin/activities/Create.vue?fab5","webpack:///./src/views/admin/activities/Create.vue?a0c0"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","ref","on","$event","preventDefault","create","_v","attrs","$router","go","model","value","form","callback","$$v","$set","expression","activityGroups","requiredRule","editorOptions","submitDisabled","name","staticRenderFns","register","groupId","title","urlCode","points","description","modules","htmlEditButton","syntax","v","$refs","reset","resetValidation","a","get","headers","$store","getters","res","data","$notify","type","text","validate","post","Title","Description","Points","GroupId","UrlCode","timer1","setTimeout","push","clearTimeout","getActivityGroups","metaInfo","components","VueEditor","component","VBtn","VCard","VCardActions","VCardText","VCardTitle","VCol","VContainer","VDivider","VForm","VRow","VSelect","VSpacer","VTextField"],"mappings":"uHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,cAAc,CAACE,YAAY,QAAQ,CAACF,EAAG,QAAQ,CAACA,EAAG,QAAQ,CAACA,EAAG,SAAS,CAACA,EAAG,SAAS,CAACG,IAAI,OAAOC,GAAG,CAAC,OAAS,SAASC,GAAgC,OAAxBA,EAAOC,iBAAwBV,EAAIW,YAAY,CAACP,EAAG,eAAe,CAACA,EAAG,MAAM,CAACE,YAAY,iBAAiB,CAACN,EAAIY,GAAG,2BAA2BR,EAAG,YAAYA,EAAG,QAAQ,CAACS,MAAM,CAAC,MAAQ,GAAG,UAAY,KAAKL,GAAG,CAAC,MAAQ,SAASC,GAAQ,OAAOT,EAAIc,QAAQC,IAAI,MAAM,CAACf,EAAIY,GAAG,eAAe,GAAGR,EAAG,aAAaA,EAAG,cAAc,CAACA,EAAG,QAAQ,CAACA,EAAG,QAAQ,CAACS,MAAM,CAAC,KAAO,KAAK,GAAK,MAAM,CAACT,EAAG,eAAe,CAACS,MAAM,CAAC,G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BA,EAAKkC,WAHZ,wDAOEnD,KAAKyB,gBAAiB,EAPxB,kBAUsB,EAAAgB,EAAMW,KAAK,uBAC3B,CACEC,MAAOrD,KAAKiB,KAAKa,MACjBwB,YAAatD,KAAKiB,KAAKgB,YACvBsB,OAAQvD,KAAKiB,KAAKe,OAClBwB,QAASxD,KAAKiB,KAAKY,QACnB4B,QAASzD,KAAKiB,KAAKc,SAErB,CACEY,QAAS3C,KAAK4C,OAAOC,QAAQ,4BAnBrC,cAsBM7C,KAAKgD,QAAQ,CAAEC,KAAM,UAAWC,KAAM,yDAEhCQ,EAASC,YAAW,WACxB,EAAK9C,QAAQ+C,KAAK,CAAElC,KAAM,oBAE1BmC,aAAaH,KACZ,KA5BT,2DA8BI1D,KAAKgD,QAAQ,CACXC,KAAM,QACNnB,MAAO,QACPoB,KAAM,6BAjCZ,8BAsCIlD,KAAKyB,gBAAiB,EAtC1B,6EAnDF,uIA6FE,8GACQzB,KAAK8D,oBADb,gDA7FF,8DAAqD,QAAhC,EAAuB,gBAV3C,eAAU,CACTC,SADS,WAEP,MAAO,CACLjC,MAAO,+BAGXkC,WAAY,CACVC,UAAA,WAGiB,WCrGgZ,I,qKCOjaC,EAAY,eACd,EACApE,EACA6B,GACA,EACA,KACA,KACA,MAIa,aAAAuC,EAAiB,QAiBhC,IAAkBA,EAAW,CAACC,OAAA,KAAKC,QAAA,KAAMC,aAAA,OAAaC,UAAA,OAAUC,WAAA,OAAWC,OAAA,KAAKC,aAAA,KAAWC,WAAA,KAASC,QAAA,KAAMC,OAAA,KAAKC,UAAA,KAAQC,UAAA,KAAQC,aAAA","file":"js/chunk-2d209618.db496bf5.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-container',{staticClass:\"my-4\"},[_c('v-row',[_c('v-col',[_c('v-card',[_c('v-form',{ref:\"form\",on:{\"submit\":function($event){$event.preventDefault();return _vm.create()}}},[_c('v-card-title',[_c('div',{staticClass:\"primary--text\"},[_vm._v(\"Yeni Faaliyet Oluştur\")]),_c('v-spacer'),_c('v-btn',{attrs:{\"small\":\"\",\"elevation\":\"0\"},on:{\"click\":function($event){return _vm.$router.go(-1)}}},[_vm._v(\"GERİ DÖN\")])],1),_c('v-divider'),_c('v-card-text',[_c('v-row',[_c('v-col',{attrs:{\"cols\":\"12\",\"md\":\"6\"}},[_c('v-text-field',{attrs:{\"id\":\"title\",\"label\":\"Başlık\",\"hint\":\"Ör: Ders İzlencesi Hazırlamak\",\"name\":\"title\",\"type\":\"text\"},model:{value:(_vm.form.title),callback:function ($$v) {_vm.$set(_vm.form, \"title\", $$v)},expression:\"form.title\"}})],1),_c('v-col',{attrs:{\"cols\":\"12\",\"md\":\"6\"}},[_c('v-text-field',{attrs:{\"id\":\"urlCode\",\"label\":\"UrlCode\",\"hint\":\"Ör: ders-izlencesi\",\"name\":\"urlCode\",\"type\":\"text\"},model:{value:(_vm.form.urlCode),callback:function ($$v) {_vm.$set(_vm.form, \"urlCode\", $$v)},expression:\"form.urlCode\"}})],1)],1),_c('v-row',[_c('v-col',[_c('v-text-field',{attrs:{\"id\":\"points\",\"label\":\"Puan\",\"name\":\"points\",\"type\":\"number\"},model:{value:(_vm.form.points),callback:function ($$v) {_vm.$set(_vm.form, \"points\", $$v)},expression:\"form.points\"}})],1)],1),_c('v-row',[_c('v-col',[_c('v-select',{attrs:{\"label\":\"Faaliyet Grubu\",\"items\":_vm.activityGroups,\"required\":\"\",\"rules\":_vm.requiredRule,\"item-text\":\"title\",\"item-value\":\"id\",\"clearable\":\"\"},model:{value:(_vm.form.groupId),callback:function ($$v) {_vm.$set(_vm.form, \"groupId\", $$v)},expression:\"form.groupId\"}})],1)],1),_c('v-row',[_c('v-col',[_c('label',{staticClass:\"v-label theme--light d-block mb-2\"},[_vm._v(\"Açıklama\")]),_c('vue-editor',{attrs:{\"editorOptions\":_vm.editorOptions},model:{value:(_vm.form.description),callback:function ($$v) {_vm.$set(_vm.form, \"description\", $$v)},expression:\"form.description\"}})],1)],1)],1),_c('v-card-actions',{staticClass:\"pa-4\"},[_c('v-spacer'),_c('v-btn',{staticClass:\"mr-2 px-4\",attrs:{\"color\":\"secondary\",\"elevation\":\"0\",\"type\":\"submit\",\"disabled\":_vm.submitDisabled}},[_vm._v(\"OLUŞTUR\")]),_c('v-btn',{attrs:{\"to\":{ name: 'AdminActivityGroups' },\"elevation\":\"0\"}},[_vm._v(\"İPTAL ET\")])],1)],1)],1)],1)],1)],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\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\r\nimport { Vue, Component } from \"vue-property-decorator\";\r\nimport Quill from \"quill\";\r\nimport { VueEditor } from \"vue2-editor\";\r\nimport htmlEditButton from \"quill-html-edit-button\";\r\nimport axios, { AxiosRequestHeaders } from \"axios\";\r\nimport { ActivityGroup } from \"@/types\";\r\n\r\nQuill.register(\"modules/htmlEditButton\", htmlEditButton);\r\n\r\n@Component({\r\n metaInfo() {\r\n return {\r\n title: \"Oluştur / Faaliyet / Admin\"\r\n };\r\n },\r\n components: {\r\n VueEditor\r\n }\r\n})\r\nexport default class AdminActivityCreateView extends Vue {\r\n form = {\r\n groupId: \"\",\r\n title: \"\",\r\n urlCode: \"\",\r\n points: 0,\r\n description: null as string | null\r\n };\r\n submitDisabled = false;\r\n editorOptions = {\r\n modules: {\r\n htmlEditButton: {\r\n syntax: true\r\n }\r\n }\r\n };\r\n activityGroups = [] as ActivityGroup[];\r\n\r\n get requiredRule(): unknown[] {\r\n return [(v: unknown) => !!v || \"Zorunlu alan\"];\r\n }\r\n\r\n resetForm() {\r\n const form = this.$refs.form as HTMLFormElement;\r\n form.reset();\r\n\r\n this.form.description = \"\";\r\n this.resetValidation();\r\n }\r\n\r\n resetValidation() {\r\n const form = this.$refs.form as HTMLFormElement;\r\n form.resetValidation();\r\n }\r\n\r\n async getActivityGroups() {\r\n try {\r\n var res = await axios.get(\"/api/activitygroup/get-all\", {\r\n headers: this.$store.getters[\"auth/requestAuthHeader\"]\r\n });\r\n\r\n this.activityGroups = res.data;\r\n } catch (e: unknown) {\r\n this.$notify({\r\n type: \"error\",\r\n title: \"Hata!\",\r\n text: `Faaliyet grupları alınamadı.`\r\n });\r\n }\r\n }\r\n\r\n async create() {\r\n const form = this.$refs.form as HTMLFormElement;\r\n\r\n if (!form.validate()) {\r\n return;\r\n }\r\n\r\n this.submitDisabled = true;\r\n\r\n try {\r\n const res = await axios.post(\"/api/activity/create\",\r\n {\r\n Title: this.form.title,\r\n Description: this.form.description,\r\n Points: this.form.points,\r\n GroupId: this.form.groupId,\r\n UrlCode: this.form.urlCode\r\n },\r\n {\r\n headers: this.$store.getters[\"auth/requestAuthHeader\"]\r\n });\r\n\r\n this.$notify({ type: \"success\", text: \"Faaliyet başarıyla oluşturuldu. Lütfen bekleyiniz...\" });\r\n\r\n const timer1 = setTimeout(() => {\r\n this.$router.push({ name: \"AdminActivities\" });\r\n\r\n clearTimeout(timer1);\r\n }, 3000);\r\n } catch (e) {\r\n this.$notify({\r\n type: \"error\",\r\n title: \"Hata!\",\r\n text: `Faaliyet oluşturulamadı.`\r\n });\r\n\r\n throw e;\r\n } finally {\r\n this.submitDisabled = false;\r\n }\r\n }\r\n\r\n async mounted() {\r\n await this.getActivityGroups();\r\n }\r\n}\r\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--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Create.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--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Create.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./Create.vue?vue&type=template&id=4efadb41&\"\nimport script from \"./Create.vue?vue&type=script&lang=ts&\"\nexport * from \"./Create.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\n\n/* vuetify-loader */\nimport installComponents from \"!../../../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VBtn } from 'vuetify/lib/components/VBtn';\nimport { VCard } from 'vuetify/lib/components/VCard';\nimport { VCardActions } from 'vuetify/lib/components/VCard';\nimport { VCardText } from 'vuetify/lib/components/VCard';\nimport { VCardTitle } from 'vuetify/lib/components/VCard';\nimport { VCol } from 'vuetify/lib/components/VGrid';\nimport { VContainer } from 'vuetify/lib/components/VGrid';\nimport { VDivider } from 'vuetify/lib/components/VDivider';\nimport { VForm } from 'vuetify/lib/components/VForm';\nimport { VRow } from 'vuetify/lib/components/VGrid';\nimport { VSelect } from 'vuetify/lib/components/VSelect';\nimport { VSpacer } from 'vuetify/lib/components/VGrid';\nimport { VTextField } from 'vuetify/lib/components/VTextField';\ninstallComponents(component, {VBtn,VCard,VCardActions,VCardText,VCardTitle,VCol,VContainer,VDivider,VForm,VRow,VSelect,VSpacer,VTextField})\n"],"sourceRoot":""}