add mobile app features

This commit is contained in:
Julien Calixte
2024-12-23 20:37:04 +01:00
parent d551044673
commit 4536816f31
6 changed files with 73 additions and 14 deletions

32
src/data/app-feature.ts Normal file
View File

@@ -0,0 +1,32 @@
export const appFeatures = [
'Login / Sign Up',
'Search',
'Geolocation',
'Note Taking',
'Calendar Integration',
'Push Notifications',
'In-App Purchases',
'Social Media Integration',
'Location Services',
'Offline first Mode',
'User Profile',
'Analytics',
'Multi-language Support',
'Dark Mode',
'QR Code Scanner',
'Cloud Sync',
'Customizable Themes',
'File Uploads',
'Video Streaming',
'Voice Commands',
'Augmented Reality',
'Data Encryption',
'Biometric Authentication',
'Wearable Integration',
'Smart Home Integration',
'IoT Connectivity',
'Predictive Text',
'Speech Recognition',
'Image Recognition',
'Document Scanning'
]

View File

@@ -10,7 +10,7 @@ defineProps<{ alias: string }>()
const featureStore = useFeatureStore()
onMounted(() => featureStore.initBoard(NUMBER_OF_FEATURES))
onMounted(() => featureStore.initBoard('mobile-app', NUMBER_OF_FEATURES))
</script>
<template>

View File

@@ -1,8 +1,14 @@
import { Feature, FeatureStatus } from '@/modules/pull-system/feature/feature'
import { FeatureStep } from '@/modules/pull-system/feature/feature-steps'
import { features as initialFeatures } from '@/modules/pull-system/feature/feature.fixture'
import { Strategy } from '@/modules/lean/strategy'
import { FeatureState } from '@/store-type'
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 type { Strategy } from '@/modules/pull-system/lean/strategy'
import type { FeatureState } from '@/store-type'
import {
getMean,
pickRandomElement,
@@ -67,10 +73,12 @@ const mayBeInProgress = ({
return feature.status
}
export const newBacklog = (limit?: number) =>
limit !== undefined
export const newBacklog = (type: 'bird' | 'mobile-app', limit?: number) => {
const initialFeatures = type === 'bird' ? birdFeatures : mobileAppFeatures
return limit !== undefined
? popNElement(shuffleArray(initialFeatures), limit)
: shuffleArray(initialFeatures)
}
export const initBoard = (
steps: FeatureStep[],
@@ -210,7 +218,7 @@ const getQualityProbability = (
switch (complexity) {
case 1:
probabilityOfGoodQuality = 0.95
break
case 2:
probabilityOfGoodQuality = 0.88
break

View File

@@ -34,8 +34,8 @@ export const useFeatureStore = defineStore('feature', {
meta: resetMeta()
}),
actions: {
async initBoard(limit?: number) {
this.backlog = newBacklog(limit)
async initBoard(type: 'bird' | 'mobile-app', limit?: number) {
this.backlog = newBacklog(type, limit)
this.steps = featureSteps
this.features = initBoard(this.steps, this.backlog)

View File

@@ -1,3 +1,4 @@
import { appFeatures } from '@/data/app-feature'
import { birds } from '@/data/bird'
import { Feature } from '@/modules/pull-system/feature/feature'
import { randomInteger } from '@/utils'
@@ -10,3 +11,21 @@ export const features: Feature[] = birds.map((name) => ({
step: Infinity,
qualityIssue: 0
}))
export const birdFeatures: Feature[] = birds.map((name) => ({
name,
complexity: randomInteger(1, 5),
leadTime: 0,
status: 'doing',
step: Infinity,
qualityIssue: 0
}))
export const mobileAppFeatures: Feature[] = appFeatures.map((name) => ({
name,
complexity: randomInteger(1, 5),
leadTime: 0,
status: 'doing',
step: Infinity,
qualityIssue: 0
}))

View File

@@ -1,6 +1,6 @@
import { featureSteps } from '@/modules/pull-system/feature/feature-steps'
import { Strategy } from '@/modules/lean/strategy'
import { Dashboard, Meta } from '@/store-type'
import type { Strategy } from '@/modules/pull-system/lean/strategy'
import type { Dashboard, Meta } from '@/store-type'
import { getRound } from '@/utils'
import { defineStore } from 'pinia'
@@ -64,7 +64,7 @@ export const useSimulationStore = defineStore('dashboard', {
actions: {
async simulate(strategy: Strategy) {
const steps = featureSteps
const backlog = await instance.newBacklog()
const backlog = await instance.newBacklog('bird')
const features = await instance.initBoard(steps, backlog)
const newState = await instance.simulate(