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'], ]; }