Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

Make TaskFlow reactive to the task stage status change.

Tianzhou Chen655f06182f72
diff --git a/frontend/src/views/TaskFlow.vue b/frontend/src/views/TaskFlow.vue
index c293a5798f..dfd4a81414 100644
--- a/frontend/src/views/TaskFlow.vue
+++ b/frontend/src/views/TaskFlow.vue
@@ -124,8 +124,8 @@
</template>
<script lang="ts">
-import { PropType } from "vue";
-import { Task, Stage, StageId, StageStatus } from "../types";
+import { computed, PropType } from "vue";
+import { Task, StageId } from "../types";
import { activeStage } from "../utils";
interface FlowItem {
@@ -145,8 +145,8 @@ export default {
},
components: {},
setup(props, ctx) {
- const stageList: FlowItem[] = props.task.attributes.stageProgressList.map(
- (stageProgress) => {
+ const stageList = computed<FlowItem[]>(() => {
+ return props.task.attributes.stageProgressList.map((stageProgress) => {
return {
id: stageProgress.id,
title: stageProgress.name,
@@ -155,8 +155,8 @@ export default {
return `/task/${props.task.id}`;
},
};
- }
- );
+ });
+ });
const stageIconClass = (stage: FlowItem) => {
switch (stage.status) {