Advertisement
Guest User

Untitled

a guest
May 22nd, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. monthlyReport: state => {
  2. var costTypes = {}
  3. state.monthlySprints.forEach(sprint => {
  4. const keys = Object.keys(sprint)
  5. for (const key of keys) {
  6. costTypes[sprint[key].cost] = 0
  7. }
  8. })
  9. state.monthlySprints.forEach(sprint => {
  10. const keys1 = Object.keys(sprint)
  11. for (const key of keys1) {
  12. if(typeof sprint[key].storypoints == "number")
  13. {
  14. costTypes[sprint[key].cost] += sprint[key].storypoints
  15. console.log(costTypes)
  16. }
  17. else
  18. {
  19. console.log(sprint[key].name)
  20. }
  21.  
  22. }
  23. })
  24. state.report = costTypes
  25. return state.report
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement