2 lines
6.2 KiB
JavaScript
2 lines
6.2 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["statistics"],{"35ed":function(e,t,c){},"486c":function(e,t,c){"use strict";c("7802")},6017:function(e,t,c){"use strict";c("ca2c")},7802:function(e,t,c){},9024:function(e,t,c){"use strict";c("35ed")},"93c8":function(e,t,c){},a845:function(e,t,c){"use strict";c("93c8")},ca2c:function(e,t,c){},ccb2:function(e,t,c){"use strict";c.r(t);c("4de4"),c("d3b7"),c("caad"),c("2532");var n=c("7a23"),r=(c("d81d"),c("47e2")),o=c("ec59"),s={class:"chart-menu"},a={class:"chart-arrow"},u={class:"time-frames custom-checkboxes-group"},l={class:"time-frames-checkboxes custom-checkboxes"},i=["id","name","checked","onInput"],d={class:"chart-arrow"},b=Object(n["defineComponent"])({emits:["arrowClick","timeFrameUpdate"],setup:function(e,t){var c=t.emit,r=Object(n["ref"])("month"),o=["week","month","year"];function b(e){r.value=e,c("timeFrameUpdate",e)}return function(e,t){return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",s,[Object(n["createElementVNode"])("div",a,[Object(n["createElementVNode"])("i",{class:"fa fa-chevron-left","aria-hidden":"true",onClick:t[0]||(t[0]=function(e){return c("arrowClick",!0)})})]),Object(n["createElementVNode"])("div",u,[Object(n["createElementVNode"])("div",l,[(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(o,(function(t){return Object(n["createElementVNode"])("div",{class:"time-frame custom-checkbox",key:t},[Object(n["createElementVNode"])("label",null,[Object(n["createElementVNode"])("input",{type:"radio",id:t,name:t,checked:Object(n["unref"])(r)===t,onInput:function(e){return b(t)}},null,40,i),Object(n["createElementVNode"])("span",null,Object(n["toDisplayString"])(e.$t("statistics.TIME_FRAMES.".concat(t))),1)])])})),64))])]),Object(n["createElementVNode"])("div",d,[Object(n["createElementVNode"])("i",{class:"fa fa-chevron-right","aria-hidden":"true",onClick:t[1]||(t[1]=function(e){return c("arrowClick",!1)})})])])}}}),p=(c("6017"),c("6b0d")),O=c.n(p);const j=O()(b,[["__scopeId","data-v-af15954c"]]);var f=j,m=c("1119"),k={class:"sports-menu"},v=["id","name","checked","onInput"],h={class:"sport-label"},E=Object(n["defineComponent"])({props:{userSports:null,selectedSportIds:{default:function(){return[]}}},emits:["selectedSportIdsUpdate"],setup:function(e,t){var c=t.emit,o=e,s=Object(r["b"])(),a=s.t,u=Object(n["inject"])("sportColors"),l=Object(n["toRefs"])(o),i=l.selectedSportIds,d=Object(n["computed"])((function(){return Object(m["e"])(o.userSports,a)}));function b(e){c("selectedSportIdsUpdate",e)}return function(e,t){var c=Object(n["resolveComponent"])("SportImage");return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",k,[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(d),(function(e){return Object(n["openBlock"])(),Object(n["createElementBlock"])("label",{type:"checkbox",key:e.id,style:Object(n["normalizeStyle"])({color:e.color?e.color:Object(n["unref"])(u)[e.label]})},[Object(n["createElementVNode"])("input",{type:"checkbox",id:e.id,name:e.label,checked:Object(n["unref"])(i).includes(e.id),onInput:function(t){return b(e.id)}},null,40,v),Object(n["createVNode"])(c,{"sport-label":e.label,color:e.color},null,8,["sport-label","color"]),Object(n["createElementVNode"])("span",h,Object(n["toDisplayString"])(e.translatedLabel),1)],4)})),128))])}}});c("a845");const S=E;var w=S,N=c("7416"),V={key:0,id:"user-statistics"},C=Object(n["defineComponent"])({props:{sports:null,user:null},setup:function(e){var t=e,c=Object(r["b"])(),s=c.t,a=Object(n["toRefs"])(t),u=a.sports,l=a.user,i=Object(n["ref"])("month"),d=Object(n["ref"])(j(i.value)),b=Object(n["computed"])((function(){return Object(m["e"])(t.sports,s)})),p=Object(n["ref"])(v(t.sports));function O(e){i.value=e,d.value=j(i.value)}function j(e){return Object(N["b"])(new Date,e,t.user.weekm)}function k(e){d.value=Object(N["c"])(d.value,e,t.user.weekm)}function v(e){return e.map((function(e){return e.id}))}function h(e){p.value.includes(e)?p.value=p.value.filter((function(t){return t!==e})):p.value.push(e)}return Object(n["watch"])((function(){return t.sports}),(function(e){p.value=v(e)})),function(e,t){return Object(n["unref"])(b)?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",V,[Object(n["createVNode"])(f,{onTimeFrameUpdate:O,onArrowClick:k}),Object(n["createVNode"])(o["a"],{sports:Object(n["unref"])(u),user:Object(n["unref"])(l),chartParams:d.value,"displayed-sport-ids":p.value,fullStats:!0},null,8,["sports","user","chartParams","displayed-sport-ids"]),Object(n["createVNode"])(w,{"selected-sport-ids":p.value,"user-sports":Object(n["unref"])(u),onSelectedSportIdsUpdate:h},null,8,["selected-sport-ids","user-sports"])])):Object(n["createCommentVNode"])("",!0)}}});c("9024");const B=O()(C,[["__scopeId","data-v-7d54529b"]]);var I=B,y=c("1724"),_=c("dad5"),T=c("2906"),g={id:"statistics",class:"view"},x={key:0,class:"container"},R=Object(n["defineComponent"])({setup:function(e){var t=Object(T["a"])(),c=Object(n["computed"])((function(){return t.getters[_["a"].GETTERS.AUTH_USER_PROFILE]})),r=Object(n["computed"])((function(){return t.getters[_["c"].GETTERS.SPORTS].filter((function(e){return c.value.sports_list.includes(e.id)}))}));return function(e,t){var o=Object(n["resolveComponent"])("Card");return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",g,[Object(n["unref"])(c).username?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",x,[Object(n["createVNode"])(o,null,{title:Object(n["withCtx"])((function(){return[Object(n["createTextVNode"])(Object(n["toDisplayString"])(e.$t("statistics.STATISTICS")),1)]})),content:Object(n["withCtx"])((function(){return[Object(n["createVNode"])(I,{class:Object(n["normalizeClass"])({"stats-disabled":0===Object(n["unref"])(c).nb_workouts}),user:Object(n["unref"])(c),sports:Object(n["unref"])(r)},null,8,["class","user","sports"])]})),_:1}),0===Object(n["unref"])(c).nb_workouts?(Object(n["openBlock"])(),Object(n["createBlock"])(y["a"],{key:0})):Object(n["createCommentVNode"])("",!0)])):Object(n["createCommentVNode"])("",!0)])}}});c("486c");const U=O()(R,[["__scopeId","data-v-0d93da6e"]]);t["default"]=U}}]);
|
|
//# sourceMappingURL=statistics.d03ca304.js.map
|