1"use strict";(self["webpackChunkmg_member"]=self["webpackChunkmg_member"]||[]).push([[2872],{53077:function(t,e,a){a.r(e),a.d(e,{default:function(){return D}});var s=a(64562),i=a(34145),n=a(44127),r=a(60266),l=a(65495),o=a(65808),c=a(87397),d=a(54525),u=a(66900),f=a(79500),m=a(74611),h=a(11713),_=a(29884),p=function(){var t=this,e=t._self._c;return e("div",{staticClass:"fill-height"},[e(h.Z,[e(r.Z,{staticClass:"px-6",attrs:{md:"8",sm:"12"}},[e(h.Z,{staticStyle:{"margin-top":"-12px"}},[e(r.Z,{staticClass:"px-0 py-0",staticStyle:{display:"flex","justify-content":"space-between","align-items":"center"},attrs:{cols:"12"}},[e("h2",{staticClass:"title font-weight-bold mb-0 w-100"},[t._v("Mes notifications")]),e(_.Z,{attrs:{label:"Seulement les non lues"},model:{value:t.read,callback:function(e){t.read=e},expression:"read"}})],1),e(h.Z,{staticClass:"mt-5"},[t.hasNotifications?e(o.Z,{staticClass:"py-0 transparent col-12",attrs:{"two-line":""}},[t._l(t.notifications,(function(a,o){return[e(i.Z,{key:o,staticClass:"text-decoration-none mb-3",attrs:{outlined:""},on:{click:function(e){return t.consultNotificationDetail(a)}}},[a.content?[e(c.Z,{scopedSlots:t._u([{key:"activator",fn:function(){return[e(u.Z,[e(l.Z,{attrs:{src:a.avatar}})],1),e(f.V9,[e("div",{staticClass:"font-weight-medium notification-content default--text",domProps:{innerHTML:t._s(a.title)}}),e("div",{staticClass:"default--text text--lighten-2 text-body-1"},[t._v(" "+t._s(a.created_at?t.$helpers.parseDate(a.created_at,"DD/MM/YYYY HH:mm"):"-")+" ")])]),e(m.Z,{staticClass:"my-auto",staticStyle:{width:"7%"}},[e(s.Z,{attrs:{disabled:null!==a.read_at,icon:""},on:{click:function(e){return e.preventDefault(),t.markAsRead(a)}}},[e("div",{class:{primary:!a.read_at,"default lighten-2":null!==a.read_at},staticStyle:{height:"10px",width:"10px","border-radius":"100%"}})])],1)]},proxy:!0}],null,!0)},[e(f.km,[e(h.Z,{staticClass:"d-flex mt-5",attrs:{align:"center"}},[e(r.Z,{staticClass:"default--text",attrs:{offset:"1",md:"10"}},[e("div",{domProps:{innerHTML:t._s(a.content)}})])],1),e(h.Z,{staticClass:"mb-0",attrs:{justify:"center"}},[a.url&&a.cta_text?e(r.Z,{staticClass:"text-center",class:{"justify-end d-flex":a.url2&&a.cta_text2},attrs:{cols:"6"}},[e(n.Z,{staticClass:"text-none text-subtitle-1 text-wrap font-weight-bold ma-5",attrs:{depressed:"",large:"",color:"primary",href:a.url,target:"_blank"}},[t._v(" "+t._s(a.cta_text)+" ")])],1):t._e(),a.url2&&a.cta_text2?e(r.Z,{staticClass:"text-center justify-start d-flex",attrs:{cols:"6"}},[e(n.Z,{staticClass:"text-none text-subtitle-1 text-wrap font-weight-bold ma-5",attrs:{depressed:"",large:"",color:"secondary",href:a.url2,target:"_blank"}},[t._v(" "+t._s(a.cta_text2)+" ")])],1):t._e()],1)],1)],1)]:[e(d.Z,{style:(t.$vuetify.theme.dark,"")+"; border-radius: 8px;"},[e(u.Z,[e(l.Z,{attrs:{src:a.avatar}})],1),e(f.km,[e(f.V9,{staticClass:"font-weight-medium notification-content",domProps:{innerHTML:t._s(a.title)}}),e(f.V9,{staticClass:"default--text text--lighten-2 text-body-1"},[t._v(" "+t._s(a.created_at?t.$helpers.parseDate(a.created_at,"DD/MM/YYYY HH:mm"):"-")+" ")])],1),e(m.Z,{staticClass:"my-auto",staticStyle:{width:"7%"}},[e(s.Z,{attrs:{disabled:null!==a.read_at,icon:""},on:{click:function(e){return e.preventDefault(),t.markAsRead(a)}}},[e("div",{class:{primary:!a.read_at,"default lighten-2":null!==a.read_at},staticStyle:{height:"10px",width:"10px","border-radius":"100%"}})])],1),e(m.Z,{staticClass:"my-auto"})],1)]],2)]}))],2):t._e()],1)],1)],1)],1)],1)},x=[],Z=a(67519),g=a(20209),b=a(79453),y=a(94193),C=a(30381),w={name:"member-notifications",metaInfo:{title:"Notifications"},components:{},mounted(){y.Z.title="Notifications",this.getWebNotifications()},data:()=>({user:Z.Z.me(),notifications:[],read:!1,isLoadingNotifications:!1,pagination:b.Z.initPagination(20,1,"created_at",!0)}),computed:{hasNotifications(){return this.notifications.length>0}},methods:{getWebNotifications(){this.isLoadingNotifications=!0,g.Z.get({include:"",read:this.read?1:0}).then((({data:t})=>{this.isLoadingNotifications=!1,this.notifications=t}))},markAsRead(t){return new Promise(((e,a)=>{t.read_at?e():g.Z.markAsRead({id:[t.id]}).then((()=>{t.read_at=C.now,e()})).catch((t=>a(t)))}))},consultNotificationDetail(t){this.markAsRead(t).then((()=>{!t.content&&t.url&&window.open(t.url,"_self")}))}},watch:{read:{handler(){this.getWebNotifications()}}}},k=w,v=a(1001),N=(0,v.Z)(k,p,x,!1,null,"41d926ae",null),D=N.exports}}]); 2//# sourceMappingURL=localView-member-user-UserNotificationsList-vue.ed82f215.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.