소스 검색

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');
     }