1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Additional task filters

This commit is contained in:
David Bomba 2024-04-12 08:42:44 +10:00
parent 865c9f18c4
commit e35d12d0b9

View File

@ -156,10 +156,17 @@ class TaskFilters extends QueryFilters
return $this->builder;
}
return $this->builder->where(function ($query) use ($user) {
$query->where('user_id', $this->decodePrimaryKey($user))
->orWhere('assigned_user_id', $this->decodePrimaryKey($user));
});
return $this->builder->where('user_id', $this->decodePrimaryKey($user));
}
public function assigned_user(string $user = ''): Builder
{
if (strlen($user) == 0) {
return $this->builder;
}
return $this->builder->where('assigned_user_id', $this->decodePrimaryKey($user));
}