Skip to content

Commit

Permalink
improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
timrobinson33 committed Mar 14, 2021
1 parent 07bfe87 commit a7ca180
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ function App() {
</div>
<div>
<span>Stat/PRN doses: </span>
<select onChange={e => setNumStatDoses(Number(e.target.value))}>
<select value={numStatDoses} onChange={e => setNumStatDoses(Number(e.target.value))}>
{_.range(7).map(x => <option key={x} value={x}>{x}</option>)}
</select>
{!!numStatDoses && <>
Expand All @@ -150,13 +150,16 @@ function App() {
</div>
{showCalc && <>
<div>
<span>Total dose: {totalDoseMg}mg = {formatNumber(totalDoseMl)} ml</span>
<span>Total dose: {prescribedDose} + ({numStatDoses} x {statDoseStrength}) = {totalDoseMg}mg</span>
</div>
<div>
<span>= {totalDoseMg} / {drugStrength.mg} x {drugStrength.ml} = {formatNumber(totalDoseMl)}ml</span>
</div>
<div>
<span>Number of vials: {numVials}</span>
</div>
<div>
<span>Waste: {wasteMg}mg = {formatNumber(wasteMl)}ml</span>
<span>Waste: {formatNumber(wasteMg)}mg (= {formatNumber(wasteMl)}ml)</span>
</div>
</>}
<button onClick={() => setDrugIdx(0)}>Clear</button>
Expand Down

0 comments on commit a7ca180

Please sign in to comment.