changes in task_user, replaced user_id to card_id
This commit is contained in:
@ -119,6 +119,12 @@ class ProjectUser extends \yii\db\ActiveRecord
|
||||
self::find()->joinWith(['tasksByProject', 'user'])->where(['task.id' => $task_id])->all(), 'id', 'user.username');
|
||||
}
|
||||
|
||||
public static function userCardByTaskArr($task_id): array
|
||||
{
|
||||
return ArrayHelper::map(
|
||||
self::find()->joinWith(['tasksByProject', 'card'])->where(['task.id' => $task_id])->all(), 'id', 'card.fio');
|
||||
}
|
||||
|
||||
public static function setUsersByCardId()
|
||||
{
|
||||
$projectUserModels = self::findAll(['user_id' => null]);
|
||||
|
@ -3,6 +3,7 @@
|
||||
namespace common\models;
|
||||
|
||||
use Yii;
|
||||
use yii\base\InvalidConfigException;
|
||||
use yii\db\ActiveQuery;
|
||||
|
||||
/**
|
||||
@ -65,6 +66,4 @@ class TaskUser extends \yii\db\ActiveRecord
|
||||
{
|
||||
return $this->hasOne(Task::className(), ['id' => 'task_id']);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user