fix: eraser not resetting features
This commit is contained in:
@@ -57,16 +57,16 @@ const feature: Feature = {
|
||||
<p>Each day, you can choose between 3 strategies:</p>
|
||||
<ol>
|
||||
<li>
|
||||
Push system
|
||||
<PushSystemIcon />
|
||||
Push system
|
||||
</li>
|
||||
<li>
|
||||
Pull system
|
||||
<PullSystemIcon />
|
||||
Pull system
|
||||
</li>
|
||||
<li>
|
||||
Problem solving
|
||||
<ProblemSolvingIcon />
|
||||
Problem solving
|
||||
</li>
|
||||
</ol>
|
||||
<p>
|
||||
|
||||
@@ -15,28 +15,16 @@ const featureStore = useFeatureStore()
|
||||
<template>
|
||||
<div class="flow-controls">
|
||||
<div class="row">
|
||||
<button
|
||||
@click="featureStore.nextDay('push')"
|
||||
:disabled="featureStore.isProjectFinished"
|
||||
>
|
||||
<button @click="featureStore.nextDay('push')" :disabled="featureStore.isProjectFinished">
|
||||
<PushSystemIcon color="white" />
|
||||
</button>
|
||||
<button
|
||||
@click="featureStore.nextDay('pull')"
|
||||
:disabled="featureStore.isProjectFinished"
|
||||
>
|
||||
<button @click="featureStore.nextDay('pull')" :disabled="featureStore.isProjectFinished">
|
||||
<PullSystemIcon color="white" />
|
||||
</button>
|
||||
<button
|
||||
@click="featureStore.nextDay('problem-solving')"
|
||||
:disabled="featureStore.isProjectFinished"
|
||||
>
|
||||
<button @click="featureStore.nextDay('problem-solving')" :disabled="featureStore.isProjectFinished">
|
||||
<ProblemSolvingIcon color="white" />
|
||||
</button>
|
||||
<button
|
||||
v-if="withEraser"
|
||||
@click="featureStore.initBoard(NUMBER_OF_FEATURES)"
|
||||
>
|
||||
<button v-if="withEraser" @click="featureStore.initBoard('mobile-app', NUMBER_OF_FEATURES)">
|
||||
<EraserIcon color="white" />
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { newsAppFeatures } from '@/data/app-feature'
|
||||
import type {
|
||||
Feature,
|
||||
FeatureStatus
|
||||
@@ -74,7 +75,8 @@ const mayBeInProgress = ({
|
||||
}
|
||||
|
||||
export const newBacklog = (type: 'bird' | 'mobile-app', limit?: number) => {
|
||||
const initialFeatures = type === 'bird' ? birdFeatures : mobileAppFeatures
|
||||
const initialFeatures =
|
||||
type === 'bird' ? [...birdFeatures] : [...mobileAppFeatures]
|
||||
return limit !== undefined
|
||||
? popNElement(shuffleArray(initialFeatures), limit)
|
||||
: shuffleArray(initialFeatures)
|
||||
|
||||
@@ -12,7 +12,7 @@ export const features: Feature[] = birds.map((name) => ({
|
||||
qualityIssue: 0
|
||||
}))
|
||||
|
||||
export const birdFeatures: Feature[] = birds.map((name) => ({
|
||||
export const birdFeatures: readonly Feature[] = birds.map((name) => ({
|
||||
name,
|
||||
complexity: randomInteger(1, 5),
|
||||
leadTime: 0,
|
||||
@@ -21,11 +21,13 @@ export const birdFeatures: Feature[] = birds.map((name) => ({
|
||||
qualityIssue: 0
|
||||
}))
|
||||
|
||||
export const mobileAppFeatures: Feature[] = newsAppFeatures.map((name) => ({
|
||||
name,
|
||||
complexity: randomInteger(1, 5),
|
||||
leadTime: 0,
|
||||
status: 'doing',
|
||||
step: Infinity,
|
||||
qualityIssue: 0
|
||||
}))
|
||||
export const mobileAppFeatures: readonly Feature[] = newsAppFeatures.map(
|
||||
(name) => ({
|
||||
name,
|
||||
complexity: randomInteger(1, 5),
|
||||
leadTime: 0,
|
||||
status: 'doing',
|
||||
step: Infinity,
|
||||
qualityIssue: 0
|
||||
})
|
||||
)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Feature } from '@/modules/pull-system/feature/feature'
|
||||
import { FeatureStep } from '@/modules/pull-system/feature/feature-steps'
|
||||
import { Strategy } from '@/modules/lean/strategy'
|
||||
import type { Feature } from '@/modules/pull-system/feature/feature'
|
||||
import type { FeatureStep } from '@/modules/pull-system/feature/feature-steps'
|
||||
import type { Strategy } from '@/modules/pull-system/lean/strategy'
|
||||
|
||||
export type Meta = {
|
||||
totalDays: number
|
||||
|
||||
Reference in New Issue
Block a user