prune: remove bird features & fix BoardGameToolbox import
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { useBoardGameStore } from '@/modules/5s/board-game-store'
|
||||
import BoardGamePerformance from '@/modules/5s/BoardGamePerformance.vue'
|
||||
import BoardGameToolbox from '@/modules/5s/Toolbox.vue'
|
||||
import BoardGameToolbox from '@/modules/5s/BoardGameToolbox.vue'
|
||||
import { _5S, is5S } from '@/modules/5s/types/5s'
|
||||
import { onMounted, ref, toValue } from 'vue'
|
||||
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
import { newsAppFeatures } from '@/data/app-feature'
|
||||
import type {
|
||||
Feature,
|
||||
FeatureStatus
|
||||
} from '@/modules/pull-system/feature/feature'
|
||||
import type { FeatureStep } from '@/modules/pull-system/feature/feature-steps'
|
||||
import {
|
||||
birdFeatures,
|
||||
mobileAppFeatures
|
||||
} from '@/modules/pull-system/feature/feature.fixture'
|
||||
import { mobileAppFeatures } from '@/modules/pull-system/feature/feature.fixture'
|
||||
import type { Strategy } from '@/modules/pull-system/lean/strategy'
|
||||
import type { FeatureState } from '@/store-type'
|
||||
import {
|
||||
@@ -74,9 +70,8 @@ const mayBeInProgress = ({
|
||||
return feature.status
|
||||
}
|
||||
|
||||
export const newBacklog = (type: 'bird' | 'mobile-app', limit?: number) => {
|
||||
const initialFeatures =
|
||||
type === 'bird' ? [...birdFeatures] : [...mobileAppFeatures]
|
||||
export const newBacklog = (limit?: number) => {
|
||||
const initialFeatures = [...mobileAppFeatures]
|
||||
return limit !== undefined
|
||||
? popNElement(shuffleArray(initialFeatures), limit)
|
||||
: shuffleArray(initialFeatures)
|
||||
|
||||
@@ -34,8 +34,8 @@ export const useFeatureStore = defineStore('feature', {
|
||||
meta: resetMeta()
|
||||
}),
|
||||
actions: {
|
||||
async initBoard(type: 'bird' | 'mobile-app', limit?: number) {
|
||||
this.backlog = newBacklog(type, limit)
|
||||
async initBoard(limit?: number) {
|
||||
this.backlog = newBacklog(limit)
|
||||
this.steps = featureSteps
|
||||
const initialSteps = featureSteps.filter(
|
||||
(step) => step.title !== 'Release' && step.title !== 'Development'
|
||||
|
||||
@@ -1,26 +1,7 @@
|
||||
import { newsAppFeatures } from '@/data/app-feature'
|
||||
import { birds } from '@/data/bird'
|
||||
import { Feature } from '@/modules/pull-system/feature/feature'
|
||||
import { randomInteger } from '@/utils'
|
||||
|
||||
export const features: Feature[] = birds.map((name) => ({
|
||||
name,
|
||||
complexity: randomInteger(1, 5),
|
||||
leadTime: 0,
|
||||
status: 'doing',
|
||||
step: Infinity,
|
||||
qualityIssue: 0
|
||||
}))
|
||||
|
||||
export const birdFeatures: readonly Feature[] = birds.map((name) => ({
|
||||
name,
|
||||
complexity: randomInteger(1, 5),
|
||||
leadTime: 0,
|
||||
status: 'doing',
|
||||
step: Infinity,
|
||||
qualityIssue: 0
|
||||
}))
|
||||
|
||||
export const mobileAppFeatures: readonly Feature[] = newsAppFeatures.map(
|
||||
(name) => ({
|
||||
name,
|
||||
|
||||
@@ -70,7 +70,7 @@ export const useSimulationStore = defineStore('dashboard', {
|
||||
actions: {
|
||||
async simulate(strategy: Strategy) {
|
||||
const steps = featureSteps
|
||||
const backlog = await instance.newBacklog('mobile-app')
|
||||
const backlog = await instance.newBacklog()
|
||||
const features = await instance.initBoard(steps, backlog, true)
|
||||
|
||||
const newState = await instance.simulate(
|
||||
|
||||
Reference in New Issue
Block a user