浏览代码

Notes list - dont show core note

Vijayakrishnan 3 年之前
父节点
当前提交
97ed4cd628
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      app/Models/Client.php

+ 3 - 0
app/Models/Client.php

@@ -93,6 +93,7 @@ class Client extends Model
     public function notes()
     {
         return $this->hasMany(Note::class, 'client_id', 'id')
+            ->where('id', '<>', $this->core_note_id)
             ->orderBy('effective_dateest', 'desc');
     }
 
@@ -129,6 +130,7 @@ class Client extends Model
     {
         return $this->hasMany(Note::class, 'client_id', 'id')
             ->where('is_cancelled', false)
+            ->where('id', '<>', $this->core_note_id)
             ->orderBy('effective_dateest', 'desc');
     }
 
@@ -136,6 +138,7 @@ class Client extends Model
     {
         return $this->hasMany(Note::class, 'client_id', 'id')
             ->where('is_cancelled', true)
+            ->where('id', '<>', $this->core_note_id)
             ->orderBy('effective_dateest', 'desc');
     }