Peter Muturi 2 лет назад
Родитель
Сommit
efb8a719b6

+ 2 - 2
resources/views/app/patient/modules/sleep_health_intake/edit.blade.php

@@ -112,6 +112,7 @@ if ($point->lastChildReview && $point->lastChildReview->data) {
 						refreshSegment('omega_subjective_system');
 						refreshSegment('omega_assessment_system');
 						refreshSegment('omega_plan_system');
+						refreshSegment('omega_cc');
 					},
 					onInputChange: function(evt) {
 						var self = this;
@@ -190,6 +191,7 @@ if ($point->lastChildReview && $point->lastChildReview->data) {
 						var quill = new Quill('#omegaCCEditor', options);
 						quill.on('text-change', function(delta, oldDelta, source) {
 							var html = quill.root.innerHTML;
+							html = html.replace("<p><br></p>", "");
 							// auto-save omega_cc
 							var quillTarget = $('#omegaCCEditor');
 							var segmentUid = quillTarget.data('segment-uid');
@@ -197,7 +199,6 @@ if ($point->lastChildReview && $point->lastChildReview->data) {
 							var noteUid = quillTarget.data('note-uid');
 							var uid = quillTarget.data('uid');
 							var data = {free_text:html};
-							console.log(data);
 							var formData = {
 								// uid: uid,
 								segmentUid: segmentUid,
@@ -206,7 +207,6 @@ if ($point->lastChildReview && $point->lastChildReview->data) {
 							};
 							var url = '/api/visitPoint/upsertNoteSingleton';
 							$.post(url, formData, function(response) {}, 'json');
-							refreshSegment('omega_cc');
 						});
 					},
 				},

+ 2 - 2
resources/views/app/patient/modules/sleep_health_intake/partials/cc.blade.php

@@ -7,9 +7,9 @@ $ccSegmentPoint = Point::getOrCreateOnlyTopLevelPointOfCategory($note, 'CHIEF_CO
 ?>
 <div id="" class="row">
     <div class="col-md-12">
-    <div class="bg-light p-2 border mb-3">
+    <div class="p-2 border mb-3">
         <h6 class="font-weight-bold">Chief Complaint:</h6>
         <div id="omegaCCEditor" data-uid="{{ $ccSegmentPoint->uid }}" data-note-uid="{{ $note->uid }}" data-segment-uid="{{ $ccSegment->uid }}" data-segment-category="CHIEF_COMPLAINT"><?= $ccSegment->summary_html ?></div>
     </div>
     </div>
-</div>
+</div>