guild/backend/modules/employee/views/manager-employee/index.php

39 lines
1.1 KiB
PHP
Raw Normal View History

2021-11-16 13:14:28 +03:00
<?php
use backend\modules\card\models\UserCard;
use common\models\ManagerEmployee;
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\ManagerEmployeeSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Сотрудники';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="manager-employee-index">
<p>
<?= Html::a('Назначить менеджеру работника', ['create'], ['class' => 'btn btn-success']) ?>
</p>
<?= GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
[
'attribute' => 'manager_id',
2023-05-04 15:10:56 +03:00
'value' => 'manager.user.userCard.fio',
2021-11-16 13:14:28 +03:00
],
[
2023-05-04 15:10:56 +03:00
'attribute' => 'employee_id',
'value' => 'employee.email',
2021-11-16 13:14:28 +03:00
],
['class' => 'yii\grid\ActionColumn'],
],
]); ?>
</div>