default.php
6 days ago
default_details.php
6 days ago
default_details_appointments.php
6 days ago
default_details_appointments_modal.php
6 days ago
default_details_appointments_option_modal.php
6 days ago
default_details_appointments_table.php
6 days ago
default_details_billing.php
6 days ago
default_details_order.php
6 days ago
default_details_order_custmail.php
6 days ago
default_fields.php
6 days ago
default_orderstatus.php
6 days ago
default_orderstatus_history.php
6 days ago
default_orderstatus_manage.php
6 days ago
default_usernotes.php
6 days ago
default_usernotes_main.php
6 days ago
default_usernotes_sidebar.php
6 days ago
index.html
6 days ago
default_orderstatus_history.php
114 lines
| 1 | <?php |
| 2 | /** |
| 3 | * @package VikAppointments |
| 4 | * @subpackage core |
| 5 | * @author E4J s.r.l. |
| 6 | * @copyright Copyright (C) 2021 E4J s.r.l. All Rights Reserved. |
| 7 | * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL |
| 8 | * @link https://vikwp.com |
| 9 | */ |
| 10 | |
| 11 | // No direct access |
| 12 | defined('ABSPATH') or die('No script kiddies please!'); |
| 13 | |
| 14 | $reservation = $this->reservation; |
| 15 | |
| 16 | $config = VAPFactory::getConfig(); |
| 17 | $handler = VAPOrderStatus::getInstance(); |
| 18 | |
| 19 | $dt_format = JText::translate('DATE_FORMAT_LC1') . ' ' . $config->get('timeformat'); |
| 20 | // use also the seconds |
| 21 | $dt_format = str_replace(':i', ':i:s', $dt_format); |
| 22 | |
| 23 | // Get all reservation status codes. |
| 24 | // NOTE: Do not merge the order status of the parent order, because the |
| 25 | // table might display duplicate records. |
| 26 | $tracks = $handler->getOrderTrack($reservation->id, $locale = true); |
| 27 | |
| 28 | ?> |
| 29 | |
| 30 | <table class="order-status-table"> |
| 31 | |
| 32 | <thead> |
| 33 | <tr> |
| 34 | <th style="text-align: left;"><?php echo JText::translate('VAPORDERSTATUS'); ?></th> |
| 35 | <th style="text-align: center;"><?php echo JText::translate('VAPMANAGERESERVATION33'); ?></th> |
| 36 | <th style="text-align: center;"><?php echo JText::translate('VAPREFERER'); ?></th> |
| 37 | <th style="text-align: center;"><?php echo JText::translate('VAPREMOTEADDR'); ?></th> |
| 38 | <th style="text-align: center;"><?php echo JText::translate('VAPMANAGERESERVATION37'); ?></th> |
| 39 | </tr> |
| 40 | </thead> |
| 41 | |
| 42 | <tbody> |
| 43 | |
| 44 | <?php |
| 45 | |
| 46 | if (count($tracks)) |
| 47 | { |
| 48 | foreach ($tracks as $track) |
| 49 | { |
| 50 | ?> |
| 51 | <tr> |
| 52 | <td style="text-align: left;"> |
| 53 | <?php echo JHtml::fetch('vaphtml.status.display', $track->statusCode); ?> |
| 54 | </td> |
| 55 | |
| 56 | <td style="text-align: center;"> |
| 57 | <?php echo $track->createdby ? $track->name . ' (' . $track->username . ')' : strtolower(JText::translate('VAPRESLISTGUEST')); ?> |
| 58 | </td> |
| 59 | |
| 60 | <td style="text-align: center;"> |
| 61 | <?php echo JText::translate($track->client ? 'JADMINISTRATOR' : 'JSITE'); ?> |
| 62 | </td> |
| 63 | |
| 64 | <td style="text-align: center;"> |
| 65 | <?php echo $track->ip; ?> |
| 66 | </td> |
| 67 | |
| 68 | <td style="text-align: center;"> |
| 69 | <span class="hasTooltip" title="<?php echo JHtml::fetch('date', $track->createdon, $dt_format); ?>"> |
| 70 | <?php echo JHtml::fetch('date.relative', $track->createdon, null, null, $dt_format); ?> |
| 71 | </span> |
| 72 | </td> |
| 73 | </tr> |
| 74 | <?php |
| 75 | |
| 76 | if ($track->comment) |
| 77 | { |
| 78 | ?> |
| 79 | <tr class="track-comment"> |
| 80 | <td colspan="5" style="text-align: left;"> |
| 81 | <span style="width: calc(100% - 24px); display: inline-block; margin-right: 6px;"> |
| 82 | <?php echo $track->comment; ?> |
| 83 | </span> |
| 84 | |
| 85 | <?php |
| 86 | if ($track->id_order != $this->reservation->id) |
| 87 | { |
| 88 | ?> |
| 89 | <i class="fas fa-link hasTooltip" title="<?php echo $this->escape(JText::translate('VAPPARENTORDER')); ?>"></i> |
| 90 | <?php |
| 91 | } |
| 92 | ?> |
| 93 | </td> |
| 94 | </tr> |
| 95 | <?php |
| 96 | } |
| 97 | } |
| 98 | } |
| 99 | else |
| 100 | { |
| 101 | ?> |
| 102 | <tr class="track-warning"> |
| 103 | <td colspan="5"> |
| 104 | <?php echo JText::translate('JGLOBAL_NO_MATCHING_RESULTS'); ?> |
| 105 | </td> |
| 106 | </tr> |
| 107 | <?php |
| 108 | } |
| 109 | ?> |
| 110 | |
| 111 | </tbody> |
| 112 | |
| 113 | </table> |
| 114 |