浏览代码

Fixed score reset

Samson Mutunga 2 年之前
父节点
当前提交
6d72e2a440
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      resources/views/app/patient/modules/sleep_health_intake/edit.blade.php

+ 3 - 1
resources/views/app/patient/modules/sleep_health_intake/edit.blade.php

@@ -168,7 +168,9 @@ if ($point->lastChildReview && $point->lastChildReview->data) {
 						var self = this;
 						var fields = self.form.find('[score-input]');
 						$.each(fields, function(i, field) {
-							$(field).val(0)
+							var name = $(field).data('name');
+							self.data[name] = null;
+							$(field).val(null);
 						});
 						self.data.score = 0;
 						$('#scoreValue').text(self.data.score);