Ver código fonte

Notes list - dont show core note

Vijayakrishnan 3 anos atrás
pai
commit
97ed4cd628
1 arquivos alterados com 3 adições e 0 exclusões
  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');
     }