2021-11-16 13:14:28 +03:00
|
|
|
<?php
|
|
|
|
|
2021-12-23 11:28:27 +03:00
|
|
|
use backend\modules\card\models\UserCard;
|
2021-11-16 13:14:28 +03:00
|
|
|
use common\models\User;
|
|
|
|
use yii\helpers\Html;
|
|
|
|
use yii\grid\GridView;
|
|
|
|
|
|
|
|
/* @var $this yii\web\View */
|
|
|
|
/* @var $searchModel backend\modules\employee\models\ManagerSearch */
|
|
|
|
/* @var $dataProvider yii\data\ActiveDataProvider */
|
|
|
|
|
|
|
|
$this->title = 'Менеджеры';
|
|
|
|
$this->params['breadcrumbs'][] = $this->title;
|
|
|
|
?>
|
|
|
|
<div class="manager-index">
|
|
|
|
|
|
|
|
<p>
|
|
|
|
<?= Html::a('Назначить менеджера', ['create'], ['class' => 'btn btn-success']) ?>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<?= GridView::widget([
|
|
|
|
'dataProvider' => $dataProvider,
|
|
|
|
'filterModel' => $searchModel,
|
|
|
|
'columns' => [
|
|
|
|
['class' => 'yii\grid\SerialColumn'],
|
|
|
|
[
|
2021-12-23 11:28:27 +03:00
|
|
|
'attribute' => 'user_card_id',
|
|
|
|
'filter' => UserCard::find()->select(['fio', 'id'])->indexBy('id')->column(),
|
|
|
|
'value' => 'userCard.fio',
|
2021-11-16 13:14:28 +03:00
|
|
|
],
|
|
|
|
|
|
|
|
['class' => 'yii\grid\ActionColumn'],
|
|
|
|
],
|
|
|
|
]); ?>
|
|
|
|
</div>
|