Prechádzať zdrojové kódy

fixed past medical history and family history

Josh 4 rokov pred
rodič
commit
527ce4d05b

+ 1 - 1
resources/views/app/patient/canvas-sections/fhx/form.blade.php

@@ -242,7 +242,7 @@ $formID = rand(0, 100000);
                 watch: {
                     $data: {
                         handler: function(val, oldVal) {
-                            $(this.$el).closest('form').find('[name="canvasData"]').val(JSON.stringify({
+                            $(this.$el).closest('#fhxSection').find('[name="data"]').val(JSON.stringify({
                                 count: this.count,
                                 unknown: this.unknown,
                                 items: this.cleanArray(this.items)

+ 1 - 1
resources/views/app/patient/canvas-sections/pmhx/form.blade.php

@@ -189,7 +189,7 @@ $formID = rand(0, 100000);
                 watch: {
                     $data: {
                         handler: function(val, oldVal) {
-                            $(this.$el).closest('form').find('[name="canvasData"]').val(JSON.stringify({
+                            $(this.$el).closest('#pmhx_{{ $formID }}').find('[name="data"]').val(JSON.stringify({
                                 bloodType: this.bloodType,
                                 bloodRH: this.bloodRH,
                                 common: this.cleanObject(this.common),

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

@@ -179,9 +179,9 @@ if ($latestSectionTS === 0 || $latestSectionTS < $sectionTS) {
 
             var sectionUid = _section.attr('data-section-uid')
 
-            var _form = _section.find('form')[0];
-            console.log("Form found: ", _form);
+            var _form = _section.find('form[processed]')[0];
             if(_form){
+                console.log("Form found: ", _form);
                 console.log("Form found. submitting normally");
                 $.post("/process_form_submit", $(_form).serialize(), function(resp) {
                     handleSubmitResponse(resp,_section, summaryContainer)