]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
Добавлена проверка на нул bug_smirnov_2024_07_09_check_if_null origin/bug_smirnov_2024_07_09_check_if_null
authorAlexander Smirnov <fredeom@mail.ru>
Tue, 9 Jul 2024 09:54:58 +0000 (12:54 +0300)
committerAlexander Smirnov <fredeom@mail.ru>
Tue, 9 Jul 2024 09:54:58 +0000 (12:54 +0300)
erp24/views/timetable/tabel_edit.php

index a4f49affe0f449400f75e3eaf2a04b1be651c558..2d09465a219c5adde88f83b5ee7cbf44f76b91a0 100755 (executable)
@@ -168,7 +168,7 @@ if (Timetable::getAllowEditShift($slot->date, $numDay)) {
             'label' => 'Отметка о начале',
             'format' => 'raw',
             'value' => function ($model) {
-                if (!empty($model->checkin_start_id)) {
+                if ($model->checkinStart) {
                     return !empty($photo = $model->checkinStart->photo) ? Html::img("/$photo", ['alt' => 'selfie', 'style' => 'min-width: 200px']) : null;
                 };
                 return '';
@@ -178,7 +178,7 @@ if (Timetable::getAllowEditShift($slot->date, $numDay)) {
             'label' => 'Отметка о конце',
             'format' => 'raw',
             'value' => function ($model) {
-                if (!empty($model->checkin_end_id)) {
+                if ($model->checkinEnd) {
                     return !empty($photo = $model->checkinEnd->photo) ? Html::img("/$photo", ['alt' => 'selfie', 'style' => 'min-width: 200px']) : null;
                 };
                 return '';