(lean) add the problem solving day

This commit is contained in:
Julien Calixte
2023-07-23 21:45:56 +02:00
parent eaec93c071
commit 3d686fa2ac
4 changed files with 56 additions and 30 deletions

View File

@@ -11,16 +11,18 @@ type State = {
backlog: Feature[]
meta: {
totalDays: number
daysWithProblemSolving: number
strategy: Record<Strategy, number>
}
}
const resetMeta = (): State['meta'] => ({
totalDays: 0,
daysWithProblemSolving: 0,
strategy: {
push: 0,
pull: 0,
'turn-off': 0
'problem-solving': 0
}
})
@@ -39,15 +41,22 @@ export const useFeatureStore = defineStore('feature', {
this.meta = resetMeta()
},
nextDay(strategy: Strategy) {
this.meta.totalDays++
this.meta.strategy[strategy]++
if (strategy === 'problem-solving') {
this.meta.daysWithProblemSolving++
return
}
this.features = nextDay({
backlog: this.backlog,
features: this.features,
steps: this.steps,
initialStep: this.steps[0].stepIndex,
strategy
strategy,
daysWithProblemSolving: this.meta.daysWithProblemSolving
})
this.meta.totalDays++
this.meta.strategy[strategy]++
}
},
getters: {