{"version":3,"sources":["webpack:///./src/views/admin/activities/Index.vue?bdb1","webpack:///./src/views/admin/activities/Index.vue","webpack:///./src/views/admin/activities/Index.vue?d717","webpack:///./src/views/admin/activities/Index.vue?3897"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","attrs","model","value","callback","$$v","search","expression","name","_v","on","getItems","headers","items","loading","scopedSlots","_u","key","fn","ref","item","_g","params","id","$event","deleteItem","staticRenderFns","text","align","filterable","sortable","width","a","get","$store","getters","res","console","log","data","$notify","type","title","activity","$confirm","confirmation","authHeader","delete","metaInfo","component","VBtn","VCard","VCardTitle","VCol","VContainer","VDataTable","VIcon","VList","VListItem","VListItemIcon","VListItemTitle","VMenu","VRow","VSpacer","VTextField"],"mappings":"uHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACA,EAAG,cAAc,CAACE,YAAY,QAAQ,CAACF,EAAG,QAAQ,CAACA,EAAG,QAAQ,CAACG,MAAM,CAAC,KAAO,OAAO,CAACH,EAAG,SAAS,CAACA,EAAG,eAAe,CAACA,EAAG,eAAe,CAACG,MAAM,CAAC,cAAc,cAAc,MAAQ,MAAM,cAAc,GAAG,eAAe,GAAG,UAAY,IAAIC,MAAM,CAACC,MAAOT,EAAU,OAAEU,SAAS,SAAUC,GAAMX,EAAIY,OAAOD,GAAKE,WAAW,YAAYT,EAAG,YAAYA,EAAG,QAAQ,CAACG,MAAM,CAAC,MAAQ,UAAU,KAAO,GAAG,GAAK,CAAEO,KAAM,yBAA0B,CAACV,EAAG,SAAS,CAACE,YAAY,QAAQ,CAACN,EAAIe,GAAG,qBAAqBX,EAAG,OAAO,CAACJ,EAAIe,GAAG,oBAAoB,GAAGX,EAAG,QAAQ,CAACG,MAAM,CAAC,KAAO,IAAIS,GAAG,CAAC,MAAQhB,EAAIiB,WAAW,CAACb,EAAG,SAAS,CAACE,YAAY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KAAKC,aAAA,KAAWC,aAAA,KAAWC,QAAA,KAAMC,QAAA,KAAMC,YAAA,KAAUC,gBAAA,KAAcC,eAAA,OAAeC,QAAA,KAAMC,OAAA,KAAKC,UAAA,KAAQC,aAAA","file":"js/chunk-2d0c89d7.784ff017.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('v-container',{staticClass:\"my-4\"},[_c('v-row',[_c('v-col',{attrs:{\"cols\":\"12\"}},[_c('v-card',[_c('v-card-title',[_c('v-text-field',{attrs:{\"append-icon\":\"mdi-magnify\",\"label\":\"Ara\",\"single-line\":\"\",\"hide-details\":\"\",\"clearable\":\"\"},model:{value:(_vm.search),callback:function ($$v) {_vm.search=$$v},expression:\"search\"}}),_c('v-spacer'),_c('v-btn',{attrs:{\"color\":\"primary\",\"text\":\"\",\"to\":{ name: 'AdminActivityCreate' }}},[_c('v-icon',{staticClass:\"mr-2\"},[_vm._v(\"mdi-plus-circle\")]),_c('span',[_vm._v(\"YENİ FAALİYET\")])],1),_c('v-btn',{attrs:{\"icon\":\"\"},on:{\"click\":_vm.getItems}},[_c('v-icon',{staticClass:\"mr-2\"},[_vm._v(\"mdi-refresh\")])],1)],1),_c('v-data-table',{attrs:{\"headers\":_vm.headers,\"items\":_vm.items,\"search\":_vm.search,\"loading\":_vm.loading,\"loading-text\":\"Yükleniyor...\"},scopedSlots:_vm._u([{key:\"item.actions\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('v-menu',{attrs:{\"close-on-content-click\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nreturn [_c('v-btn',_vm._g({attrs:{\"icon\":\"\"}},on),[_c('v-icon',[_vm._v(\"mdi-dots-vertical\")])],1)]}}],null,true)},[_c('v-list',{attrs:{\"dense\":\"\"}},[_c('v-list-item',{attrs:{\"to\":{\n name: 'AdminActivityEdit',\n params: { id: item.id }\n }}},[_c('v-list-item-icon',[_c('v-icon',[_vm._v(\"mdi-file-edit\")])],1),_c('v-list-item-title',[_vm._v(\"Düzenle\")])],1),_c('v-list-item',{on:{\"click\":function($event){return _vm.deleteItem(item)}}},[_c('v-list-item-icon',[_c('v-icon',[_vm._v(\"mdi-delete\")])],1),_c('v-list-item-title',[_vm._v(\"Sil\")])],1)],1)],1)]}}],null,true)})],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\r\nimport { Vue, Component } from \"vue-property-decorator\";\r\nimport axios from \"axios\";\r\nimport { Activity } from \"@/types\";\r\n\r\n@Component({\r\n metaInfo() {\r\n return {\r\n title: \"Faaliyetler / Admin\"\r\n };\r\n }\r\n})\r\nexport default class AdminActivitiesView extends Vue {\r\n search = \"\";\r\n loading = false;\r\n headers = [\r\n {\r\n text: \"Id\",\r\n align: \"start\",\r\n filterable: true,\r\n value: \"id\"\r\n },\r\n { text: \"Başlık\", value: \"title\" },\r\n { text: \"Puan\", value: \"points\" },\r\n { text: \"Grup Adı\", value: \"groupTitle\"},\r\n { text: \"\", value: \"actions\", sortable: false, width: \"50px\" }\r\n ];\r\n items = [] as Activity[];\r\n\r\n async getItems() {\r\n try {\r\n this.loading = true;\r\n\r\n var res = await axios.get(\"/api/activity/get-all\", {\r\n headers: this.$store.getters[\"auth/requestAuthHeader\"]\r\n });\r\n\r\n console.log(res.data);\r\n\r\n this.items = res.data;\r\n } catch (e: unknown) {\r\n this.$notify({\r\n type: \"error\",\r\n title: \"Hata!\",\r\n text: `Faaliyetler alınamadı.`\r\n });\r\n } finally {\r\n this.loading = false;\r\n }\r\n }\r\n\r\n async deleteItem(activity: Activity) {\r\n const confirmation = await this.$confirm(\"Bu işlem geri alınamaz. Faaliyeti silmek istediğinizden emin misiniz?\", { title: \"Emin misiniz?\" });\r\n\r\n if (!confirmation) return;\r\n\r\n try {\r\n console.log(activity);\r\n\r\n // Etkinlik grubunu sil\r\n const authHeader = this.$store.getters[\"auth/requestAuthHeader\"];\r\n var res = await axios.delete(`/api/activity/${activity.id}`, {\r\n headers: authHeader\r\n });\r\n\r\n this.$notify({\r\n type: \"success\",\r\n title: \"İşlem Tamam\",\r\n text: \"Faaliyet başarıyla silindi.\"\r\n });\r\n\r\n await this.getItems();\r\n } catch (e) {\r\n this.$notify({\r\n type: \"eror\",\r\n title: \"Hata!\",\r\n text: \"Faaliyet silinemedi.\"\r\n });\r\n\r\n throw e;\r\n }\r\n }\r\n\r\n async mounted() {\r\n await this.getItems();\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!./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--0-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=b0583e96&\"\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\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 { VCardTitle } from 'vuetify/lib/components/VCard';\nimport { VCol } from 'vuetify/lib/components/VGrid';\nimport { VContainer } from 'vuetify/lib/components/VGrid';\nimport { VDataTable } from 'vuetify/lib/components/VDataTable';\nimport { VIcon } from 'vuetify/lib/components/VIcon';\nimport { VList } from 'vuetify/lib/components/VList';\nimport { VListItem } from 'vuetify/lib/components/VList';\nimport { VListItemIcon } from 'vuetify/lib/components/VList';\nimport { VListItemTitle } from 'vuetify/lib/components/VList';\nimport { VMenu } from 'vuetify/lib/components/VMenu';\nimport { VRow } from 'vuetify/lib/components/VGrid';\nimport { VSpacer } from 'vuetify/lib/components/VGrid';\nimport { VTextField } from 'vuetify/lib/components/VTextField';\ninstallComponents(component, {VBtn,VCard,VCardTitle,VCol,VContainer,VDataTable,VIcon,VList,VListItem,VListItemIcon,VListItemTitle,VMenu,VRow,VSpacer,VTextField})\n"],"sourceRoot":""}