project column

This commit is contained in:
2023-04-20 02:07:19 +03:00
parent edea2cc3e7
commit 2482ae89f6
24 changed files with 737 additions and 18 deletions

View File

@ -21,6 +21,17 @@ use mihaildev\elfinder\InputFile;
<?= $form->field($model, 'budget')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'owner_id')->widget(
Select2::class,
[
'data' => \common\models\UserCard::getListUserWithUserId(),
'options' => ['placeholder' => '...', 'class' => 'form-control'],
'pluginOptions' => [
'allowClear' => true
],
]
); ?>
<?= $form->field($model, 'company_id')->widget(Select2::class,
[
'data' => \yii\helpers\ArrayHelper::map(\common\models\Company::find()->all(),'id', 'name'),

View File

@ -41,6 +41,21 @@ $this->params['breadcrumbs'][] = $this->title;
]),
],
'budget',
[
'attribute' => 'owner_id',
'value' => function (\common\models\Project $model) {
return $model->owner->userCard->fio ?? 'Не задано';
},
'filter' => kartik\select2\Select2::widget([
'model' => $searchModel,
'attribute' => 'owner_id',
'data' => \common\models\UserCard::getListUserWithUserId(),
'options' => ['placeholder' => 'Начните вводить...','class' => 'form-control'],
'pluginOptions' => [
'allowClear' => true
],
]),
],
//'description:ntext',
[
'label' => 'Исполнители',

View File

@ -34,6 +34,12 @@ $this->params['breadcrumbs'][] = $this->title;
'label' => 'Сраница на hh.ru',
'attribute' => 'hh.url'
],
[
'attribute' => 'owner_id',
'value' => function (\common\models\Project $model) {
return $model->owner->userCard->fio ?? 'Не задано ФИО';
}
],
'description:ntext',
'status',
'created_at',