From: Aleksey Filippov Date: Thu, 4 Jul 2024 14:30:48 +0000 (+0300) Subject: Перевод личного кабинета на новый факт смены fix X-Git-Tag: 1.3~19^2 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=refs%2Fheads%2Ffeature_filippov_erp-64_fix;p=erp24_rep%2Fyii-erp24%2F.git Перевод личного кабинета на новый факт смены fix --- diff --git a/erp24/services/CabinetService.php b/erp24/services/CabinetService.php index 7b368cff..5e87cd90 100755 --- a/erp24/services/CabinetService.php +++ b/erp24/services/CabinetService.php @@ -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);