From 04b6b0e91635cd6b4f15c91c08d03416acf77e59 Mon Sep 17 00:00:00 2001 From: jitendra Date: Thu, 11 Nov 2021 13:22:21 +0530 Subject: [PATCH] Isue #672 fixed --- packages/Webkul/Admin/src/DataGrids/Quote/QuoteDataGrid.php | 3 ++- .../Admin/src/Http/Controllers/Admin/DashboardController.php | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/Webkul/Admin/src/DataGrids/Quote/QuoteDataGrid.php b/packages/Webkul/Admin/src/DataGrids/Quote/QuoteDataGrid.php index 539acccba..134838572 100644 --- a/packages/Webkul/Admin/src/DataGrids/Quote/QuoteDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/Quote/QuoteDataGrid.php @@ -3,6 +3,7 @@ namespace Webkul\Admin\DataGrids\Quote; use Illuminate\Support\Facades\DB; +use Carbon\Carbon; use Webkul\Admin\Traits\ProvideDropdownOptions; use Webkul\UI\DataGrid\DataGrid; use Webkul\User\Repositories\UserRepository; @@ -41,7 +42,7 @@ public function init() $this->setRowProperties([ 'backgroundColor' => '#ffd0d6', 'condition' => function ($row) { - if ($row->expired_at < \Carbon\Carbon::now()) { + if (Carbon::createFromFormat('Y-m-d H:i:s', $row->expired_at)->endOfDay() < Carbon::now()) { return true; } diff --git a/packages/Webkul/Admin/src/Http/Controllers/Admin/DashboardController.php b/packages/Webkul/Admin/src/Http/Controllers/Admin/DashboardController.php index a6c96cd5f..bb87105ed 100755 --- a/packages/Webkul/Admin/src/Http/Controllers/Admin/DashboardController.php +++ b/packages/Webkul/Admin/src/Http/Controllers/Admin/DashboardController.php @@ -34,8 +34,7 @@ public function __construct(DashboardHelper $dashboardHelper) * @return \Illuminate\View\View */ public function index() - { - $cards = $this->dashboardHelper->getCards(); + {$cards = $this->dashboardHelper->getCards(); if ($dateRange = request('date-range')) { $dateRange = explode(",", $dateRange);