Преглед на файлове

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