From d642e32811e4cccb38d411454637405b3e66f327 Mon Sep 17 00:00:00 2001 From: maxim Date: Tue, 14 Sep 2021 10:45:04 +0300 Subject: [PATCH 1/2] =?UTF-8?q?=D0=9F=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BA?= =?UTF-8?q?=D0=B8=20=D0=BD=D0=B5=D0=BE=D0=B1=D1=85=D0=BE=D0=B4=D0=B8=D0=BC?= =?UTF-8?q?=D1=8B=D1=85=20=D0=BF=D0=B0=D1=80=D0=B0=D0=BC=D0=B5=D1=82=D1=80?= =?UTF-8?q?=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/widgets/Calendar.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/backend/widgets/Calendar.php b/backend/widgets/Calendar.php index c07f81c..249c678 100644 --- a/backend/widgets/Calendar.php +++ b/backend/widgets/Calendar.php @@ -3,6 +3,7 @@ namespace backend\widgets; +use common\classes\Debug; use yii\base\Widget; use yii\helpers\Html; @@ -17,14 +18,25 @@ class Calendar extends Widget public $monthUpdate; - public $colorClasses = ['accept' => 'access', 'default' => 'danger', 'offDay' => '']; + public $colorClasses;// = ['accept' => 'access', 'default' => 'danger', 'offDay' => '']; - public $offDaysShow = 1; + public $offDaysShow = 0; public $script = 'CalendarHelper.main()'; public function init() { + if (!isset($this->monthUpdate['url'])){ + Debug::dd('Не существует $monthUpdate["url"]'); + } + if (!isset($this->dayUpdate['url'])){ + Debug::dd('Не существует $dayUpdate["url"]'); + } + if (!isset($this->colorClasses)){ + Debug::dd('Не существует $colorClasses;
["accept" => "access", "default" => "danger", "offDay" => ""]'); + } + + parent::init(); $view = $this->getView(); AppAsset::register($view); From 85760914eb526417226ee6f76f87c19c2dac6810 Mon Sep 17 00:00:00 2001 From: q6q9 Date: Tue, 14 Sep 2021 12:21:12 +0300 Subject: [PATCH 2/2] =?UTF-8?q?API:=D0=B2=D0=BE=D0=B7=D0=BC=D0=BE=D0=B6?= =?UTF-8?q?=D0=BD=D0=BE=D1=81=D1=82=D1=8C=20=D0=BF=D0=BE=D0=BB=D1=83=D1=87?= =?UTF-8?q?=D0=B8=D1=82=D1=8C=20=D1=80=D0=B5=D0=BF=D0=BE=D1=80=D1=82=D1=8B?= =?UTF-8?q?=20=D0=BF=D0=BE=20user=5Fid,=20=D0=B2=20=D0=BF=D1=80=D0=BE?= =?UTF-8?q?=D0=BC=D0=B5=D0=B6=D1=83=D1=82=D0=BA=D0=B5=20=D0=BE=D1=82=20fro?= =?UTF-8?q?mDate=20=D0=B4=D0=BE=20toDate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/modules/api/models/ReportSearchForm.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/frontend/modules/api/models/ReportSearchForm.php b/frontend/modules/api/models/ReportSearchForm.php index 2a46dee..0b03253 100644 --- a/frontend/modules/api/models/ReportSearchForm.php +++ b/frontend/modules/api/models/ReportSearchForm.php @@ -39,13 +39,12 @@ class ReportSearchForm extends Model { $queryBuilder = Reports::find() ->with('task') - ->andWhere(['between', 'reports.created_at', $this->fromDate, $this->toDate, $this->user_id]) + ->andWhere(['between', 'reports.created_at', $this->fromDate, $this->toDate]) ->limit($this->limit) ->offset($this->offset); if(isset($this->user_id)) { - $userCardId = UserCard::findByUserId($this->user_id)->id; - $queryBuilder->andWhere(['user_card_id' => $userCardId]); + $queryBuilder->andWhere(['user_card_id' => $this->user_id]); } $data = $queryBuilder->asArray()->all();