Finishing case progress and save behavior
This commit is contained in:
1 parent
abe7691730
commit
45a3cdeaf5
13 files changed
+87
-56
No files matched your search
@@ -13,7 +13,7 @@ Template.caseProgress.onCreated(() => {
|
||||
|
||||
Template.caseProgress.onRendered(() => {
|
||||
const instance = Template.instance();
|
||||
const { timepointApi, measurementApi } = instance.data;
|
||||
const { timepointApi, measurementApi, timepointId } = instance.data;
|
||||
|
||||
// Stop here if we have no current timepoint ID (and therefore no defined timepointAPI)
|
||||
if (!timepointApi) {
|
||||
@@ -22,8 +22,13 @@ Template.caseProgress.onRendered(() => {
|
||||
}
|
||||
|
||||
// Get the current and prior timepoints
|
||||
const current = timepointApi.current();
|
||||
const prior = timepointApi.prior();
|
||||
const current = timepointApi.timepoints.findOne({ timepointId });
|
||||
const priorFilter = {
|
||||
latestDate: { $lt: current.latestDate },
|
||||
patientId: current.patientId
|
||||
};
|
||||
const priorSorting = { sort: { latestDate: -1 } };
|
||||
const prior = timepointApi.timepoints.findOne(priorFilter, priorSorting);
|
||||
|
||||
// Stop here if timepoint is locked
|
||||
if (current && current.isLocked) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@import "{ohif:design}/app"
|
||||
@require '{ohif:design}/app'
|
||||
|
||||
.caseProgress
|
||||
transition(all 0.3 ease)
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
h5
|
||||
theme('color', '$textPrimaryColor')
|
||||
line-height: 46px
|
||||
line-height: 40px
|
||||
margin: 0
|
||||
font-size: 15px
|
||||
font-weight: bold
|
||||
|
||||
+11
-11
@@ -1,27 +1,27 @@
|
||||
<template name="radialProgressBar">
|
||||
<div class="radialProgress">
|
||||
<svg id="svg"
|
||||
width="46"
|
||||
height="46"
|
||||
viewPort="0 0 50 50"
|
||||
width="40"
|
||||
height="40"
|
||||
viewPort="0 0 40 40"
|
||||
version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
|
||||
<!-- stroke-dasharray is 2 * PI * radius !-->
|
||||
<circle r="21"
|
||||
cx="23"
|
||||
cy="23"
|
||||
<circle r="18"
|
||||
cx="20"
|
||||
cy="20"
|
||||
fill="transparent"
|
||||
stroke-dasharray="131.9469"
|
||||
stroke-dasharray="113.097335529232557"
|
||||
stroke-dashoffset="0">
|
||||
</circle>
|
||||
{{#unless isLocked}}
|
||||
<circle id="bar"
|
||||
r="21"
|
||||
cx="23"
|
||||
cy="23"
|
||||
r="18"
|
||||
cx="20"
|
||||
cy="20"
|
||||
fill="transparent"
|
||||
stroke-dasharray="131.9469"
|
||||
stroke-dasharray="113.097335529232557"
|
||||
style="stroke-dashoffset: {{progressRadius}}px;">
|
||||
</circle>
|
||||
{{/unless}}
|
||||
|
||||
+4
-2
@@ -1,3 +1,5 @@
|
||||
import { Template } from 'meteor/templating';
|
||||
|
||||
Template.radialProgressBar.helpers({
|
||||
progressComplete() {
|
||||
const instance = Template.instance();
|
||||
@@ -5,9 +7,9 @@ Template.radialProgressBar.helpers({
|
||||
},
|
||||
|
||||
progressRadius() {
|
||||
var radius = 21 * 2 * Math.PI;
|
||||
const instance = Template.instance();
|
||||
var percentLeft = (100 - instance.data.progressPercent) / 100;
|
||||
const radius = 18 * 2 * Math.PI;
|
||||
const percentLeft = (100 - instance.data.progressPercent) / 100;
|
||||
return percentLeft * radius;
|
||||
}
|
||||
});
|
||||
+3
-2
@@ -1,6 +1,6 @@
|
||||
@import "{ohif:design}/app"
|
||||
@require '{ohif:design}/app'
|
||||
|
||||
$circleSize = 46px
|
||||
$circleSize = 40px
|
||||
|
||||
.radialProgress
|
||||
position: relative
|
||||
@@ -29,6 +29,7 @@ $circleSize = 46px
|
||||
line-height: $circleSize
|
||||
left: 50%
|
||||
position: absolute
|
||||
text-align: center
|
||||
top: 50%
|
||||
transform(translate(-50%, -50%))
|
||||
width: $circleSize
|
||||
|
||||
Reference in new issue
Block a user