diff --git a/backend/modules/balance/models/BalanceSearch.php b/backend/modules/balance/models/BalanceSearch.php
index 6a93ca1..0e83d7f 100644
--- a/backend/modules/balance/models/BalanceSearch.php
+++ b/backend/modules/balance/models/BalanceSearch.php
@@ -54,7 +54,8 @@ class BalanceSearch extends Balance
*/
public function search($params)
{
- $query = Balance::find();
+ $query = Balance::find()->distinct();
+
$query->leftJoin('fields_value_new','fields_value_new.item_id=balance.id AND fields_value_new.item_type=3');
// add conditions that should always apply here
$dataProvider = new ActiveDataProvider([
diff --git a/backend/modules/card/models/UserCardSearch.php b/backend/modules/card/models/UserCardSearch.php
index f51a1c0..cfe1241 100755
--- a/backend/modules/card/models/UserCardSearch.php
+++ b/backend/modules/card/models/UserCardSearch.php
@@ -82,6 +82,8 @@ class UserCardSearch extends UserCard
$query->andFilterWhere(['skill.id' => $this->skills]);
+ $query->orderBy('user_card.created_at DESC');
+
return $dataProvider;
}
}
diff --git a/backend/modules/card/views/user-card/update.php b/backend/modules/card/views/user-card/update.php
index 917119b..6d547a2 100755
--- a/backend/modules/card/views/user-card/update.php
+++ b/backend/modules/card/views/user-card/update.php
@@ -5,15 +5,13 @@ use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model backend\modules\card\models\UserCard */
-$this->title = 'Update User Card: ' . $model->id;
+$this->title = $model->fio;
$this->params['breadcrumbs'][] = ['label' => 'User Cards', 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->id, 'url' => ['view', 'id' => $model->id]];
$this->params['breadcrumbs'][] = 'Update';
?>
-
= Html::encode($this->title) ?>
-
= $this->render('_form', [
'model' => $model,
]) ?>
diff --git a/backend/modules/company/models/CompanySearch.php b/backend/modules/company/models/CompanySearch.php
index e7ef47e..51eac9d 100755
--- a/backend/modules/company/models/CompanySearch.php
+++ b/backend/modules/company/models/CompanySearch.php
@@ -13,6 +13,7 @@ use backend\modules\company\models\Company;
*/
class CompanySearch extends Company
{
+// public $status;
/**
* {@inheritdoc}
*/
@@ -43,7 +44,6 @@ class CompanySearch extends Company
public function search($params)
{
$query = Company::find()->joinWith('project');
-
// add conditions that should always apply here
$dataProvider = new ActiveDataProvider([
@@ -69,6 +69,7 @@ class CompanySearch extends Company
$query->andFilterWhere(['like', 'name', $this->name])
->andFilterWhere(['like', 'description', $this->description]);
+ $query->orderBy('created_at DESC');
return $dataProvider;
}
diff --git a/backend/modules/company/views/company/index.php b/backend/modules/company/views/company/index.php
index d667e7b..527afd1 100755
--- a/backend/modules/company/views/company/index.php
+++ b/backend/modules/company/views/company/index.php
@@ -42,13 +42,13 @@ $this->params['breadcrumbs'][] = $this->title;
//'description:ntext',
//'status_id',
[
- 'attribute' => 'status',
+ 'attribute' => 'status_id',
'value' => function($model){
- return isset($model->status0->name) ? $model->status0->name : 'Не задано';
+ return isset($model->status->name) ? $model->status->name : 'Не задано';
},
'filter' => kartik\select2\Select2::widget([
'model' => $searchModel,
- 'attribute' => 'status',
+ 'attribute' => 'status_id',
'data' => \common\models\Status::getStatusesArray(\common\models\UseStatus::USE_COMPANY),
'options' => ['placeholder' => 'Начните вводить...','class' => 'form-control'],
'pluginOptions' => [
diff --git a/backend/modules/hh/models/HhJobSearch.php b/backend/modules/hh/models/HhJobSearch.php
index 5b5fb40..37b2e81 100755
--- a/backend/modules/hh/models/HhJobSearch.php
+++ b/backend/modules/hh/models/HhJobSearch.php
@@ -71,6 +71,7 @@ class HhJobSearch extends HhJob
->andFilterWhere(['like', 'url', $this->url])
->andFilterWhere(['like', 'salary_currency', $this->salary_currency])
->andFilterWhere(['like', 'address', $this->address]);
+ $query->orderBy('dt_add DESC');
return $dataProvider;
}
diff --git a/backend/modules/hh/models/HhSearch.php b/backend/modules/hh/models/HhSearch.php
index cac4970..abc098d 100755
--- a/backend/modules/hh/models/HhSearch.php
+++ b/backend/modules/hh/models/HhSearch.php
@@ -67,6 +67,7 @@ class HhSearch extends Hh
$query->andFilterWhere(['like', 'url', $this->url])
->andFilterWhere(['like', 'title', $this->title])
->andFilterWhere(['like', 'photo', $this->photo]);
+ $query->orderBy('dt_add DESC');
return $dataProvider;
}
diff --git a/backend/modules/project/models/ProjectSearch.php b/backend/modules/project/models/ProjectSearch.php
index 65d9c3a..d06dacc 100755
--- a/backend/modules/project/models/ProjectSearch.php
+++ b/backend/modules/project/models/ProjectSearch.php
@@ -67,6 +67,7 @@ class ProjectSearch extends Project
$query->andFilterWhere(['like', 'name', $this->name])
->andFilterWhere(['like', 'description', $this->description]);
+ $query->orderBy('created_at DESC');
return $dataProvider;
}
diff --git a/backend/modules/settings/models/AdditionalFieldsSearch.php b/backend/modules/settings/models/AdditionalFieldsSearch.php
index 7a08973..15efbc5 100755
--- a/backend/modules/settings/models/AdditionalFieldsSearch.php
+++ b/backend/modules/settings/models/AdditionalFieldsSearch.php
@@ -63,7 +63,7 @@ class AdditionalFieldsSearch extends AdditionalFields
]);
$query->andFilterWhere(['like', 'name', $this->name]);
-// Debug::dd($query->createCommand()->rawSql);
+
return $dataProvider;
}
}