Skip to content

Commit

Permalink
Update ControllerDash.php
Browse files Browse the repository at this point in the history
  • Loading branch information
kjporter committed Oct 21, 2024
1 parent 481542e commit ce7875a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/Http/Controllers/ControllerDash.php
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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);
Expand Down

0 comments on commit ce7875a

Please sign in to comment.