From ce7875a0c823f049dfacdf67c68bbdfd41ccb773 Mon Sep 17 00:00:00 2001 From: kjporter Date: Tue, 8 Oct 2024 10:12:04 -0400 Subject: [PATCH] Update ControllerDash.php --- app/Http/Controllers/ControllerDash.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/Http/Controllers/ControllerDash.php b/app/Http/Controllers/ControllerDash.php index 5353391f..4dea4023 100644 --- a/app/Http/Controllers/ControllerDash.php +++ b/app/Http/Controllers/ControllerDash.php @@ -181,7 +181,7 @@ public function showProfile($year = null, $month = null) { } catch (\Illuminate\Database\QueryException $e) { } } - $ea_appointments = []; + $ea_appointments = $ea_appointments_filtered = []; if (!is_null(Auth::user()->ea_customer_id)) { try { $ea_appointments = DB::connection('ea_mysql') @@ -199,7 +199,6 @@ public function showProfile($year = null, $month = null) { ->where('ea_appointments.id_users_customer', Auth::user()->ea_customer_id) ->where('ea_appointments.start_datetime', '>=', Carbon::now()->subHours(24)->format('Y-m-d H:i:s')) ->orderBy('ea_appointments.start_datetime', 'ASC')->get(); - $ea_appointments_filtered = []; foreach ($ea_appointments as $ea_appointment) { if (Carbon::parse($ea_appointment->start_datetime, $ea_appointment->booking_timezone) >= Carbon::now()->subHours(self::$SHOW_BOOKINGS_AFTER_APPT)) { $appt_start_datetime = Carbon::parse($ea_appointment->start_datetime, $ea_appointment->booking_timezone)->setTimezone(Auth::user()->timezone);