From c719266a22b9421eb6996f5a383fa97a36a5f853 Mon Sep 17 00:00:00 2001 From: SoHardKI Date: Tue, 16 Jul 2019 12:25:00 +0300 Subject: [PATCH] fixes --- backend/modules/holiday/models/HolidaySearch.php | 1 + backend/views/layouts/left.php | 2 +- common/models/Holiday.php | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/modules/holiday/models/HolidaySearch.php b/backend/modules/holiday/models/HolidaySearch.php index 013aa21..e369ee6 100644 --- a/backend/modules/holiday/models/HolidaySearch.php +++ b/backend/modules/holiday/models/HolidaySearch.php @@ -53,6 +53,7 @@ class HolidaySearch extends Holiday $query->andFilterWhere(['between', 'dt_start', $dt_start, $dt_end ]) ->orFilterWhere(['between', 'dt_end', $dt_start, $dt_end ]); + $query->orderBy('id DESC'); return $dataProvider; } diff --git a/backend/views/layouts/left.php b/backend/views/layouts/left.php index c25abb1..5080b4f 100755 --- a/backend/views/layouts/left.php +++ b/backend/views/layouts/left.php @@ -42,7 +42,7 @@ ], ], ['label' => 'Баланс', 'icon' => 'dollar', 'url' => ['/balance/balance']], - ['label' => 'Отпуска', 'icon' => 'user-circle', 'url' => ['/holiday/holiday']], + ['label' => 'Отпуска', 'icon' => 'plane', 'url' => ['/holiday/holiday']], /*['label' => 'Gii', 'icon' => 'file-code-o', 'url' => ['/gii']], ['label' => 'Debug', 'icon' => 'dashboard', 'url' => ['/debug']], diff --git a/common/models/Holiday.php b/common/models/Holiday.php index 3b47a80..a20c1c4 100644 --- a/common/models/Holiday.php +++ b/common/models/Holiday.php @@ -26,7 +26,7 @@ class Holiday extends ActiveRecord { return [ [['card_id', 'dt_start', 'dt_end'], 'integer'], -// [['card_id', 'dt_start', 'dt_end'], 'required'], + [['card_id', 'dt_start', 'dt_end'], 'required'], ]; }