{"version":3,"sources":["webpack:///./src/views/admin/movies/Index.vue?8d1a","webpack:///./src/views/admin/movies/Index.vue","webpack:///./src/views/admin/movies/Index.vue?9faf","webpack:///./src/views/admin/movies/Index.vue?fbfc"],"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","_s","getCategoryName","categoryId","disabled","_g","params","id","$event","deleteMovie","dialog","dialogContent","tag","selectedItem","staticRenderFns","text","align","filterable","width","sortable","a","get","$store","getters","res","data","$notify","type","title","movie","$confirm","$refs","confirm","open","color","confirmation","authHeader","delete","cats","find","c","nameTr","metaInfo","components","Confirm","component","VBadge","VBtn","VCard","VCardTitle","VCol","VContainer","VDataTable","VDialog","VIcon","VList","VListItem","VListItemIcon","VListItemTitle","VMenu","VRow","VSpacer","VTextField"],"mappings":"yHAAA,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,IAAIC,MAAM,CAACC,MAAOT,EAAU,OAAEU,SAAS,SAAUC,GAAMX,EAAIY,OAAOD,GAAKE,WAAW,YAAYT,EAAG,YAAYA,EAAG,QAAQ,CAACE,YAAY,OAAOC,MAAM,CAAC,MAAQ,UAAU,KAAO,GAAG,GAAK,CAAEO,KAAM,sBAAuB,CAACV,EAAG,SAAS,CAACE,YAAY,QAAQ,CAACN,EAAIe,GAAG,qBAAqBX,EAAG,OAAO,CAACJ,EAAIe,GAAG,gBAAgB,GAAGX,EAAG,QAAQ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,OAAeC,QAAA,KAAMC,OAAA,KAAKC,UAAA,KAAQC,aAAA","file":"js/chunk-2d0cc67e.de4e68d8.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\":\"\"},model:{value:(_vm.search),callback:function ($$v) {_vm.search=$$v},expression:\"search\"}}),_c('v-spacer'),_c('v-btn',{staticClass:\"mr-4\",attrs:{\"color\":\"primary\",\"text\":\"\",\"to\":{ name: 'AdminMovieCreate' }}},[_c('v-icon',{staticClass:\"mr-2\"},[_vm._v(\"mdi-plus-circle\")]),_c('span',[_vm._v(\"YENİ FİLM\")])],1),_c('v-btn',{attrs:{\"icon\":\"\"},on:{\"click\":_vm.getItems}},[_c('v-icon',[_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...\",\"multi-sort\":\"\",\"sort-by\":['yearOfEskFilmFest', 'nameTr'],\"sort-desc\":[true, false]},scopedSlots:_vm._u([{key:\"item.categoryId\",fn:function(ref){\nvar item = ref.item;\nreturn [_vm._v(\" \"+_vm._s(_vm.getCategoryName(item.categoryId))+\" \")]}},{key:\"item.disabled\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('div',{staticClass:\"pl-4\"},[_c('v-badge',{attrs:{\"dot\":\"\",\"color\":item.disabled ? 'error' : 'success'}})],1)]}},{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: 'AdminMovieEdit',\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.deleteMovie(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),_c('v-dialog',{attrs:{\"max-width\":\"600\",\"persistent\":\"\"},model:{value:(_vm.dialog),callback:function ($$v) {_vm.dialog=$$v},expression:\"dialog\"}},[_c(_vm.dialogContent,{tag:\"component\",attrs:{\"course\":_vm.selectedItem},on:{\"close\":function($event){_vm.dialog = false},\"refresh\":_vm.getItems}})],1),_c('confirm',{ref:\"confirm\"})],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\r\nimport { Vue, Component } from \"vue-property-decorator\";\r\nimport axios from \"axios\";\r\nimport { Category, Movie } from \"@/types\";\r\nimport Confirm from \"@/components/Confirm.vue\";\r\n\r\n@Component({\r\n metaInfo() {\r\n return {\r\n title: \"Filmler / Admin\"\r\n };\r\n },\r\n components: {\r\n Confirm\r\n }\r\n})\r\nexport default class AdminCoursesView extends Vue {\r\n search = \"\";\r\n loading = false;\r\n headers = [\r\n {\r\n text: \"Film\",\r\n align: \"start\",\r\n filterable: true,\r\n value: \"nameTr\"\r\n },\r\n { text: \"Festival\", value: \"yearOfEskFilmFest\" },\r\n { text: \"Yönetmen\", value: \"director\" },\r\n { text: \"Kategori\", value: \"categoryId\" },\r\n { text: \"Durum\", value: \"disabled\", width: \"90px\" },\r\n { text: \"\", value: \"actions\", sortable: false, width: \"50px\" }\r\n ];\r\n items = [] as Movie[];\r\n selectedItem = {};\r\n dialog = false;\r\n dialogContent = \"\";\r\n\r\n async getItems() {\r\n try {\r\n this.loading = true;\r\n\r\n var res = await axios.get(\"/api/movie/get-all\", {\r\n headers: this.$store.getters[\"auth/requestAuthHeader\"]\r\n });\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: `Film listesi alınamadı.`\r\n });\r\n } finally {\r\n this.loading = false;\r\n }\r\n }\r\n\r\n async deleteMovie(movie: Movie) {\r\n const $confirm = this.$refs.confirm as InstanceType;\r\n const confirmation = await $confirm.open(\r\n \"Emin misiniz?\",\r\n \"Bu işlem geri alınamaz. Filmi silmek istediğinizden emin misiniz?\",\r\n {\r\n color: \"red\"\r\n }\r\n );\r\n\r\n if (!confirmation) return;\r\n\r\n try {\r\n // Filmi sil\r\n const authHeader = this.$store.getters[\"auth/requestAuthHeader\"];\r\n var res = await axios.delete(`/api/movie/${movie.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: \"Film 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: \"Film silinemedi.\"\r\n });\r\n\r\n throw e;\r\n }\r\n }\r\n\r\n getCategoryName(id: string) {\r\n const cats = this.$store.getters[\"categories\"] as Category[];\r\n return cats.find(c => c.id == id)?.nameTr;\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=770d31b2&\"\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 { VBadge } from 'vuetify/lib/components/VBadge';\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 { VDialog } from 'vuetify/lib/components/VDialog';\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, {VBadge,VBtn,VCard,VCardTitle,VCol,VContainer,VDataTable,VDialog,VIcon,VList,VListItem,VListItemIcon,VListItemTitle,VMenu,VRow,VSpacer,VTextField})\n"],"sourceRoot":""}