|
@@ -1,8 +1,45 @@
|
|
|
<div class="segments-list" id="note-segments-list">
|
|
|
+
|
|
|
+ <?php
|
|
|
+ $previousHeading = null;
|
|
|
+ $previousSubHeading = null;
|
|
|
+ ?>
|
|
|
@foreach($note->segments as $segment)
|
|
|
+ <?php
|
|
|
+// if ($segment->subheading !== $previousSubHeading) {
|
|
|
+// if (!empty($previousSubHeading)) {
|
|
|
+// echo '</div></div>'; // <!-- end the previous parent section -->
|
|
|
+// }
|
|
|
+// if (!empty($segment->subheading)) {
|
|
|
+// echo '<div class="note-content-node note-content-heading">' .
|
|
|
+// '<a class="c-pointer">' . $segment->subheading . '</a>' .
|
|
|
+// '<div class="note-content-children">'; // <!-- open new node -->
|
|
|
+// }
|
|
|
+// $previousSubHeading = $segment->subheading;
|
|
|
+// }
|
|
|
+ if ($segment->heading !== $previousHeading) {
|
|
|
+ if (!empty($previousHeading)) {
|
|
|
+ echo '</div></div>'; // <!-- end the previous parent section -->
|
|
|
+ }
|
|
|
+ if (!empty($segment->heading)) {
|
|
|
+ echo '<div class="note-content-node note-content-heading">' .
|
|
|
+ '<div class="py-2 px-3 border-top border-bottom font-size-14 font-weight-bold text-secondary bg-light mt-4">' . $segment->heading . '</div>' .
|
|
|
+ '<div class="note-content-children ml-4 border-left">'; // <!-- open new node -->
|
|
|
+ }
|
|
|
+ $previousHeading = $segment->heading;
|
|
|
+ }
|
|
|
+ ?>
|
|
|
<div class="{{$segment->segmentTemplate->internal_name === 'medrisk_vigilence' ? 'd-none' : ''}}">
|
|
|
@include('app.patient.note.segment')
|
|
|
</div>
|
|
|
@endforeach
|
|
|
+ <?php
|
|
|
+// if (!empty($previousSubHeading)) {
|
|
|
+// echo '</div></div>'; // <!-- close any open parent section -->
|
|
|
+// }
|
|
|
+ if (!empty($previousHeading)) {
|
|
|
+ echo '</div></div>'; // <!-- close any open parent section -->
|
|
|
+ }
|
|
|
+ ?>
|
|
|
</div>
|
|
|
@include('app.patient.note.segment_script')
|