add task, fixed executors in all projects
This commit is contained in:
@ -2,6 +2,8 @@
|
||||
|
||||
namespace backend\modules\task\controllers;
|
||||
|
||||
use backend\modules\project\models\ProjectUser;
|
||||
use yii\web\Response;
|
||||
use Yii;
|
||||
use backend\modules\task\models\Task;
|
||||
use backend\modules\task\models\TaskSearch;
|
||||
@ -124,4 +126,25 @@ class TaskController extends Controller
|
||||
|
||||
throw new NotFoundHttpException('The requested page does not exist.');
|
||||
}
|
||||
|
||||
public function actionCreator()
|
||||
{
|
||||
Yii::$app->response->format = Response::FORMAT_JSON;
|
||||
|
||||
if (isset($_POST['depdrop_parents'])) {
|
||||
$parents = $_POST['depdrop_parents'];
|
||||
if ($parents != null) {
|
||||
$project_id = $parents[0];
|
||||
$users = ProjectUser::usersByProjectArr($project_id);
|
||||
|
||||
$formattedUsersArr = array();
|
||||
foreach ($users as $key => $value){
|
||||
$formattedUsersArr[] = array('id' => $key, 'name' => $value);
|
||||
}
|
||||
|
||||
return ['output'=>$formattedUsersArr, 'selected'=>''];
|
||||
}
|
||||
}
|
||||
return ['output'=>'', 'selected'=>''];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user