{"version":3,"sources":["webpack:///./src/pages/notifications/View.vue?da1f","webpack:///./src/pages/notifications/View.vue","webpack:///./src/pages/notifications/View.vue?1176","webpack:///./src/pages/notifications/View.vue?9989"],"names":["render","_vm","this","_h","$createElement","_c","_self","attrs","active","staticClass","_v","_s","notification","title","message","isLoading","name","$t","is_read","class","on","$event","markNotificationAsUnread","markNotificationAsRead","_e","staticRenderFns","component","Base","extend","computed","notifications","$store","getters","data","undefined","mounted","getNotification","methods","get","$route","params","id","then","put","$router","push","$emit","notif","find","n"],"mappings":"uHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,SAAS,CAACE,MAAM,CAAC,GAAK,UAAU,CAACF,EAAG,UAAU,CAACE,MAAM,CAAC,OAASN,EAAIO,OAAO,cAAa,IAAQ,CAAEP,EAAgB,aAAEI,EAAG,OAAO,CAACI,YAAY,cAAc,CAACJ,EAAG,SAAS,CAACI,YAAY,mBAAmB,CAACJ,EAAG,IAAI,CAACI,YAAY,oBAAoB,CAACR,EAAIS,GAAG,IAAIT,EAAIU,GAAGV,EAAIW,aAAaC,OAAO,SAASR,EAAG,UAAU,CAACI,YAAY,mBAAmB,CAACR,EAAIS,GAAG,IAAIT,EAAIU,GAAGV,EAAIW,aAAaE,SAAW,iBAAiB,OAAOT,EAAG,SAAS,CAACI,YAAY,mBAAmB,CAACJ,EAAG,UAAU,CAACE,MAAM,CAAC,IAAM,WAAW,SAAWN,EAAIc,UAAU,GAAK,CAACC,KAAM,sBAAsB,MAAQf,EAAIgB,GAAG,SAAS,YAAY,WAAehB,EAAIW,aAAaM,QAAiQb,EAAG,WAAW,CAACI,YAAY,aAAaU,MAAM,CAAC,aAAclB,EAAIc,WAAWR,MAAM,CAAC,SAAWN,EAAIc,UAAU,YAAY,iBAAiBK,GAAG,CAAC,MAAQ,SAASC,GAAQ,OAAOpB,EAAIqB,8BAA8B,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,EACAlB,EACAyB,GACA,EACA,KACA,KACA,MAIa,e","file":"js/chunk-2d0dea3b.600087a6.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('portal',{attrs:{\"to\":\"modal\"}},[_c('b-modal',{attrs:{\"active\":_vm.active,\"can-cancel\":false}},[(_vm.notification)?_c('form',{staticClass:\"modal-card\"},[_c('header',{staticClass:\"modal-card-head\"},[_c('p',{staticClass:\"modal-card-title\"},[_vm._v(\" \"+_vm._s(_vm.notification.title)+\" \")])]),_c('section',{staticClass:\"modal-card-body\"},[_vm._v(\" \"+_vm._s(_vm.notification.message || 'empty message')+\" \")]),_c('footer',{staticClass:\"modal-card-foot\"},[_c('sp-link',{attrs:{\"tag\":\"b-button\",\"disabled\":_vm.isLoading,\"to\":{name: 'notifications.list'},\"label\":_vm.$t('close'),\"icon-left\":\"times\"}}),( ! _vm.notification.is_read)?_c('b-button',{staticClass:\"level-item\",class:{'is-loading': _vm.isLoading},attrs:{\"disabled\":_vm.isLoading,\"type\":\"is-primary\",\"icon-left\":\"envelope\"},on:{\"click\":function($event){return _vm.markNotificationAsRead()}}},[_vm._v(\" Mark as read \")]):_c('b-button',{staticClass:\"level-item\",class:{'is-loading': _vm.isLoading},attrs:{\"disabled\":_vm.isLoading,\"icon-left\":\"envelope-open\"},on:{\"click\":function($event){return _vm.markNotificationAsUnread()}}},[_vm._v(\" Mark as unread \")])],1)]):_vm._e()])],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\nimport Base from '@/mixins/Base.vue';\nimport { INotification, INotificationResponse } from '@/interfaces/notification';\n\nconst component = Base.extend({\n computed: {\n notifications() {\n return this.$store.getters.notifications;\n },\n },\n data() {\n return {\n active: false,\n notification: undefined as any | INotification,\n };\n },\n mounted() {\n this.active = true;\n this.getNotification();\n },\n methods: {\n getNotification(): void {\n this.get(`notifications/${this.$route.params.id}`)\n .then(({ data }) => {\n this.notification = data.data;\n });\n },\n markNotificationAsRead(): void {\n this.put(`notifications/${this.notification.id}/read`)\n .then(() => {\n this.$router.push({ name: 'notifications.list' });\n this.$emit('reload');\n const notif: INotification = this.notifications.find((n: INotification) => n.id === this.notification.id);\n if (notif) {\n notif.is_read = true;\n }\n });\n },\n markNotificationAsUnread(): void {\n this.put(`notifications/${this.notification.id}/unread`)\n .then(() => {\n this.$router.push({ name: 'notifications.list' });\n this.$emit('reload');\n const notif: INotification = this.notifications.find((n: INotification) => n.id === this.notification.id);\n if (notif) {\n notif.is_read = false;\n }\n });\n },\n },\n});\n\nexport default component;\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!./View.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!./View.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./View.vue?vue&type=template&id=9d54f5ba&\"\nimport script from \"./View.vue?vue&type=script&lang=ts&\"\nexport * from \"./View.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":""}