<?php
use WpBookingEvent\Language\Text;
use WpBookingEvent\Factory as FactoryAlias;
use WpBookingEventAdmin\app\Html\HtmlBackend;
use WpBookingEvent\Html\WpBookingEventHtmlBackend as WpBookingEventHtmlBackendAlias;

WpBookingEventHtmlBackendAlias::load_jquery_library('datatables');
WpBookingEventHtmlBackendAlias::load_jquery_library('icheck');
WpBookingEventHtmlBackendAlias::load_jquery_library('select2');
WpBookingEventHtmlBackendAlias::load_jquery_library('loading_js');
$item = $this->item;
$order_detail=$item->list_order_detail[0];
?>
<div class="view-appointment-form">
    <form action="" name="admin-form" method="post">
        <table id="example" class="display table"">
            <?php if(count($item->list_order_detail))  { ?>
                <thead>
                    <tr class="list-rate-info list-rate-info-<?php esc_html_e($item->id); ?>">
                        <th class="nowrap"><?php esc_attr_e('Start time','wpbookingevent')?></th>
                        <th class="nowrap"><?php esc_attr_e('End time','wpbookingevent')?></th>
                        <th class="nowrap"><?php esc_attr_e('Assign to','wpbookingevent')?></th>
                        <th class="nowrap"><?php esc_attr_e('Service','wpbookingevent')?></th>
                        <th class="nowrap"><?php esc_attr_e('Duration','wpbookingevent')?></th>
                        <th class="nowrap"><?php esc_attr_e('Location','wpbookingevent')?></th>
                    </tr>
                </thead>
                <tbody>
                    <tr class="list-rate-info list-rate-info-<?php esc_attr_e($item->id); ?>">
                        <td class="nowrap">
                            <?php esc_html_e(HtmlBackend::render_date($order_detail->rate->start_date,"H:i")); ?>
                        </td>
                        <td class="nowrap">
                            <?php esc_html_e(HtmlBackend::render_date($order_detail->rate->end_date,"H:i")); ?>
                        </td>
                        <td class="nowrap">
                            <div class="img-box">
                                <img class="employee-item-image pull-left" src="<?php esc_html_e(FactoryAlias::getRootUrlPlugin() . $order_detail->employee_image)  ?>" alt="employee-item-image" />
                            </div>
                            <h4 class="pull-left employee-item-name"><?php esc_html_e($order_detail->employee_full_name); ?></h4>
                        </td>
                        <td class="nowrap"><?php esc_html_e($order_detail->service_name); ?></td>
                        <td class="nowrap"><?php esc_html_e($order_detail->rate->duration) ?></td>
                        <td class="nowrap"><?php esc_html_e($order_detail->location_address); ?></td>
                    </tr>
                </tbody>
            <?php }?>
        </table>
    </form>
</div>
<?php
$doc = FactoryAlias::getDocument();
$doc->addLessStyleSheet('admin/app/assets/less/list_form_appointment.less');
$doc->addScriptApplySelector('.view-appointment-form', 'list_view_appointment', array(

), "admin/app/assets/js/list_view_appointment.js");
?>
