reorganize packages, start converting overall app to react (very broken at the moment)

This commit is contained in:
Erik Ziegler committed 2018-12-12 18:06:25 +01:00
1 parent 024fe1a448
commit 5f30f7bd35
479 files changed
+5364 -11611

No files matched your search

@@ -0,0 +1,11 @@
<template name="measurementTableHeaderRow">
<div class="measurementTableHeaderRow">
<div class="type">{{toolGroup.name}}</div>
<div class="max {{#if gt numberOfMeasurements maxNumMeasurements}}warning{{/if}}">
{{#if getMax toolGroup.id}}
<p class="maxNumMeasurements">Max {{getMax toolGroup.id}}</p>
{{/if}}
</div>
<div class="numberOfMeasurements">{{numberOfMeasurements toolGroup.id}}</div>
</div>
</template>
@@ -0,0 +1,33 @@
import { Template } from 'meteor/templating';
import { OHIF } from 'meteor/ohif:core';
import { Viewerbase } from 'meteor/ohif:viewerbase';
Template.measurementTableHeaderRow.helpers({
numberOfMeasurements(toolGroupId) {
const { toolGroup, measurementRows } = Template.instance().data;
if (toolGroup.id === 'newTargets') {
let result = 0;
measurementRows.forEach(measurementRow => {
const measurementData = measurementRow.entries[0];
if (measurementData.isSplitLesion) return;
result++;
});
return result;
}
return measurementRows.length ? measurementRows.length : null;
},
getMax(toolGroupId) {
const { conformanceCriteria } = Template.instance().data;
if (!conformanceCriteria) return;
if (toolGroupId === 'targets') {
return conformanceCriteria.maxTargets.get();
} else if (toolGroupId === 'newTargets') {
return conformanceCriteria.maxNewTargets.get();
}
}
});
@@ -0,0 +1,83 @@
@import "{ohif:viewerbase}/app"
$headerRowHeight = 63px
.measurementTableHeaderRow
theme('background-color', '$uiGrayDarker')
theme('color', '$textSecondaryColor')
display: flex
theme('fill', '$textSecondaryColor')
height: $headerRowHeight
line-height: $headerRowHeight
margin-top: 2px
width: 100%
&.inactive .add
cursor: not-allowed
svg
fill: #5A666D
div
align-items: stretch
flex: 1
justify-content: space-around
text-align: center
.add
cursor: pointer
max-width: 30px
padding-left: 2px
svg
fill: #C1D8E3
height: $headerRowHeight
max-width: 11px
&:hover svg
theme('fill', '$hoverColor')
&:active svg
theme('fill', '$activeColor')
.type
theme('color', '$textSecondaryColor')
font-size: 22px
font-weight: 300
line-height: $headerRowHeight
padding: 0 10px 0 20px
text-align: left
.numberOfMeasurements
theme('color', '$uiSkyBlue')
float: right
font-weight: 300
font-size: 40px
max-width: 54px
height: $headerRowHeight
line-height: 66px
.max
height: $headerRowHeight
max-width: 64px
text-align: right
.maxNumMeasurements
theme('background-color', '$textSecondaryColor')
border-radius: 3px
color: black
display: table
font-size: 12px
font-weight: 500
height: 19px
line-height: 17px
margin-left: auto
margin-top: 22px
padding: 2px 6px 0
text-transform: uppercase
transition($sidebarTransition)
&.warning
.maxNumMeasurements
theme('background-color', '$uiYellow')
theme('color', '$textPrimaryColor')