|
@@ -99,7 +99,17 @@ $medications = $points;
|
|
|
var quill = new Quill(el, {
|
|
|
theme: 'snow',
|
|
|
modules: {
|
|
|
- toolbar: false
|
|
|
+ toolbar: false,
|
|
|
+ keyboard: {
|
|
|
+ bindings: {
|
|
|
+ 'tab': {
|
|
|
+ key: 9,
|
|
|
+ handler: function(range, context) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
quill.root.innerHTML = existingContent;
|
|
@@ -125,13 +135,16 @@ $medications = $points;
|
|
|
$('#medications-reconcile-{{$note->id}} .btn-save-reviews')
|
|
|
.off('click')
|
|
|
.on('click', function() {
|
|
|
- showMask();
|
|
|
let payload = {
|
|
|
noteUid: '{{$note->uid}}',
|
|
|
reviews: []
|
|
|
}
|
|
|
+
|
|
|
+ let hasAtLeastOneNonEmptyReview = false;
|
|
|
+
|
|
|
$('#medications-reconcile-{{$note->id}} [data-point-uid]').each(function () {
|
|
|
if($.trim($('<div/>').html($(this).find('.ql-editor').html()).text())) {
|
|
|
+ hasAtLeastOneNonEmptyReview = true;
|
|
|
payload.reviews.push({
|
|
|
parentPointUid: $(this).attr('data-point-uid'),
|
|
|
data: JSON.stringify({
|
|
@@ -142,6 +155,13 @@ $medications = $points;
|
|
|
}
|
|
|
});
|
|
|
|
|
|
+ if(!hasAtLeastOneNonEmptyReview) {
|
|
|
+ toastr.error('New subjective is empty on all medications!');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ showMask();
|
|
|
+
|
|
|
$.ajax({
|
|
|
url: '/api/visitPoint/upsertChildReviewMulti',
|
|
|
type:"POST",
|