{"version":3,"sources":["webpack:///./src/views/news/components/ArticleItem.vue?80b3","webpack:///./src/views/news/components/ArticleItem.vue","webpack:///./src/views/news/components/ArticleItem.vue?5870","webpack:///./src/views/news/components/ArticleItem.vue?e245"],"names":["render","_vm","this","_h","$createElement","_c","_self","VCard","staticClass","attrs","on","openArticle","staticStyle","_v","_s","article","Title","_f","PostedAt","body","VSpacer","VBtn","$event","stopPropagation","$t","VIcon","_e","staticRenderFns","ArticleItem","admins","includes","userEmail","text","Body","length","section","substr","BannerImage","URI","$router","push","ID","Vue","__decorate","Prop","default","Getter","namespace","Component","component"],"mappings":"yLAQIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAGE,EAAA,KAAM,CAACC,YAAY,OAAOC,MAAM,CAAC,UAAY,KAAKC,GAAG,CAAC,MAAQT,EAAIU,cAAc,CAACN,EAAG,OAAW,CAACG,YAAY,YAAY,CAACH,EAAG,OAAO,CAACO,YAAY,CAAC,cAAc,QAAQ,CAACX,EAAIY,GAAGZ,EAAIa,GAAGb,EAAIc,QAAQC,YAAYX,EAAG,OAAU,CAACA,EAAG,MAAM,CAACO,YAAY,CAAC,cAAc,QAAQ,CAACX,EAAIY,GAAG,IAAIZ,EAAIa,GAAGb,EAAIgB,GAAG,SAAPhB,CAAiBA,EAAIc,QAAQG,WAAW,OAAOb,EAAG,MAAM,CAACJ,EAAIY,GAAGZ,EAAIa,GAAGb,EAAIkB,WAAWd,EAAG,OAAa,CAACG,YAAY,QAAQ,CAACH,EAAGe,EAAA,MAAUnB,EAAW,QAAEI,EAAGgB,EAAA,KAAK,CAACZ,MAAM,CAAC,UAAY,IAAI,MAAQ,WAAWC,GAAG,CAAC,MAAQ,SAASY,GAAiC,OAAzBA,EAAOC,kBAAyBtB,EAAIU,YAAYW,MAAW,CAACjB,EAAG,OAAO,CAACG,YAAY,QAAQ,CAACP,EAAIY,GAAGZ,EAAIa,GAAGb,EAAIuB,GAAG,8CAA8CnB,EAAGoB,EAAA,KAAM,CAAChB,MAAM,CAAC,MAAQ,KAAK,CAACR,EAAIY,GAAG,oBAAoB,GAAGZ,EAAIyB,MAAM,IAAI,IAC30BC,EAAkB,G,4GC0BDC,EAAW,2HAqB7B,OArB6B,qCAI9B,WACE,IAAIC,EAAS,CAAC,kBAAmB,kBACjC,OAAOA,EAAOC,SAAS5B,KAAK6B,aAC7B,gBACD,WACE,IAAMC,EAAO9B,KAAKa,QAAQkB,KAC1B,GAAID,EAAKE,OAAS,IAAK,OAAOF,EAC9B,IAAMG,EAAUH,EAAKI,OAAO,EAAG,KAC/B,MAAO,GAAP,OAAUD,EAAO,SAClB,iBACD,WACE,OAAIjC,KAAKa,QAAQsB,YAAoBnC,KAAKa,QAAQsB,YAAYC,IACvD,KACR,yBAED,WACEpC,KAAKqC,QAAQC,KAAK,iBAAmBtC,KAAKa,QAAQ0B,QACnD,EArB6B,CAASC,cACVC,gBAA5BC,eAAK,CAAEC,QAAS,gBAAW,8BACsBF,gBAAjDG,eAAO,eAAgB,CAAEC,UAAW,aAAY,gCAF9BnB,EAAW,gBAD/BoB,QACoBpB,WCnCqZ,I,YCOtaqB,EAAY,eACd,EACAjD,EACA2B,GACA,EACA,KACA,KACA,MAIa,aAAAsB,E","file":"assets/js/chunk-2d0cc432.cc824b4b.js","sourcesContent":["import { 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 { VIcon } from 'vuetify/lib/components/VIcon';\nimport { VSpacer } from 'vuetify/lib/components/VGrid';\n\nvar render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c(VCard,{staticClass:\"mb-4\",attrs:{\"elevation\":\"0\"},on:{\"click\":_vm.openArticle}},[_c(VCardTitle,{staticClass:\"headline\"},[_c('span',{staticStyle:{\"font-weight\":\"600\"}},[_vm._v(_vm._s(_vm.article.Title))])]),_c(VCardText,[_c('div',{staticStyle:{\"font-weight\":\"600\"}},[_vm._v(\" \"+_vm._s(_vm._f(\"format\")(_vm.article.PostedAt))+\" \")]),_c('div',[_vm._v(_vm._s(_vm.body))])]),_c(VCardActions,{staticClass:\"pb-6\"},[_c(VSpacer),(_vm.canEdit)?_c(VBtn,{attrs:{\"elevation\":\"0\",\"color\":\"primary\"},on:{\"click\":function($event){$event.stopPropagation();return _vm.openArticle($event)}}},[_c('span',{staticClass:\"mx-2\"},[_vm._v(_vm._s(_vm.$t(\"latestNewsSections.latestNewsPage.read\")))]),_c(VIcon,{attrs:{\"right\":\"\"}},[_vm._v(\"mdi-newspaper\")])],1):_vm._e()],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\r\nimport Vue from \"vue\";\r\nimport { Article } from \"@/core/models\";\r\nimport { Getter } from \"vuex-class\";\r\nimport { Component, Prop } from \"vue-property-decorator\";\r\n\r\n@Component\r\nexport default class ArticleItem extends Vue {\r\n @Prop({ default: () => {} }) article!: Article;\r\n @Getter(\"getUserEmail\", { namespace: \"profile\" }) userEmail!: string;\r\n\r\n get canEdit() {\r\n let admins = [\"demo@prezpvr.de\", \"dev@prezpvr.de\"]; // only these two can edit!\r\n return admins.includes(this.userEmail);\r\n }\r\n get body() {\r\n const text = this.article.Body;\r\n if (text.length < 200) return text;\r\n const section = text.substr(0, 200);\r\n return `${section}...`;\r\n }\r\n get image() {\r\n if (this.article.BannerImage) return this.article.BannerImage.URI;\r\n return \"\";\r\n }\r\n\r\n openArticle(): void {\r\n this.$router.push(\"/news/article/\" + this.article.ID);\r\n }\r\n}\r\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--15-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ArticleItem.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--15-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ArticleItem.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./ArticleItem.vue?vue&type=template&id=7ec20913&\"\nimport script from \"./ArticleItem.vue?vue&type=script&lang=ts&\"\nexport * from \"./ArticleItem.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":""}