From 18d46f09c728210e969aeac20255caf6dc398fb1 Mon Sep 17 00:00:00 2001 From: Linksehat Staging Server Date: Thu, 31 Aug 2023 13:42:04 +0700 Subject: [PATCH] Update livechat --- .../Http/Controllers/Api/LivechatController.php | 11 ++--------- Modules/Internal/Services/CorporateService.php | 2 +- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/Modules/Internal/Http/Controllers/Api/LivechatController.php b/Modules/Internal/Http/Controllers/Api/LivechatController.php index c393298d..9531a1a4 100644 --- a/Modules/Internal/Http/Controllers/Api/LivechatController.php +++ b/Modules/Internal/Http/Controllers/Api/LivechatController.php @@ -22,15 +22,8 @@ class LivechatController extends Controller $livechat = Livechat::with('doctor.user', 'doctor.speciality', 'appointment.appointmentDetail', 'healthCare') ->where('nIDAppointment', '!=', null)->where('nIDAppointment', '!=', ''); - // dd($livechat); - if ($startDate){ - $livechat->where('dStartTime', '>=', $startDate); - } - - if ($endDate){ - $livechat->where('dStartTime', '<=', $endDate); - } - $livechat->latest()->paginate(15); + + $livechat = $livechat->latest()->paginate(15); return response()->json(Helper::paginateResources(LivechatResource::collection($livechat))); } diff --git a/Modules/Internal/Services/CorporateService.php b/Modules/Internal/Services/CorporateService.php index 80fdd035..8bc6b4b1 100644 --- a/Modules/Internal/Services/CorporateService.php +++ b/Modules/Internal/Services/CorporateService.php @@ -229,7 +229,7 @@ class CorporateService public function handleBenefitRow(Corporate $corporate, $row) { try { - // $row['limit_free_tc'] = 0; + $row['limit_free_tc'] = 0; $benefit_data = $row; $this->validateBenefitRow($benefit_data, $corporate->id); $benefit_data["corporate_id"] = $corporate->id;