|
@@ -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 = {};
|