| 1 |
<?php |
| 2 |
/** |
| 3 |
* @package VikBooking |
| 4 |
* @subpackage core |
| 5 |
* @author E4J s.r.l. |
| 6 |
* @copyright Copyright (C) 2025 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 |
/** |
| 15 |
* Obtain vars from arguments received in the layout file. |
| 16 |
* |
| 17 |
* @var VBOTaskTaskregistry $task The task registry to render. |
| 18 |
*/ |
| 19 |
extract($displayData); |
| 20 |
|
| 21 |
// access the task manager object |
| 22 |
$taskManager = VBOFactory::getTaskManager(); |
| 23 |
|
| 24 |
// get task status details |
| 25 |
$statusColor = ''; |
| 26 |
$statusName = ''; |
| 27 |
if ($taskManager->statusTypeExists($task->getStatus())) { |
| 28 |
$status = $taskManager->getStatusTypeInstance($task->getStatus()); |
| 29 |
$statusColor = $status->getColor(); |
| 30 |
$statusName = $status->getName(); |
| 31 |
} |
| 32 |
|
| 33 |
// get task assignee details |
| 34 |
$assignees = $task->getAssigneeDetails(); |
| 35 |
|
| 36 |
?> |
| 37 |
<div class="vbo-tm-calendar-day-task vbo-tm-color <?php echo $statusColor; ?>" data-task-id="<?php echo $task->getID(); ?>" data-area-id="<?php echo $task->getAreaID(); ?>"> |
| 38 |
<div class="vbo-tm-calendar-day-task-wrap"> |
| 39 |
<div class="vbo-tm-calendar-day-task-head"> |
| 40 |
<span class="vbo-tm-calendar-day-task-title"> |
| 41 |
<?php echo $task->getTitle(); ?> |
| 42 |
|
| 43 |
<?php if ($task->get('hasUnreadMessages', false)): ?> |
| 44 |
<span class="unread-message-dot"> |
| 45 |
<?php VikBookingIcons::e('comment'); ?> |
| 46 |
</span> |
| 47 |
<?php endif; ?> |
| 48 |
</span> |
| 49 |
</div> |
| 50 |
<div class="vbo-tm-calendar-day-task-footer"> |
| 51 |
<?php |
| 52 |
if ($assignees) { |
| 53 |
?> |
| 54 |
<span class="vbo-tm-calendar-task-assignees"> |
| 55 |
<?php |
| 56 |
foreach ($assignees as $operator) { |
| 57 |
?> |
| 58 |
<span class="vbo-tm-calendar-task-assignee vbo-tm-task-assignee"> |
| 59 |
<span class="vbo-tm-calendar-task-assignee-avatar vbo-tm-task-assignee-avatar" title="<?php echo JHtml::fetch('esc_attr', $operator['name']); ?>"> |
| 60 |
<?php |
| 61 |
if (!empty($operator['img_uri'])) { |
| 62 |
?> |
| 63 |
<img src="<?php echo $operator['img_uri']; ?>" alt="<?php echo JHtml::fetch('esc_attr', $operator['initials']); ?>" decoding="async" loading="lazy" /> |
| 64 |
<?php |
| 65 |
} else { |
| 66 |
?> |
| 67 |
<span><?php echo $operator['initials']; ?></span> |
| 68 |
<?php |
| 69 |
} |
| 70 |
?> |
| 71 |
</span> |
| 72 |
</span> |
| 73 |
<?php |
| 74 |
} |
| 75 |
?> |
| 76 |
</span> |
| 77 |
<?php |
| 78 |
} |
| 79 |
?> |
| 80 |
</div> |
| 81 |
</div> |
| 82 |
</div> |