show.php
41 lines
| 1 | <?php |
| 2 | /* |
| 3 | * Copyright (c) 2023 LatePoint LLC. All rights reserved. |
| 4 | */ |
| 5 | |
| 6 | /** |
| 7 | * @var $order OsOrderModel |
| 8 | * @var $for string |
| 9 | * @var $key string |
| 10 | */ |
| 11 | |
| 12 | |
| 13 | if ( ! defined( 'ABSPATH' ) ) { |
| 14 | exit; // Exit if accessed directly |
| 15 | } |
| 16 | |
| 17 | |
| 18 | ?> |
| 19 | <div class="manage-order-wrapper" data-route-name="<?php echo esc_attr(OsRouterHelper::build_route_name('manage_order_by_key', 'show')); ?>" data-key="<?php echo esc_attr($key); ?>"> |
| 20 | <?php |
| 21 | if($for == 'agent'){ |
| 22 | echo '<div class="manage-booking-controls status-'.esc_attr($order->status).'">'; |
| 23 | echo '<div class="change-booking-status-trigger-wrapper" data-route-name="'.esc_attr(OsRouterHelper::build_route_name('manage_order_by_key', 'change_status')).'">'; |
| 24 | echo OsFormHelper::select_field('booking[status]', __('Status:', 'latepoint'), OsBookingHelper::get_statuses_list(), $order->status, ['id' => 'booking_status_'.$order->id, 'class' => 'change-booking-status-trigger']); |
| 25 | echo '</div>'; |
| 26 | echo '</div>'; |
| 27 | }else{ |
| 28 | if($order->status == LATEPOINT_ORDER_STATUS_CANCELLED){ ?> |
| 29 | <div class="manage-booking-controls status-<?php echo esc_attr($order->status); ?>"> |
| 30 | <div class="manage-status-info"> |
| 31 | <span class="status-info-value status-<?php echo esc_attr($order->status); ?>"><?php echo esc_html($order->get_nice_status_name()); ?></span> |
| 32 | </div> |
| 33 | </div> |
| 34 | <?php |
| 35 | } |
| 36 | }?> |
| 37 | <div class="manage-booking-inner"> |
| 38 | <?php include(LATEPOINT_VIEWS_ABSPATH.'orders/_full_summary.php'); ?> |
| 39 | </div> |
| 40 | </div> |
| 41 |