mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-20 14:45:56 +08:00
Fix Experiment progress bar for cards when archived [SCI-10333] (#7229)
This commit is contained in:
parent
14b962570e
commit
390ccc412e
|
@ -44,11 +44,11 @@
|
|||
<div class="w-full h-1 bg-sn-sleepy-grey">
|
||||
<div class="h-full"
|
||||
:class="{
|
||||
'bg-sn-black': dtComponent.viewMode == 'archived',
|
||||
'bg-sn-blue': dtComponent.viewMode != 'archived'
|
||||
'bg-sn-black': params.archived_on,
|
||||
'bg-sn-blue': !params.archived_on
|
||||
}"
|
||||
:style="{
|
||||
width: params.completed_tasks / params.total_tasks * 100 + '%'
|
||||
width: `${progress}%`
|
||||
}"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -82,5 +82,14 @@ export default {
|
|||
Description,
|
||||
},
|
||||
mixins: [CardSelectorMixin, workflowImgMixin],
|
||||
computed: {
|
||||
progress() {
|
||||
const { completed_tasks: completedTasks, total_tasks: totalTasks } = this.params;
|
||||
|
||||
if (totalTasks === 0) return 0;
|
||||
|
||||
return (completedTasks / totalTasks) * 100;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -7,9 +7,14 @@
|
|||
}) }}
|
||||
<div class="py-1">
|
||||
<div class="w-24 h-1 bg-sn-light-grey">
|
||||
<div class="h-full bg-sn-blue" :style="{
|
||||
width: `${progress}%`
|
||||
}"></div>
|
||||
<div class="h-full"
|
||||
:class="{
|
||||
'bg-sn-black': params.data.archived_on,
|
||||
'bg-sn-blue': !params.data.archived_on
|
||||
}"
|
||||
:style="{
|
||||
width: `${progress}%`
|
||||
}"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue