_booking_tile.php
1 week ago
_bundle_tile.php
1 year ago
_order_tile.php
2 months ago
dashboard.php
2 months ago
login.php
9 months ago
password_reset_form.php
2 months ago
request_password_reset_token.php
2 months ago
scheduling_summary_for_bundle.php
1 year ago
view_booking_summary_in_lightbox.php
1 year ago
view_order_summary_in_lightbox.php
1 year ago
_booking_tile.php
86 lines
| 1 | <?php |
| 2 | /** |
| 3 | * @var $booking OsBookingModel |
| 4 | * @var $is_upcoming_booking bool |
| 5 | */ |
| 6 | |
| 7 | if ( ! defined( 'ABSPATH' ) ) { |
| 8 | exit; // Exit if accessed directly |
| 9 | } |
| 10 | ?> |
| 11 | <div class="customer-booking status-<?php echo esc_attr($booking->status); ?>" data-id="<?php echo esc_attr($booking->id); ?>" data-route-name="<?php echo esc_attr(OsRouterHelper::build_route_name('customer_cabinet', 'reload_booking_tile')); ?>"> |
| 12 | <h6 class="customer-booking-service-name"><?php echo esc_html($booking->service->name); ?></h6> |
| 13 | <div class="customer-booking-datetime"> |
| 14 | <?php |
| 15 | if($booking->start_date){ |
| 16 | echo $booking->get_nice_datetime_for_summary(); |
| 17 | } |
| 18 | ?> |
| 19 | </div> |
| 20 | |
| 21 | <?php |
| 22 | if($booking->is_part_of_bundle()){ ?> |
| 23 | <div class="part-of-bundle-message"><?php esc_html_e('This booking is part of a bundle.', 'latepoint'); ?> <a href="#" <?php echo OsCustomerHelper::generate_bundle_scheduling_btn($booking->order_item_id); ?>><?php esc_html_e('Show Details', 'latepoint'); ?></a></div> |
| 24 | <?php |
| 25 | } |
| 26 | ?> |
| 27 | |
| 28 | <?php if($is_upcoming_booking){ ?> |
| 29 | <div class="customer-booking-buttons"> |
| 30 | <?php if(OsCustomerHelper::can_reschedule_booking($booking)){ ?> |
| 31 | <a href="#" class="latepoint-btn latepoint-btn-primary latepoint-request-booking-reschedule latepoint-btn-link" data-os-after-call="latepoint_init_reschedule" data-os-lightbox-classes="width-450 reschedule-calendar-wrapper" data-os-action="<?php echo esc_attr(OsRouterHelper::build_route_name('customer_cabinet', 'request_reschedule_calendar')); ?>" data-os-params="<?php echo esc_attr(OsUtilHelper::build_os_params(['booking_id' => $booking->id])); ?>" data-os-output-target="lightbox"> |
| 32 | <span><?php esc_html_e('Reschedule', 'latepoint'); ?></span> |
| 33 | </a> |
| 34 | <?php } ?> |
| 35 | <?php if(OsCustomerHelper::can_cancel_booking($booking)){ ?> |
| 36 | <?php echo OsBookingHelper::generate_cancel_booking_button($booking, 'customer_cabinet'); ?> |
| 37 | <?php } ?> |
| 38 | </div> |
| 39 | <?php } ?> |
| 40 | <div class="customer-booking-service-color"></div> |
| 41 | |
| 42 | <div class="customer-booking-info"> |
| 43 | <div class="customer-booking-info-row"> |
| 44 | <span class="booking-info-label"><?php esc_html_e('Agent', 'latepoint'); ?></span> |
| 45 | <span class="booking-info-value"><?php echo esc_html($booking->agent->full_name); ?></span> |
| 46 | </div> |
| 47 | <div class="customer-booking-info-row"> |
| 48 | <span class="booking-info-label"><?php esc_html_e('Status', 'latepoint'); ?></span> |
| 49 | <span class="booking-info-value status-<?php echo esc_attr($booking->status); ?>"><?php echo esc_html($booking->nice_status); ?></span> |
| 50 | </div> |
| 51 | <?php do_action('latepoint_customer_dashboard_after_booking_info_tile', $booking); ?> |
| 52 | </div> |
| 53 | <div class="customer-booking-bottom-actions"> |
| 54 | <?php if($is_upcoming_booking){ ?> |
| 55 | <div class="add-to-calendar-wrapper"> |
| 56 | <a href="#" class="open-calendar-types latepoint-btn latepoint-btn-primary latepoint-btn-outline"> |
| 57 | <i class="latepoint-icon latepoint-icon-plus-circle"></i> |
| 58 | <span><?php esc_html_e('Add to Calendar', 'latepoint'); ?></span> |
| 59 | </a> |
| 60 | <?php echo OsBookingHelper::generate_add_to_calendar_links($booking); ?> |
| 61 | </div> |
| 62 | <?php } ?> |
| 63 | <div class="load-booking-summary-btn-w"> |
| 64 | <a href="#" |
| 65 | class="latepoint-btn latepoint-btn-primary latepoint-btn-outline" |
| 66 | <?php echo OsCustomerHelper::generate_booking_summary_preview_btn($booking->id); ?>> |
| 67 | <i class="latepoint-icon latepoint-icon-list"></i> |
| 68 | <span><?php esc_html_e('Summary', 'latepoint'); ?></span> |
| 69 | </a> |
| 70 | </div> |
| 71 | </div> |
| 72 | <?php if(false && !$booking->is_part_of_bundle() && $booking->order->get_total_balance_due() > 0){ ?> |
| 73 | <div class="bt-payment-actions"> |
| 74 | <div class="bt-balance-info"> |
| 75 | <div class="bt-balance-label"><?php esc_html_e('Balance Due:', 'latepoint'); ?></div> |
| 76 | <div class="bt-balance-amount"><?php echo OsMoneyHelper::format_price($booking->order->get_total_balance_due(), true, false); ?></div> |
| 77 | </div> |
| 78 | <div class="bt-balance-pay-link"><a href="#" |
| 79 | data-os-params="<?php echo esc_attr(http_build_query( [ 'order_id' => $booking->order->id ] )); ?>" |
| 80 | data-os-action="<?php echo esc_attr(OsRouterHelper::build_route_name( 'orders', 'summary_before_payment' )); ?>" |
| 81 | data-os-output-target="lightbox" |
| 82 | data-os-lightbox-classes="width-500" |
| 83 | ><?php esc_html_e('Make Payment', 'latepoint'); ?></a></div> |
| 84 | </div> |
| 85 | <?php } ?> |
| 86 | </div> |