add project statistic to api

This commit is contained in:
iIronside
2023-11-21 11:23:38 +03:00
parent 91607cc99b
commit 75329a8835
24 changed files with 929 additions and 25 deletions

View File

@ -2,6 +2,7 @@
use backend\modules\card\models\UserCard;
use backend\modules\project\models\Project;
use backend\modules\project\models\ProjectRole;
use common\models\User;
use kartik\select2\Select2;
use yii\helpers\Html;
@ -79,6 +80,23 @@ $this->params['breadcrumbs'][] = $this->title;
],
])
],
[
'attribute' => 'project_role_id',
'value' => 'projectRole.title',
'filter' => Select2::widget([
'model' => $searchModel,
'attribute' => 'project_role_id',
'data' => ProjectRole::find()->select(['title', 'id'])->indexBy('id')->column(),
'pluginOptions' => [
'allowClear' => true,
'width' => '250px',
],
'options' => [
'class' => 'form-control',
'placeholder' => 'Выберите значение'
],
])
],
['class' => 'yii\grid\ActionColumn'],
],