-
Notifications
You must be signed in to change notification settings - Fork 0
/
chunk-A65I5FX6.js
1 lines (1 loc) · 1.75 KB
/
chunk-A65I5FX6.js
1
import{a as S}from"./chunk-ATJCOA52.js";import{a as j}from"./chunk-SEPR3LHL.js";import{b as x}from"./chunk-PFVGJA53.js";import{c as C,ca as g,da as F,ea as I,ga as M,j as D,k as T}from"./chunk-4ADYIAMV.js";import{$a as d,Ga as n,Ha as s,Ua as m,Wa as c,Ya as p,ab as v,ba as o,hb as f,ob as h,qb as b,tb as y,ub as u,wb as A}from"./chunk-KYEXPK5P.js";function w(i,a){if(i&1&&(d(0,"clr-alert",0)(1,"clr-alert-item")(2,"span",1),h(3),u(4,"toFixed"),v()()()),i&2){let P=f();c("clrAlertType","info")("clrAlertClosable",!1),n(3),b(" ",A(4,3,P.availableDaysForTeam,2)," days available for the sprint. ")}}var q=(()=>{let a=class a{constructor(e,t,r){this.teamService=e,this.parametersService=t,this.alertService=r,this.parameters=x,this.team=[]}ngOnInit(){this.teamService.getTeammates().subscribe(e=>{this.team=e,this.calcAvailableDays()}),this.parametersService.getParameters().subscribe(e=>{this.parameters=e,this.calcAvailableDays()})}calcAvailableDays(){let e=[],t=0;this.team.forEach(r=>{try{let l=r.getAvailableDaysInSprint(this.parameters.nbWeeksForOneSprint);r.isNewComer&&(l=l-l*this.parameters.velocityRateForNewComer),t+=l}catch(l){e.push(l.message)}}),e.length?(this.availableDaysForTeam=void 0,this.alertService.setAlert(`Seems to be a problem in holidays of teammate and available days in a sprint: ${e.join(", ")}`)):this.availableDaysForTeam=Math.round((t-t*this.parameters.marginRate)*100)/100}};a.\u0275fac=function(t){return new(t||a)(s(D),s(T),s(S))},a.\u0275cmp=o({type:a,selectors:[["app-available-days"]],standalone:!0,features:[y],decls:1,vars:1,consts:[[3,"clrAlertType","clrAlertClosable"],[1,"alert-text"]],template:function(t,r){t&1&&m(0,w,5,6,"clr-alert",0),t&2&&p(0,r.team.length>0?0:-1)},dependencies:[C,M,g,F,I,j],encapsulation:2});let i=a;return i})();export{q as a};