diff --git a/backend/modules/reports/models/Month.php b/backend/modules/reports/models/Month.php index e52cf44..f5512c6 100644 --- a/backend/modules/reports/models/Month.php +++ b/backend/modules/reports/models/Month.php @@ -16,16 +16,13 @@ class Month public function __construct($date = null) { -// $date = '2021-08-10'; $this->inactive_begin = []; $this->inactive_end = []; -// Debug::prn($date); if (!$date and !self::is_date($date)) { $date = date('Y-m-d'); Debug::dd($date); } -// Debug::dd($date); $first_day_of_week = self::get_day_week(self::get_first_day($date)); $quantity_days = self::get_days_month($date); @@ -47,7 +44,6 @@ class Month for ($index = $first_day_of_week - 1; $index >= 1; $index--, $day--) { $this->inactive_begin[$index] = $day; } -// Debug::dd($first_day_of_week); $day = 1; $index_end = (in_array($first_day_of_week, [6,7])?42:35); for ($index = $quantity_days + $first_day_of_week; $index <=$index_end; $index++, $day++) { @@ -55,7 +51,6 @@ class Month } $this->days = array_merge($this->inactive_end, $this->inactive_begin, $this->active); -// Debug::dd($this); } @@ -91,11 +86,4 @@ class Month return date("t", strtotime($date)); } - - public function a() - { -// $a = date('w', strtotime(date(''))) - } - - } \ No newline at end of file diff --git a/backend/modules/reports/views/reports/index.php b/backend/modules/reports/views/reports/index.php index c2fcb72..8728f83 100644 --- a/backend/modules/reports/views/reports/index.php +++ b/backend/modules/reports/views/reports/index.php @@ -86,7 +86,7 @@ function next_day($date, $number) 'attribute' => 'ФИО', 'filter' => Html::activeTextInput($searchModel, 'fio', ['class' => 'form-control']), 'value' => function ($data) { - return '' . \common\models\Reports::getFio($data) . ''; + return '' . \common\models\Reports::getFio($data) . ''; }, ], diff --git a/backend/modules/reports/views/reports/user.php b/backend/modules/reports/views/reports/user.php index a1cf635..7e8e4eb 100644 --- a/backend/modules/reports/views/reports/user.php +++ b/backend/modules/reports/views/reports/user.php @@ -1,11 +1,7 @@ title = 'Календарь пользователя - ' . Reports::getFio($reports[0]); $dates_created_at = array_unique(array_map('get_dates_created_at', $reports)); - -//for ($date = '2021-08-01', $i = 0; $date != '2021-09-01'; $date = next_day($date, 1), $i++) { -// if ($i == 7) { -// echo '