浏览代码

Roll-back delete entry

Vijayakrishnan 4 年之前
父节点
当前提交
7ef25e1ebc
共有 1 个文件被更改,包括 13 次插入12 次删除
  1. 13 12
      resources/views/app/patient/canvas-sections/rx/form.blade.php

+ 13 - 12
resources/views/app/patient/canvas-sections/rx/form.blade.php

@@ -273,18 +273,19 @@ $formID = rand(0, 100000);
                         });
                     },
                     removeItem: function(_index) {
-                        let item = this.items[_index];
-                        if(item.type === 'prescribed today') {
-                            this.items.splice(_index, 1);
-                        }
-                        else if(item.type === 'existing') {
-                            if(!(item.notes[item.notes.length - 1].text)) {
-                                alert('Please provide reason for removal/discontinuing.');
-                                return false;
-                            }
-                            item.type = 'removed';
-                            item.removed_note_uid = '{{@$note->uid}}';
-                        }
+                        this.items.splice(_index, 1);
+                        {{--let item = this.items[_index];--}}
+                        {{--if(item.type === 'prescribed today') {--}}
+                        {{--    this.items.splice(_index, 1);--}}
+                        {{--}--}}
+                        {{--else if(item.type === 'existing') {--}}
+                        {{--    if(!(item.notes[item.notes.length - 1].text)) {--}}
+                        {{--        alert('Please provide reason for removal/discontinuing.');--}}
+                        {{--        return false;--}}
+                        {{--    }--}}
+                        {{--    item.type = 'removed';--}}
+                        {{--    item.removed_note_uid = '{{@$note->uid}}';--}}
+                        {{--}--}}
                     },
                     cleanArray: function(_source) {
                         let plItems = [], plObject = {};