fix
This commit is contained in:
parent
43299163f3
commit
071a5fbd84
@ -35,7 +35,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
'article',
|
||||
//'company_id',
|
||||
//'type',
|
||||
//'price',
|
||||
'price',
|
||||
//'status',
|
||||
|
||||
['class' => 'hail812\adminlte3\yii\grid\ActionColumn'],
|
||||
|
@ -65,6 +65,7 @@ class ProductCategoryController extends Controller
|
||||
return $this->render('index', [
|
||||
'searchModel' => $searchModel,
|
||||
'dataProvider' => $dataProvider,
|
||||
'companyService' => $this->companyService,
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -1,11 +1,13 @@
|
||||
<?php
|
||||
|
||||
use common\services\CompanyService;
|
||||
use yii\helpers\Html;
|
||||
use yii\grid\GridView;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $searchModel frontend\modules\product_category\models\ProductCategorySearch */
|
||||
/* @var $dataProvider yii\data\ActiveDataProvider */
|
||||
/* @var $companyService CompanyService */
|
||||
|
||||
$this->title = 'Категории товаров';
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
@ -33,8 +35,18 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
'id',
|
||||
'title',
|
||||
//'parent_id',
|
||||
'company_id',
|
||||
'status',
|
||||
[
|
||||
'attribute' => 'company_id',
|
||||
'value' => function($model) use ($companyService){
|
||||
return $companyService->getCompany($model->company_id)->name ?? null;
|
||||
}
|
||||
],
|
||||
[
|
||||
'attribute' => 'status',
|
||||
'value' => function($model){
|
||||
return \common\models\ProductCategory::getStatus()[$model->status];
|
||||
}
|
||||
],
|
||||
|
||||
['class' => 'hail812\adminlte3\yii\grid\ActionColumn'],
|
||||
],
|
||||
|
Loading…
Reference in New Issue
Block a user