Refactor JSON and SDK fields (#3968)

This commit is contained in:
qwerty287
2024-08-07 10:49:03 +02:00
committed by GitHub
parent 2d1bc9f15c
commit 2081ca85db
16 changed files with 164 additions and 133 deletions

View File

@@ -19,8 +19,8 @@ const workflow = toRef(props, 'workflow');
const { durationAsNumber } = useDate();
const durationRaw = computed(() => {
const start = (step.value ? step.value?.start_time : workflow.value?.start_time) || 0;
const end = (step.value ? step.value?.end_time : workflow.value?.end_time) || 0;
const start = (step.value ? step.value?.started : workflow.value?.started) || 0;
const end = (step.value ? step.value?.finished : workflow.value?.finished) || 0;
if (end === 0 && start === 0) {
return undefined;
@@ -43,5 +43,5 @@ const duration = computed(() => {
return durationAsNumber(durationElapsed.value || 0);
});
const started = computed(() => (step.value ? step.value?.start_time : workflow.value?.start_time) !== undefined);
const started = computed(() => (step.value ? step.value?.started : workflow.value?.started) !== undefined);
</script>