Skip to content

Commit

Permalink
feat(ui): improve the one of task section (#6903)
Browse files Browse the repository at this point in the history
  • Loading branch information
MilosPaunovic authored Jan 23, 2025
1 parent 132d70d commit 2045635
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
9 changes: 2 additions & 7 deletions ui/src/components/code/segments/Task.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,8 @@
let temp = YamlUtils.parse(yaml.value);
if (lastBreadcumb.value.shown) {
temp = {
...temp,
[breadcrumbs.value.at(-1).label]: {
...temp[breadcrumbs.value.at(-1).label],
...task,
},
};
const field = breadcrumbs.value.at(-1).label;
temp = {...temp, [field]: task};
}
temp = YamlUtils.stringify(temp);
Expand Down
9 changes: 6 additions & 3 deletions ui/src/components/flows/tasks/OneOfContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,13 @@
created() {
this.schemas = this.schema?.oneOf ?? [];
const schema = this.schemaOptions.find(
(sch) => sch.id === this.modelValue.type,
const schema = this.schemaOptions.find((item) =>
typeof this.modelValue === "string"
? item.id === "string"
: item.id === this.modelValue.type,
);
this.onSelect(schema.value);
this.onSelect(schema?.value);
// }
},
methods: {
Expand Down
6 changes: 3 additions & 3 deletions ui/src/components/flows/tasks/TaskObject.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
>
<template #label>
<span v-if="required" class="me-1 text-danger">*</span>
<span v-if="getKey(key)" class="label">{{
getKey(key)
}}</span>
<span v-if="getKey(key)" class="label">
{{ getKey(key) }}
</span>
<el-tag
disable-transitions
size="small"
Expand Down

0 comments on commit 2045635

Please sign in to comment.