|
@@ -110,7 +110,7 @@ $copyTriggerAdded = [];
|
|
<td>
|
|
<td>
|
|
<input type="text" tabindex="-1"
|
|
<input type="text" tabindex="-1"
|
|
class="form-control form-control-sm events-none border-0"
|
|
class="form-control form-control-sm events-none border-0"
|
|
- value="{{ $k === 'systolicBP' ? 'Blood Pressure' : $v }}" readonly>
|
|
|
|
|
|
+ value="{{ $k === 'systolicBP' ? 'Blood Pressure' : ($k === 'heightInInches' ? 'Height' : $v) }}" readonly>
|
|
</td>
|
|
</td>
|
|
<td class="position-relative">
|
|
<td class="position-relative">
|
|
@if($k === "bmi")
|
|
@if($k === "bmi")
|
|
@@ -162,6 +162,18 @@ $copyTriggerAdded = [];
|
|
data-name="diastolicBP" diastolicBP
|
|
data-name="diastolicBP" diastolicBP
|
|
value="{{$contentData['diastolicBP']}}" placeholder="Diastolic">
|
|
value="{{$contentData['diastolicBP']}}" placeholder="Diastolic">
|
|
</div>
|
|
</div>
|
|
|
|
+ @elseif($k === 'heightInInches')
|
|
|
|
+ <div class="d-flex align-items-center bg-white">
|
|
|
|
+ <input type="text" class="form-control form-control-sm min-width-unset w-auto-input width-30px border-0 edit"
|
|
|
|
+ heightFeetInput
|
|
|
|
+ value="{{feetFromInches($contentData['heightInInches'])}}">
|
|
|
|
+ <span class="pl-1 pr-2 text-secondary bg-white">ft.</span>
|
|
|
|
+ <input type="text" class="form-control form-control-sm min-width-unset w-auto-input width-30px border-0 edit"
|
|
|
|
+ heightInchesInput
|
|
|
|
+ value="{{inchesAfterFeetFromInches($contentData['heightInInches'])}}">
|
|
|
|
+ <span class="pl-1 text-secondary bg-white">in.</span>
|
|
|
|
+ <input type="hidden" data-name="heightInInches" value="{{$contentData['heightInInches']}}">
|
|
|
|
+ </div>
|
|
@else
|
|
@else
|
|
<input type="text"
|
|
<input type="text"
|
|
class="form-control form-control-sm border-0" data-name="{{$k}}" {{$k}}
|
|
class="form-control form-control-sm border-0" data-name="{{$k}}" {{$k}}
|
|
@@ -217,6 +229,15 @@ $copyTriggerAdded = [];
|
|
parentSegment.find('[bmi-date]').val(parentSegment.find('[weight-date]').val());
|
|
parentSegment.find('[bmi-date]').val(parentSegment.find('[weight-date]').val());
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+ parentSegment.find('[heightFeetInput], [heightInchesInput]').off('change input paste');
|
|
|
|
+ parentSegment.find('[heightFeetInput], [heightInchesInput]').on('change input paste', function () {
|
|
|
|
+ let inches = 0;
|
|
|
|
+ let ft = +(parentSegment.find('[heightFeetInput]').val()),
|
|
|
|
+ inc = +(parentSegment.find('[heightInchesInput]').val());
|
|
|
|
+ inches = Math.round(ft * 12 + inc);
|
|
|
|
+ parentSegment.find('[data-name="heightInInches"]').val(inches);
|
|
|
|
+ });
|
|
|
|
+
|
|
parentSegment.find('.vitals-copy-trigger').off('click.copy-vital');
|
|
parentSegment.find('.vitals-copy-trigger').off('click.copy-vital');
|
|
parentSegment.find('.vitals-copy-trigger').on('click.copy-vital', function () {
|
|
parentSegment.find('.vitals-copy-trigger').on('click.copy-vital', function () {
|
|
let td = $(this).closest('td'), value = $.trim(td.text());
|
|
let td = $(this).closest('td'), value = $.trim(td.text());
|