瀏覽代碼

Temlates: include template-set (and exam) in output

Vijayakrishnan Krishnan 4 年之前
父節點
當前提交
a444786275
共有 1 個文件被更改,包括 11 次插入1 次删除
  1. 11 1
      resources/views/app/patient/note/dashboard.blade.php

+ 11 - 1
resources/views/app/patient/note/dashboard.blade.php

@@ -721,7 +721,7 @@
                             }
                         }
                     }
-                    value = value.replace('{children}', combined);
+                    value = value.replace('{children}', ' ' + combined);
                 }
                 return value;
             }
@@ -730,6 +730,16 @@
                 let container = $('.note-template-container:visible').first();
                 if(!container.length) return '';
                 let lines = [];
+                if(container.find('.note-template-set-chooser').length) {
+                    lines.push('<b>' + container.find('.note-template-set-chooser').first().find('option:selected').text() + '</b>');
+                }
+                else if(container.find('.note-exam-template-set-chooser').length && container.find('.note-exam-exam-chooser').length) {
+                    lines.push('<b>' +
+                        container.find('.note-exam-template-set-chooser').first().find('option:selected').text() +
+                        ': ' +
+                        container.find('.note-exam-exam-chooser').first().find('option:selected').text() +
+                        '</b>');
+                }
                 container.find('>.note-template-item.selected').each(function() {
                     lines.push('<p class="note-template-output-line">' + generateOutputForNode($(this)) + '</p>');
                 });