diff --git a/common/models/Vacancy.php b/common/models/Vacancy.php index 1a30cfc..e55e036 100644 --- a/common/models/Vacancy.php +++ b/common/models/Vacancy.php @@ -29,6 +29,8 @@ class Vacancy extends \yii\db\ActiveRecord { + const STATUS_ACTIVE = 1; + const STATUS_CLOSED = 3; /** * @inheritdoc */ @@ -82,10 +84,15 @@ 'safe', ], [ - ['salary_currency'], + ['salary_currency', 'status',], 'integer' ], [ + ['salary'], + 'integer', + 'min' => 0, + ], + [ [ 'employmentInput', 'specializationInput' ], 'default', 'value' => [], @@ -96,6 +103,11 @@ 'value' => 0, ], [ + [ 'status' ], + 'default', + 'value' => 1, + ], + [ [ 'name', 'link', diff --git a/common/models/VacancySearch.php b/common/models/VacancySearch.php index f8ce735..c14ecb5 100644 --- a/common/models/VacancySearch.php +++ b/common/models/VacancySearch.php @@ -112,16 +112,11 @@ $query->andFilterWhere([ 'like', - 'name', - $this->name, + 'LOWER(name)', + mb_strtolower($this->name), ]) ->andFilterWhere([ 'like', - 'link', - $this->link, - ]) - ->andFilterWhere([ - 'like', 'user_name', $this->user_name, ]) diff --git a/common/widgets/views/requirements_field.php b/common/widgets/views/requirements_field.php index 3564587..2e90c19 100644 --- a/common/widgets/views/requirements_field.php +++ b/common/widgets/views/requirements_field.php @@ -26,7 +26,7 @@ -
Добавить поле
+Добавить еще
\ No newline at end of file diff --git a/frontend/views/company/_company_list_view.php b/frontend/views/company/_company_list_view.php index b47563f..5d9d807 100644 --- a/frontend/views/company/_company_list_view.php +++ b/frontend/views/company/_company_list_view.php @@ -1,16 +1,21 @@