Hiding Case Progress on Baseline

This commit is contained in:
Bruno Alves de Faria 2017-09-05 10:17:25 -03:00
parent 4fbb8ee4c7
commit 2a255318b0
2 changed files with 10 additions and 5 deletions

View File

@ -1,10 +1,12 @@
<template name="caseProgress">
{{#form (extend class='caseProgress' api=instance.api)}}
{{>radialProgressBar isLocked=isLocked progressPercent=progressPercent progressText=progressText}}
{{#if isLocked}}
<div class="caseProgressStatus">
<h5>Locked</h5>
</div>
{{#if instance.isFollowUp.get}}
{{>radialProgressBar isLocked=isLocked progressPercent=progressPercent progressText=progressText}}
{{#if isLocked}}
<div class="caseProgressStatus">
<h5>Locked</h5>
</div>
{{/if}}
{{/if}}
<div class="caseProgressStatus">
{{#button class='btn' action='save' disabled=(isFinishDisabled)}}Save{{/button}}

View File

@ -10,6 +10,7 @@ Template.caseProgress.onCreated(() => {
instance.progressPercent = new ReactiveVar();
instance.progressText = new ReactiveVar();
instance.isLocked = new ReactiveVar(false);
instance.isFollowUp = new ReactiveVar(false);
instance.path = 'viewer.studyViewer.measurements';
instance.saveObserver = new Tracker.Dependency();
@ -130,7 +131,9 @@ Template.caseProgress.onRendered(() => {
// progress measurement.
if (current.timepointType === 'baseline') {
instance.progressPercent.set(100);
instance.isFollowUp.set(false);
} else {
instance.isFollowUp.set(true);
// Setup a reactive function to update the progress whenever
// a measurement is made
instance.autorun(() => {