浏览代码

Note loop updates

Vijayakrishnan 4 年之前
父节点
当前提交
70210143b7

+ 7 - 2
resources/views/app/patient/canvas-sections/sochx/form.blade.php

@@ -32,7 +32,7 @@ if(!$contentData) {
 
 $formID = rand(0, 100000);
 ?>
-<div id="{{$key}}_{{ $formID }}">
+<div id="sochx_{{ $formID }}">
     <input type="hidden" name="data" value="">
     <div class="row">
         @for ($i = 0; $i < count($fields); $i++)
@@ -154,11 +154,16 @@ $formID = rand(0, 100000);
                 mounted: function () {
                     $('#sochx_{{ $formID }} [moe][initialized]').removeAttr('initialized');
                     initMoes();
+                    $('#sochx_{{ $formID }}').find('[name="data"]').val(JSON.stringify({
+                        common: this.cleanObject(this.common),
+                        customFields: this.customFields,
+                        comments: this.comments,
+                    }));
                 },
                 watch: {
                     $data: {
                         handler: function(val, oldVal) {
-                            $(this.$el).closest('form').find('[name="canvasData"]').val(JSON.stringify({
+                            $('#sochx_{{ $formID }}').find('[name="data"]').val(JSON.stringify({
                                 common: this.cleanObject(this.common),
                                 customFields: this.customFields,
                                 comments: this.comments,

+ 2 - 1
resources/views/app/patient/note/note-section-list.blade.php

@@ -19,6 +19,7 @@
                 <a class="font-weight-bold mb-2 d-flex align-items-center c-pointer">
                     {{$section->sectionTemplate->title}}
                     <span class="d-none if-not-edit"><i class="fa fa-edit ml-2"></i></span>
+                    <span class="d-none if-edit edit-trigger"><i class="fa fa-times ml-2"></i></span>
                     <span class="edit-trigger"></span>
                 </a>
             @else
@@ -70,7 +71,7 @@
                     }
                 }
             ?>
-                @include("app.patient.canvas-sections.{$key}.form")
+                @include("app.patient.canvas-sections.{$sectionInternalName}.form")
             <?php
             }