We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4ce30be commit 003a5e8Copy full SHA for 003a5e8
1 file changed
library/Notifications/Widget/Detail/IncidentDetail.php
@@ -15,6 +15,7 @@
15
use ipl\Html\HtmlElement;
16
use ipl\Html\Table;
17
use ipl\Html\Text;
18
+use ipl\Stdlib\Filter;
19
20
class IncidentDetail extends BaseHtmlElement
21
{
@@ -36,7 +37,12 @@ public function __construct(Incident $incident)
36
37
protected function createContacts()
38
39
$contacts = [];
- foreach ($this->incident->incident_contact->with('contact')->orderBy('role', SORT_DESC) as $incident_contact) {
40
+ $query = $this->incident->incident_contact
41
+ ->with('contact')
42
+ ->filter(Filter::equal('contact.deleted', 'n'))
43
+ ->orderBy('role', SORT_DESC);
44
+
45
+ foreach ($query as $incident_contact) {
46
$contact = $incident_contact->contact;
47
$contact->role = $incident_contact->role;
48
0 commit comments