Skip to content

Commit

Permalink
fix(ui): amend the ability to create tasks (#6808)
Browse files Browse the repository at this point in the history
  • Loading branch information
MilosPaunovic authored Jan 17, 2025
1 parent 969faba commit 9cd1e0c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ui/src/components/code/components/Add.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div @click="emits('add', props.what)" class="pb-3 adding">
<div @click="emits('add', props.what)" class="py-2 adding">
{{ t("no_code.adding", {what: props.what}) }}
</div>
</template>
Expand Down
6 changes: 6 additions & 0 deletions ui/src/utils/yamlUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,12 @@ export default class YamlUtils {
return parse && parse.tasks && parse.tasks[0].id;
}

static getLastTask(source) {
let parse = YamlUtils.parse(source);

return parse && parse.tasks && parse.tasks[parse.tasks.length - 1].id;
}

static checkTaskAlreadyExist(source, taskYaml) {
const yamlDoc = yaml.parseDocument(source);
const parsedTask = YamlUtils.parse(taskYaml);
Expand Down

0 comments on commit 9cd1e0c

Please sign in to comment.