use Yii;
use yii\base\Action;
use yii\base\DynamicModel;
+use yii\db\Expression;
use yii\helpers\ArrayHelper;
use yii_app\records\Admin;
use yii_app\records\AdminChats;
$admins = $adminsQuery->with(['position', 'adminGroup', 'store'])->andWhere(['>=', 'group_id', empty($searchModel->name) ? 0 : -1])->all();
- $adminGroups = ArrayHelper::map(\yii_app\records\AdminGroup::find()->all(), 'id', 'name');
- $adminGroups[0] = 'Не выбрано';
+ $adminGroups = [0 => 'Не выбрано'] + ArrayHelper::map(\yii_app\records\AdminGroup::find()->all(), 'id', 'name');
- $stores = ArrayHelper::map(\yii_app\records\CityStore::find()->all(), 'id', 'name');
- $stores[0] = 'Не выбрано';
+ $stores = [0 => 'Не выбрано'] + ArrayHelper::map(\yii_app\records\CityStore::find()->all(), 'id', 'name');
$adminChats = ArrayHelper::map(AdminChats::find()->select(['admin_id'])->where(['state' => 2])->all(), 'admin_id', 'admin_id');
'language' => 'ru',
'options' => ['placeholder' => 'Должность...'],
'pluginOptions' => [
- 'allowClear' => true
+ 'allowClear' => false
],
'pluginEvents' => [
'change' => 'function(e) {
'language' => 'ru',
'options' => ['placeholder' => 'Магазины...'],
'pluginOptions' => [
- 'allowClear' => true
+ 'allowClear' => false
],
'pluginEvents' => [
'change' => 'function(e) {