MOON
Server: Apache
System: Linux vps.erhabenn.com.br 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64
User: machen (1008)
PHP: 8.2.31
Disabled: NONE
Upload Files
File: /disk001/machen/public_html/a1b2c3d4/static/js/6.0b7ab51d.chunk.js
(this.webpackJsonpmachen=this.webpackJsonpmachen||[]).push([[6],{1894:function(e,t,a){"use strict";a.r(t);var l=a(7),o=a(2),n=a(22),c=a(5),i=a(0),r=a.n(i),d=a(148),s=a(117),u=a(83),b=a(3),f=a(9),v=a.n(f),O=a(1),h=a(481);a(164);t.default=function(e){var t=b.a.getState().db,a=Object(i.useState)({index:0,showQuantity:12,number:12,finalIndex:12,dataStructure:"month"}),f=Object(c.a)(a,2),j=f[0],g=f[1],m=Object(i.useState)({total:{value:0,label:"Concluidas",color:"#5A7F71",id:"Concluidas"}}),p=Object(c.a)(m,2),y=p[0],E=p[1],x=Object(i.useState)({}),w=Object(c.a)(x,2),C=w[0],M=w[1],S=Object(i.useRef)([{label:"Concluidas",color:"#5A7F71"}]),_=Object(i.useRef)([]),k=window.location.hash.split("/");k[0]=k[0].replace("#","");var D=function(e){for(var t=0,a=0;a<e.length;a++)t+=e.charCodeAt(a);return"#"+(t%16777215+16777216).toString(16).slice(1,7)};r.a.useEffect((function(){Object.keys(e.filter).length>0&&g(e.filter)}),[e.filter]),r.a.useEffect((function(){console.log(j),j.tags&&(_.current=[],j.tags.forEach((function(e){_.current=[].concat(Object(n.a)(_.current),[e.label])})))}),[j]),r.a.useEffect((function(){var a,n,c={},i={},r=[],d=j.startDate?v()(1e3*j.startDate):v()().startOf("year"),s=j.endDate?v()(1e3*j.endDate):v()().endOf("year"),u=(a=d.format("MMMM"),n=s.format("MMMM"),console.log(a,n),a===n);console.log(u);e.planCards&&(Object.keys(e.planCards).filter((function(e){return!t.cards[e].deleted})).forEach((function(e){var a,n,b,f=!((null===j||void 0===j||null===(a=j.users)||void 0===a?void 0:a.length)>0);j.users&&Object.keys(null===(n=t.cards[e])||void 0===n?void 0:n._users).length>0&&Object.values(null===(b=t.cards[e])||void 0===b?void 0:b._users).forEach((function(e){j.users.forEach((function(t){e._id===t&&(f=!0)}))}));if(f){var h,g={date:v()(1e3*(null===(h=t.cards[e].completed_at)||void 0===h?void 0:h.low)),tags:t.cards[e]._tags};if(g.date.isBetween(d,s,null,"[]")){var m,p,y=g.date.format("MMMM");if((null===j||void 0===j||null===(m=j.tags)||void 0===m?void 0:m.length)>0||j.tagsByText)g.tags.filter((function(e){return j.tags&&j.tags.length>0&&e.label&&_.current.includes(e.label)||j.tagsByText&&e.label&&e.label.toLowerCase().indexOf(j.tagsByText.toLowerCase())>-1})).forEach((function(e){!function(e,t){var a,n,d,s=t.label,b=e.date.format("MMMM"),f=v()(e.date).startOf("month"),h=v()(e.date).diff(f,"days"),j=Math.floor(h/7)+1;console.log(j),c=Object(o.a)(Object(o.a)({},c),{},Object(l.a)({},s,Object(o.a)(Object(o.a)({},c[s]||{}),{},{id:s,color:(null===t||void 0===t?void 0:t.color)||D(s),label:s,value:((null===(a=c[s])||void 0===a?void 0:a.value)||0)+1}))),i=Object(o.a)(Object(o.a)({},i),{},Object(l.a)({},s,Object(o.a)(Object(o.a)({},i[s]||{}),{},Object(l.a)({value:((null===(n=i[s])||void 0===n?void 0:n.value)||0)+1,label:s},u?Object(O.u)("$__Semana ")+j:Object(O.u)("$__".concat(b)),((null===(d=i[s])||void 0===d?void 0:d[u?Object(O.u)("$__Semana ")+j:Object(O.u)("$__".concat(b))])||0)+1)))),r=Object(o.a)(Object(o.a)({},r),{},Object(l.a)({},s,{label:s,color:(null===t||void 0===t?void 0:t.color)||D(s)}))}(g,e)})),S.current=Object.values(r);else c=Object(o.a)(Object(o.a)({},c),{},{total:Object(o.a)(Object(o.a)({},c.total||{}),{},{value:c&&c.total&&c.total.value?c.total.value+1:1,label:"Concluidas",color:"#5A7F71",id:"Concluidas"})}),i=Object(o.a)(Object(o.a)({},i),{},Object(l.a)({},y,Object(o.a)(Object(o.a)({},i.total||{}),{},{value:((null===(p=i[y])||void 0===p?void 0:p.value)||0)+1,label:"Concluidas"}))),S.current=[{label:"Concluidas",color:"#5A7F71"}]}}})),y!==c&&(E(Object.values(c)),M(i)))}),[e.planCards,e.load,j]);return r.a.createElement("div",{className:"box",style:{width:"100%",height:"100%",alignSelf:"center",borderRadius:"5px",backgroundColor:"transparent",display:"flex",flexFlow:"column",overflow:"visible"}},r.a.createElement(u.a,{handleSetSelected:function(t){g(Object(o.a)(Object(o.a)({},j),t)),e.handleSetFilter(Object(o.a)(Object(o.a)(Object(o.a)({},j),t),{},{id:e.id}))},filterConfig:{filterItems:["date","users","tags","tagsByText"]},tittle:Object(O.u)("$__"+e.tittle),icon:e.icon,styles:e.styles,datafilter:!0,indicators:j||null,handleModal:function(){e.handleDatagridTable()},table:!0,handleRemoveObject:function(){return e.handleRemoveObject(e.id)},edit:e.edit,handleSetoption:function(t){g(Object(o.a)({},t)),e.handleSetFilter(Object(o.a)(Object(o.a)(Object(o.a)({},j),t),{},{id:e.id}))}}),r.a.createElement("div",{style:{borderBottom:"1px solid #D3D3D3",width:"100%"}}),r.a.createElement("div",{style:{}}),r.a.createElement("div",{style:{position:"relative",flex:"1 1 auto",fontSize:"16px"}},r.a.createElement("div",{style:{width:"100%",height:"100%",position:"absolute",fontWeight:"lighter",backgroundColor:"#f5f5f5"}},e.load?r.a.createElement("div",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},r.a.createElement("div",{style:{alignSelf:"center"}},"  ",r.a.createElement("div",{className:"loader"}))):r.a.createElement("div",{className:"component",style:{width:"100%",height:"100%",display:"flex",flexDirection:"column"}},r.a.createElement("div",{style:{width:"100%",flex:1,position:"relative"}},r.a.createElement("div",{style:{width:"100%",height:"100%",position:"absolute"}},r.a.createElement(s.a,{data:y,colors:{datum:"data.color"},margin:{top:35,right:40,bottom:35,left:40},innerRadius:0,padAngle:1.7,cornerRadius:3,activeOuterRadiusOffset:8,borderWidth:1,padding:1===y.length?.35:.1,axisLeft:{tickSize:5,tickPadding:5,tickRotation:0,format:function(e){return e%1===0?e:""}},theme:{fontSize:"16px",fontWeight:"bold",legend:!1,background:"transparent"}}))),e.filter.table&&r.a.createElement("div",{style:{maxHeight:"50%",overflow:"scroll"}},r.a.createElement(h.default,{data:Object.values(C)}))))),r.a.createElement("div",{style:{height:"15%",maxHeight:"60px",display:"flex",backgroundColor:"white"}},r.a.createElement(d.a,{legend:Object(n.a)(S.current.map((function(e,t){return{key:t,color:e.color,label:e.label}})))})))}}}]);
//# sourceMappingURL=6.0b7ab51d.chunk.js.map