]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
[ERP-135] Спрятать магазины с visible=0
authorAlexander Smirnov <fredeom@mail.ru>
Wed, 7 Aug 2024 11:19:10 +0000 (14:19 +0300)
committerAlexander Smirnov <fredeom@mail.ru>
Wed, 7 Aug 2024 11:19:10 +0000 (14:19 +0300)
erp24/actions/motivation/IndexAction.php

index f745fa062253454a944aac23ccc3b4ceb772d390..f738eac625ce5040b7bf6db65449aa499aae6f4b 100644 (file)
@@ -54,7 +54,7 @@ class IndexAction extends Action
         $motivations = Motivation::find()->all();
         $possibleStoreIds = ArrayHelper::getColumn($motivations, 'store_id');
 
-        $stores = ArrayHelper::map(CityStore::find()->all(), 'id', 'name');
+        $stores = ArrayHelper::map(CityStore::find()->where(['visible' => 1])->all(), 'id', 'name');
         $stores = array_filter($stores, function ($k, $v) use ($possibleStoreIds) {
             return in_array($v, $possibleStoreIds);
         }, ARRAY_FILTER_USE_BOTH);