Merge pull request #13 from apuc/add_holidays

fixes
This commit is contained in:
kavalar 2019-07-16 12:26:04 +03:00 committed by GitHub
commit 4dc254d38e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions

View File

@ -53,6 +53,7 @@ class HolidaySearch extends Holiday
$query->andFilterWhere(['between', 'dt_start', $dt_start, $dt_end ]) $query->andFilterWhere(['between', 'dt_start', $dt_start, $dt_end ])
->orFilterWhere(['between', 'dt_end', $dt_start, $dt_end ]); ->orFilterWhere(['between', 'dt_end', $dt_start, $dt_end ]);
$query->orderBy('id DESC');
return $dataProvider; return $dataProvider;
} }

View File

@ -42,7 +42,7 @@
], ],
], ],
['label' => 'Баланс', 'icon' => 'dollar', 'url' => ['/balance/balance']], ['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' => 'Gii', 'icon' => 'file-code-o', 'url' => ['/gii']],
['label' => 'Debug', 'icon' => 'dashboard', 'url' => ['/debug']], ['label' => 'Debug', 'icon' => 'dashboard', 'url' => ['/debug']],

View File

@ -26,7 +26,7 @@ class Holiday extends ActiveRecord
{ {
return [ return [
[['card_id', 'dt_start', 'dt_end'], 'integer'], [['card_id', 'dt_start', 'dt_end'], 'integer'],
// [['card_id', 'dt_start', 'dt_end'], 'required'], [['card_id', 'dt_start', 'dt_end'], 'required'],
]; ];
} }