_booking_info_box_small.php
9 months ago
index.php
1 year ago
widget_bookings_and_availability_timeline.php
9 months ago
widget_daily_bookings_chart.php
1 year ago
widget_upcoming_appointments.php
1 year ago
_booking_info_box_small.php
61 lines
| 1 | <?php |
| 2 | if ( ! defined( 'ABSPATH' ) ) { |
| 3 | exit; // Exit if accessed directly |
| 4 | } |
| 5 | ?> |
| 6 | <div class="appointment-box-small" <?php echo OsBookingHelper::quick_booking_btn_html($booking->id); ?>> |
| 7 | <div class="appointment-info"> |
| 8 | <div class="appointment-color-elem" style="background-color: <?php echo esc_attr($booking->service->bg_color); ?>"></div> |
| 9 | <div class="appointment-service-name"><?php echo esc_html($booking->service->name); ?></div> |
| 10 | <div class="appointment-time"> |
| 11 | <div class="at-date"><?php echo esc_html($booking->nice_start_date); ?>,</div> |
| 12 | <div class="at-time"><?php echo esc_html(implode('-', array($booking->nice_start_time, $booking->nice_end_time))); ?></div> |
| 13 | </div> |
| 14 | </div> |
| 15 | <?php if(!isset($hide_customer_info)){ ?> |
| 16 | <div class="customer-info-w"> |
| 17 | <div class="avatar-w" style="background-image: url(<?php echo esc_url($booking->customer->get_avatar_url()); ?>);"></div> |
| 18 | <div class="customer-info"> |
| 19 | <div class="customer-name"><?php echo esc_html($booking->customer->full_name); ?></div> |
| 20 | <div class="customer-property"> |
| 21 | <span class="label"><i class="latepoint-icon latepoint-icon-phone-15"></i></span> |
| 22 | <span class="value"><?php echo esc_html($booking->customer->phone); ?></span> |
| 23 | </div> |
| 24 | <div class="customer-property"> |
| 25 | <span class="label"><i class="latepoint-icon latepoint-icon-mail-01"></i></span> |
| 26 | <span class="value"><?php echo esc_html($booking->customer->email); ?></span> |
| 27 | </div> |
| 28 | </div> |
| 29 | </div> |
| 30 | <?php } ?> |
| 31 | <?php if(!isset($hide_agent_info)){ ?> |
| 32 | <div class="agent-info-w"> |
| 33 | <div class="avatar-w" style="background-image: url(<?php echo esc_url($booking->agent->get_avatar_url()); ?>);"></div> |
| 34 | <div class="agent-info"> |
| 35 | <div class="agent-name"><?php echo esc_html($booking->agent->full_name); ?></div> |
| 36 | <div class="agent-property"> |
| 37 | <span class="label"><?php esc_html_e('Phone: ', 'latepoint'); ?></span> |
| 38 | <span class="value"><?php echo esc_html($booking->agent->phone); ?></span> |
| 39 | </div> |
| 40 | <div class="agent-property"> |
| 41 | <span class="label"><?php esc_html_e('Email: ', 'latepoint'); ?></span> |
| 42 | <span class="value"><?php echo esc_html($booking->agent->email); ?></span> |
| 43 | </div> |
| 44 | </div> |
| 45 | </div> |
| 46 | <?php } ?> |
| 47 | <?php $max_capacity = OsServiceHelper::get_max_capacity($booking->service); ?> |
| 48 | <?php if($max_capacity > 1){ |
| 49 | $total_attendees_in_group = (isset($total_attendees_in_group)) ? $total_attendees_in_group + $booking->total_attendees : $booking->total_attendees; |
| 50 | $css_width = min(((max($total_attendees_in_group, 1) / $max_capacity) * 100), 100); ?> |
| 51 | <div class="appointment-capacity-info"> |
| 52 | <div class="appointment-capacity-info-label"> |
| 53 | <strong><?php echo esc_html(max($total_attendees_in_group, 1).' '.__('of', 'latepoint').' '.$max_capacity); ?></strong> |
| 54 | <span><?php esc_html_e('Slots Booked', 'latepoint'); ?></span> |
| 55 | </div> |
| 56 | <div class="appointment-capacity-progress-w"> |
| 57 | <div class="appointment-capacity-progress" style="width: <?php echo esc_attr($css_width); ?>%;"></div> |
| 58 | </div> |
| 59 | </div> |
| 60 | <?php } ?> |
| 61 | </div> |