<?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;
?>
<div class="view-orderpackage-form">
    <form action="" name="admin-form" method="post" enctype="multipart/form-data">
        <table id="example" class="display table"">
            <?php if(count($item->list_order_package))  { ?>
                <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('Assigned 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>
                    <?php foreach ($item->list_order_package as $order_package) { ?>
                        <tr class="list-rate-info">
                            <td class="nowrap">
                                <?php echo(HtmlBackend::render_date($order_package->rate->start_date,"H:i")); ?>
                            </td>
                            <td class="nowrap">
                                <?php echo(HtmlBackend::render_date($order_package->rate->end_date,"H:i")); ?>
                            </td>
                            <td class="nowrap">
                                <div class="img-box">
                                    <img class="employee-item-image pull-left" src="<?php echo(FactoryAlias::getRootUrlPlugin() . $order_detail->employee_image)  ?>" alt="employee-item-image" />
                                </div>
                                <h4 class="pull-left employee-item-name"><?php esc_html_e($order_package->employee_full_name); ?></h4>
                            </td>
                            <td class="nowrap"><?php esc_html_e($order_package->service_name); ?></td>
                            <td class="nowrap"><?php esc_html_e($order_package->rate->duration) ?></td>
                            <td class="nowrap"><?php esc_html_e($order_package->location_address); ?></td>
                        </tr>
                    <?php } ?>
                </tbody>
            <?php }?>
        </table>
    </form>
</div>
<?php
$doc = FactoryAlias::getDocument();
$doc->addLessStyleSheet('admin/app/assets/less/list_form_orderpackage.less');
$doc->addScriptApplySelector('.view-orderpackage-form', 'list_view_order_package', array(

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