{"version":3,"sources":["webpack:///./src/views/notification/views/notification.vue?b59e","webpack:///./src/views/notification/views/notification.vue?20ea","webpack:///./src/views/notification/views/notification.vue"],"names":["_hoisted_1","class","_hoisted_2","key","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","render","_ctx","_cache","$props","$setup","$data","$options","_component_mini_spinner","_component_localized_text","_directive_userimage","loading","notifications","length","localizedKey","text","item","i","toRead","readOn","onClick","$event","openNotification","$store","state","getUserImage","data","userIdentifier","title","innerHTML","$filters","date","createdOn","time","this","setNotificationOpened","getNotifications","then","x","store","newNotificationCount","finally","payload","setReadOn","identifier","route","notificationType","AllegatoNew","FieraPostNew","CommunityPostNew","EventPostNew","AllegatoComment","CommunityPostComment","EventPostComment","FieraPostComment","$opModal","show","parentIdentifier","containerIdentifier","commentType","AllegatoCommentComment","CommunityPostCommentComment","EventPostCommentComment","FieraPostCommentComment","parentCommentType","grandParentIdentifier","$router","push","__exports__"],"mappings":"uIAEA,MAAMA,EAAa,CAAEC,MAAO,0BACtBC,EAAa,CACjBC,IAAK,EACLF,MAAO,QAEHG,EAAa,CAAEH,MAAO,qBACtBI,EAAa,CAAEJ,MAAO,uBACtBK,EAAa,CAAEL,MAAO,qCACtBM,EAAa,CAAEN,MAAO,+BAEtB,SAAUO,EAAOC,EAAUC,EAAYC,EAAYC,EAAYC,EAAWC,GAC9E,MAAMC,EAA0B,eAAkB,gBAC5CC,EAA4B,eAAkB,kBAC9CC,EAAuB,eAAkB,aAE/C,OAAQ,iBAAc,eAAa,MAAOjB,EAAY,CACnDS,EAAKS,SACD,iBAAc,eAAa,MAAOhB,EAAY,CAC7C,eAAaa,MAEe,GAA7BN,EAAKU,cAAcC,QACjB,iBAAc,eAAaJ,EAA2B,CACrDb,IAAK,EACLkB,aAAc,sBACdC,KAAM,mBACNrB,MAAO,yCAERQ,EAAKU,cAAcC,OAAS,GAC1B,gBAAW,GAAO,eAAa,OAAW,CAAEjB,IAAK,GAAK,eAAYM,EAAKU,cAAe,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olveComponent, createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, resolveDirective as _resolveDirective, withDirectives as _withDirectives, toDisplayString as _toDisplayString } from \"vue\"\n\nconst _hoisted_1 = { class: \"notification hasFooter\" }\nconst _hoisted_2 = {\n key: 0,\n class: \"pt-4\"\n}\nconst _hoisted_3 = { class: \"notificationImage\" }\nconst _hoisted_4 = { class: \"notificationDetails\" }\nconst _hoisted_5 = { class: \"fs_14 greyBlue ln_12 d-block mb-1\" }\nconst _hoisted_6 = { class: \"fs_10 greyBlue d-block mt-3\" }\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_mini_spinner = _resolveComponent(\"mini-spinner\")!\n const _component_localized_text = _resolveComponent(\"localized-text\")!\n const _directive_userimage = _resolveDirective(\"userimage\")!\n\n return (_openBlock(), _createBlock(\"div\", _hoisted_1, [\n (_ctx.loading)\n ? (_openBlock(), _createBlock(\"div\", _hoisted_2, [\n _createVNode(_component_mini_spinner)\n ]))\n : (_ctx.notifications.length == 0)\n ? (_openBlock(), _createBlock(_component_localized_text, {\n key: 1,\n localizedKey: \"app_nessunanotifica\",\n text: \"Nessuna notifica\",\n class: \"fs_14 grey d-block text-center mt-4\"\n }))\n : (_ctx.notifications.length > 0)\n ? (_openBlock(true), _createBlock(_Fragment, { key: 2 }, _renderList(_ctx.notifications, (item, i) => {\n return (_openBlock(), _createBlock(\"div\", {\n class: [\"notificationRow\", { toRead: !item.readOn }],\n key: i,\n onClick: ($event: any) => (_ctx.openNotification(item))\n }, [\n _withDirectives(_createVNode(\"div\", _hoisted_3, null, 512), [\n [_directive_userimage, _ctx.$store.state.getUserImage(item.data.userIdentifier)]\n ]),\n _createVNode(\"div\", _hoisted_4, [\n _createVNode(\"div\", _hoisted_5, _toDisplayString(item.title), 1),\n _createVNode(\"div\", {\n class: \"fs_12 greyBlue ln_12 d-block\",\n innerHTML: item.text\n }, null, 8, [\"innerHTML\"]),\n _createVNode(\"div\", _hoisted_6, _toDisplayString(_ctx.$filters.date(item.createdOn, 'DD MMM YYYY')) + \" - \" + _toDisplayString(_ctx.$filters.time(item.createdOn)), 1)\n ])\n ], 10, [\"onClick\"]))\n }), 128))\n : _createCommentVNode(\"\", true)\n ]))\n}","\r\nimport { Options, Vue } from 'vue-class-component';\r\nimport { NotificationClient } from '@/services/Services';\r\nimport CommentsModal from '@/components/commentsModal.vue';\r\nimport store from '@/store';\r\nimport * as OM from '@/model';\r\nimport * as CONST from '@/const';\r\n\r\n@Options({})\r\nexport default class Notification extends Vue {\r\n\r\n loading: boolean = false;\r\n notifications: OM.Notification[] = [];\r\n\r\n created() {\r\n this.loading = true;\r\n\r\n NotificationClient.setNotificationOpened(false);\r\n NotificationClient.getNotifications(false)\r\n .then(x => {\r\n this.notifications = x;\r\n store.state.newNotificationCount = 0;\r\n // let filtered = this.notifications.filter(x => !x.readOn);\r\n // let ids = filtered.map(x => x.identifier);\r\n // NotificationClient.setReadOn(ids);\r\n })\r\n .finally(() => this.loading = false);\r\n }\r\n\r\n openNotification(payload: OM.Notification){\r\n NotificationClient.setReadOn(payload.identifier, false);\r\n let route = '';\r\n if(payload.data.route){\r\n route = payload.data.route;\r\n if(payload.data.notificationType == CONST.NotificationType.AllegatoNew ||\r\n payload.data.notificationType == CONST.NotificationType.FieraPostNew ||\r\n payload.data.notificationType == CONST.NotificationType.CommunityPostNew ||\r\n payload.data.notificationType == CONST.NotificationType.EventPostNew){\r\n //aprire modal del post? No non direi va bene anche senza\r\n } else if(payload.data.notificationType == CONST.NotificationType.AllegatoComment ||\r\n payload.data.notificationType == CONST.NotificationType.CommunityPostComment ||\r\n payload.data.notificationType == CONST.NotificationType.EventPostComment ||\r\n payload.data.notificationType == CONST.NotificationType.FieraPostComment){\r\n this.$opModal.show(CommentsModal, {\r\n parentIdentifier: payload.data.parentIdentifier,\r\n //grandParentIdentifier: payload.data.grandParentIdentifier,\r\n containerIdentifier: payload.data.containerIdentifier,\r\n commentType: payload.data.notificationType\r\n })\r\n } else if (payload.data.notificationType == CONST.NotificationType.AllegatoCommentComment ||\r\n payload.data.notificationType == CONST.NotificationType.CommunityPostCommentComment ||\r\n payload.data.notificationType == CONST.NotificationType.EventPostCommentComment ||\r\n payload.data.notificationType == CONST.NotificationType.FieraPostCommentComment){\r\n var parentCommentType;\r\n if(payload.data.notificationType == CONST.NotificationType.AllegatoCommentComment)\r\n parentCommentType = CONST.NotificationType.AllegatoComment;\r\n else if(payload.data.notificationType == CONST.NotificationType.CommunityPostCommentComment)\r\n parentCommentType = CONST.NotificationType.CommunityPostComment;\r\n else if(payload.data.notificationType == CONST.NotificationType.EventPostCommentComment)\r\n parentCommentType = CONST.NotificationType.EventPostComment;\r\n else if(payload.data.notificationType == CONST.NotificationType.FieraPostCommentComment)\r\n parentCommentType = CONST.NotificationType.FieraPostComment;\r\n this.$opModal.show(CommentsModal, {\r\n parentIdentifier: payload.data.grandParentIdentifier,\r\n //grandParentIdentifier: payload.data.grandParentIdentifier,\r\n containerIdentifier: payload.data.containerIdentifier,\r\n commentType: parentCommentType\r\n })\r\n this.$opModal.show(CommentsModal, {\r\n parentIdentifier: payload.data.parentIdentifier,\r\n grandParentIdentifier: payload.data.grandParentIdentifier,\r\n containerIdentifier: payload.data.containerIdentifier,\r\n commentType: payload.data.notificationType\r\n })\r\n }\r\n this.$router.push(route);\r\n }\r\n }\r\n\r\n}\r\n","import { render } from \"./notification.vue?vue&type=template&id=353c8d60&ts=true\"\nimport script from \"./notification.vue?vue&type=script&lang=ts\"\nexport * from \"./notification.vue?vue&type=script&lang=ts\"\n\nimport exportComponent from \"C:\\\\Users\\\\rekt\\\\source\\\\repos\\\\uose\\\\uoseapp_new\\\\node_modules\\\\vue-loader-v16\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__"],"sourceRoot":""}