From 85760914eb526417226ee6f76f87c19c2dac6810 Mon Sep 17 00:00:00 2001 From: q6q9 Date: Tue, 14 Sep 2021 12:21:12 +0300 Subject: [PATCH] =?UTF-8?q?API:=D0=B2=D0=BE=D0=B7=D0=BC=D0=BE=D0=B6=D0=BD?= =?UTF-8?q?=D0=BE=D1=81=D1=82=D1=8C=20=D0=BF=D0=BE=D0=BB=D1=83=D1=87=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20=D1=80=D0=B5=D0=BF=D0=BE=D1=80=D1=82=D1=8B=20?= =?UTF-8?q?=D0=BF=D0=BE=20user=5Fid,=20=D0=B2=20=D0=BF=D1=80=D0=BE=D0=BC?= =?UTF-8?q?=D0=B5=D0=B6=D1=83=D1=82=D0=BA=D0=B5=20=D0=BE=D1=82=20fromDate?= =?UTF-8?q?=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();