(flow) add intention and the other fields for step/team

This commit is contained in:
Julien Calixte
2023-05-29 22:22:19 +02:00
parent 95cdd26c2b
commit 67fa42c0e4
2 changed files with 30 additions and 8 deletions

View File

@@ -11,6 +11,7 @@ const store = useProductionFlow()
<ul>
<li :key="team.name" v-for="team in store.$state.teams">
{{ team.name }}
<p>{{ team.intention }}</p>
<button @click="store.removeTeam(team.id)"></button>
</li>
</ul>

View File

@@ -4,24 +4,45 @@ import { useProductionFlow } from "@/modules/flow/store/useProductionFlow.store"
import { ref } from "vue"
const store = useProductionFlow()
const newTeam = ref("")
const prerequisites = ref("")
const output = ref("")
const intention = ref("")
const responsible = ref("")
const clearTeam = () => {
newTeam.value = ""
prerequisites.value = ""
output.value = ""
intention.value = ""
responsible.value = ""
}
const addTeam = () => {
store.addTeam({
name: newTeam.value,
outputs: ["Go for live"],
prerequisites: ["new app version is step in staging environment"],
intention:
"Test the app as a whole to validate that the User Experience has no bug",
responsible: "Product Owner",
outputs: [output.value],
prerequisites: [prerequisites.value],
intention: intention.value,
responsible: responsible.value,
})
clearTeam()
}
</script>
<template>
<form class="add-step" @submit.prevent>
<FormInput id="team" label="Team" v-model="newTeam" />
<button @click="addTeam">Add a step</button>
<form class="add-step" @submit.prevent="addTeam">
<FormInput id="team" label="Team (or step)" v-model="newTeam" />
<FormInput
id="prerequisites"
label="Prerequisites"
v-model="prerequisites"
/>
<FormInput id="output" label="Output" v-model="output" />
<FormInput id="intention" label="Intention" v-model="intention" />
<FormInput id="responsible" label="Responsible" v-model="responsible" />
<button type="submit">Add a step</button>
</form>
</template>