mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
no message
This commit is contained in:
1 parent
468422fe7e
commit
6d6dbaef1c
1 file changed
+2
-2
@@ -36,8 +36,8 @@ class MasterTaskController extends Controller
|
|||||||
case 'team_id':
|
case 'team_id':
|
||||||
// ak je zadany team, tak najdem vsetkych userov, ktori su v tomto teame. potom najdem vsetky subtasky, ktore su priradene ludom v tomto teame. nevyhladavam na zaklade team_id v master_taskoch, pretoze toto je nepresne. Jandl chce vidiet tasky aj pre jednotlivcov v danom teame aj ked ten task nebol assignuty pod tymto teamom
|
// ak je zadany team, tak najdem vsetkych userov, ktori su v tomto teame. potom najdem vsetky subtasky, ktore su priradene ludom v tomto teame. nevyhladavam na zaklade team_id v master_taskoch, pretoze toto je nepresne. Jandl chce vidiet tasky aj pre jednotlivcov v danom teame aj ked ten task nebol assignuty pod tymto teamom
|
||||||
|
|
||||||
$userIdArray = User::whereHas('teams', function ($query) use ($parameters) {
|
$userIdArray = User::whereHas('teams', function ($query) use ($value) {
|
||||||
$query->where('team_id', $parameters['team_id']);
|
$query->where('team_id', $value);
|
||||||
})->get()->pluck('id')->toArray();
|
})->get()->pluck('id')->toArray();
|
||||||
|
|
||||||
$mastertasks->whereIn('user_id', $userIdArray);
|
$mastertasks->whereIn('user_id', $userIdArray);
|
||||||
|
|||||||
Reference in new issue
Block a user