]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
Перевод личного кабинета на новый факт смены fix feature_filippov_erp-64_fix origin/feature_filippov_erp-64_fix
authorAleksey Filippov <Aleksey.Filippov@erp-flowers.ru>
Thu, 4 Jul 2024 14:30:48 +0000 (17:30 +0300)
committerAleksey Filippov <Aleksey.Filippov@erp-flowers.ru>
Thu, 4 Jul 2024 14:30:48 +0000 (17:30 +0300)
erp24/services/CabinetService.php

index 7b368cffc77deb427005b631f62d2f702acd4443..5e87cd90d599e978395ae3dce8e2b8323fe81422 100755 (executable)
@@ -2305,13 +2305,19 @@ class CabinetService
 
         $storeAdminsNames = array_combine($storeAdminsIds, $storeAdminsNamesPrepared);
 
+        $timetableAnotherStore = [];
+        $adminIdsInShiftAnotherStore = [];
+        $adminNamesInShiftAnotherStore = [];
+        $storeIdsInShiftAnotherStore = [];
 
-        $adminAnotherStore = $this->setAdminStore($timetableAnotherStore);
+        if (!empty($timetableAnotherStore)) {
+            $adminAnotherStore = $this->setAdminStore($timetableAnotherStore);
 
-        $timetableAnotherStore = ArrayHelper::getValue($adminAnotherStore, 'timetable');
-        $adminIdsInShiftAnotherStore = ArrayHelper::getValue($adminAnotherStore, 'adminIdsInShift');
-        $adminNamesInShiftAnotherStore = ArrayHelper::getValue($adminAnotherStore, 'adminNamesInShift');
-        $storeIdsInShiftAnotherStore = ArrayHelper::getValue($adminAnotherStore, 'storeIdsInShift');
+            $timetableAnotherStore = ArrayHelper::getValue($adminAnotherStore, 'timetable');
+            $adminIdsInShiftAnotherStore = ArrayHelper::getValue($adminAnotherStore, 'adminIdsInShift');
+            $adminNamesInShiftAnotherStore = ArrayHelper::getValue($adminAnotherStore, 'adminNamesInShift');
+            $storeIdsInShiftAnotherStore = ArrayHelper::getValue($adminAnotherStore, 'storeIdsInShift');
+        }
 
         $storeIdsInShiftKeys = array_merge(array_keys($storeIdsInShift), array_keys($storeIdsInShiftAnotherStore));
         $storeIdsInShiftValues = array_merge($storeIdsInShift, $storeIdsInShiftAnotherStore);