mirror of
https://github.com/itflow-org/itflow
synced 2026-11-21 20:07:24 +00:00
Archive clients, ticket replies, accounts and SLAs and restore anything without an Are you sure prompt, with Undo added for ticket replies and accounts, real plurals and bold counts in bulk messages, and flashAlert for asset and contact note messages
This commit is contained in:
@@ -220,7 +220,7 @@ $ms_text = function ($ms) {
|
||||
$feature = (string) $row['ai_usage_feature'];
|
||||
?>
|
||||
<tr data-ai-usage-id="<?= intval($row['ai_usage_id']) ?>">
|
||||
<td class="ps-3 text-nowrap small" title="<?= escapeHtml($row['ai_usage_created_at']) ?>">
|
||||
<td class="ps-3 text-nowrap small" title="<?= formatDateTime($row['ai_usage_created_at']) ?>">
|
||||
<div><?= escapeHtml(date('M j, Y g:i A', strtotime($row['ai_usage_created_at']))) ?></div>
|
||||
<div class="text-body-secondary"><?= escapeHtml(timeAgo($row['ai_usage_created_at'])) ?></div>
|
||||
</td>
|
||||
|
||||
@@ -152,7 +152,7 @@ $csrf = $_SESSION['csrf_token'];
|
||||
$role = $roles[intval($row['user_role_id'])] ?? null;
|
||||
$expired = apiKeyExpired($row);
|
||||
$agent_name = trim(str_replace(' (archived)', '', (string) $row['user_name']));
|
||||
$last_used = $row['api_key_last_used_at'] ? '<span title="' . escapeHtml($row['api_key_last_used_at']) . '">' . escapeHtml(timeAgo($row['api_key_last_used_at'])) . '</span>' : '<span class="text-body-secondary">Never</span>';
|
||||
$last_used = $row['api_key_last_used_at'] ? '<span title="' . formatDateTime($row['api_key_last_used_at']) . '">' . escapeHtml(timeAgo($row['api_key_last_used_at'])) . '</span>' : '<span class="text-body-secondary">Never</span>';
|
||||
$use = $usage[$api_key_id] ?? null;
|
||||
if ($use && $use['last_ip'] !== '') {
|
||||
$last_used .= '<div class="text-body-secondary font-monospace" title="Where the last call came from">' . escapeHtml($use['last_ip']) . '</div>';
|
||||
|
||||
@@ -168,7 +168,7 @@ $filters_url = function ($modal) use ($dtf, $dtt, $view, $category_filter) {
|
||||
$short = mb_strlen($details) > 240 ? rtrim(mb_substr($details, 0, 240)) . '…' : $details;
|
||||
?>
|
||||
<tr data-app-log-id="<?= $app_log_id ?>">
|
||||
<td class="ps-3 text-nowrap small" title="<?= escapeHtml($row['app_log_created_at']) ?>">
|
||||
<td class="ps-3 text-nowrap small" title="<?= formatDateTime($row['app_log_created_at']) ?>">
|
||||
<div><?= escapeHtml(date('M j, Y g:i A', strtotime($row['app_log_created_at']))) ?></div>
|
||||
<div class="text-body-secondary"><?= escapeHtml(timeAgo($row['app_log_created_at'])) ?></div>
|
||||
</td>
|
||||
|
||||
@@ -231,7 +231,7 @@ $view_empty = [
|
||||
$from = implode(' · ', array_filter([(string) $row['log_ip'], $device]));
|
||||
?>
|
||||
<tr data-log-id="<?= $log_id ?>">
|
||||
<td class="ps-3 text-nowrap small" title="<?= escapeHtml($row['log_created_at']) ?>">
|
||||
<td class="ps-3 text-nowrap small" title="<?= formatDateTime($row['log_created_at']) ?>">
|
||||
<div><?= escapeHtml(date('M j, Y g:i A', strtotime($row['log_created_at']))) ?></div>
|
||||
<div class="text-body-secondary"><?= escapeHtml(timeAgo($row['log_created_at'])) ?></div>
|
||||
</td>
|
||||
|
||||
@@ -357,7 +357,7 @@ $status_looks = [
|
||||
$type_as_noun = $type_noun($backup['backup_type']);
|
||||
$type_look = $type_looks[$backup['backup_type']] ?? ['icon' => 'fa-file-archive', 'tone' => 'itflow-asset-tone-other'];
|
||||
$status_look = $status_looks[$status] ?? ['label' => $status, 'tone' => 'secondary'];
|
||||
$made_at = substr((string) $backup['backup_created_at'], 0, 16);
|
||||
$made_at = formatDateTime($backup['backup_created_at']);
|
||||
$backup_path = $status === 'Complete' ? backupResolvePath((string) $backup['backup_file_name']) : false;
|
||||
// A finished one is deleted, file and all; one still waiting is taken off the queue; the rest are only rows
|
||||
$remove = [
|
||||
@@ -374,12 +374,12 @@ $status_looks = [
|
||||
<div class="fw-semibold text-nowrap"><?= escapeHtml($type_label) ?></div>
|
||||
<div class="small text-body-secondary text-truncate"><?= escapeHtml($made_by($backup)) ?></div>
|
||||
<?php // On a phone the Made column goes, and its date sits here ?>
|
||||
<div class="small text-body-secondary text-nowrap d-sm-none"><?= escapeHtml($made_at) ?></div>
|
||||
<div class="small text-body-secondary text-nowrap d-sm-none"><?= $made_at ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-nowrap d-none d-sm-table-cell">
|
||||
<div><?= escapeHtml($made_at) ?></div>
|
||||
<div><?= $made_at ?></div>
|
||||
<div class="small text-body-secondary"><?= escapeHtml(timeAgo($backup['backup_created_at'])) ?></div>
|
||||
</td>
|
||||
<td class="d-none d-sm-table-cell text-nowrap"><?= $backup['backup_size'] > 0 ? escapeHtml(backupFormatBytes($backup['backup_size'])) : '<span class="text-body-secondary">—</span>' ?></td>
|
||||
@@ -390,7 +390,7 @@ $status_looks = [
|
||||
<?php } elseif ($status === 'Missing') { ?>
|
||||
<div class="small text-body-secondary mt-1">Its file is no longer on this server</div>
|
||||
<?php } elseif ($status === 'Complete' && !empty($backup['backup_downloaded_at'])) { ?>
|
||||
<div class="small text-body-secondary mt-1" title="<?= escapeHtml($backup['backup_downloaded_at']) ?>"><i class="fas fa-fw fa-download me-1"></i>Downloaded <?= escapeHtml(timeAgo($backup['backup_downloaded_at'])) ?></div>
|
||||
<div class="small text-body-secondary mt-1" title="<?= formatDateTime($backup['backup_downloaded_at']) ?>"><i class="fas fa-fw fa-download me-1"></i>Downloaded <?= escapeHtml(timeAgo($backup['backup_downloaded_at'])) ?></div>
|
||||
<?php } ?>
|
||||
</td>
|
||||
<td class="text-end text-nowrap pe-3">
|
||||
|
||||
@@ -503,7 +503,7 @@ $status_looks = [
|
||||
<span class="text-body-secondary">Times are in</span>
|
||||
<span class="text-end">
|
||||
<a href="settings_localization.php" class="fw-semibold"><?= escapeHtml($session_timezone) ?></a>
|
||||
<span class="d-block text-body-secondary"><?= date('H:i') ?> now</span>
|
||||
<span class="d-block text-body-secondary"><?= date('g:i A') ?> now</span>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -191,7 +191,7 @@ $required_url = "modals/document_template/document_template_required.php?id=$doc
|
||||
<span class="d-block text-truncate"><?= escapeHtml($due_row['client_name']) ?></span>
|
||||
<span class="d-block text-truncate text-secondary"><?= escapeHtml($due_row['document_name']) ?></span>
|
||||
</span>
|
||||
<span class="text-secondary text-nowrap" title="Last edited or reviewed <?= escapeHtml($due_row['reviewed_at']) ?>"><?= timeAgo($due_row['reviewed_at']) ?></span>
|
||||
<span class="text-secondary text-nowrap" title="Last edited or reviewed <?= formatDateTime($due_row['reviewed_at']) ?>"><?= timeAgo($due_row['reviewed_at']) ?></span>
|
||||
</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
@@ -315,10 +315,10 @@ $required_url = "modals/document_template/document_template_required.php?id=$doc
|
||||
<div class="card-body">
|
||||
<dl class="row mb-0 small">
|
||||
<dt class="col-5 fw-normal text-secondary">Made</dt>
|
||||
<dd class="col-7 mb-2" title="<?= escapeHtml($template['document_template_created_at']) ?>"><?= date('M j, Y', strtotime($template['document_template_created_at'])) ?><?= $template['created_by_name'] !== null ? '<div class="text-secondary">' . escapeHtml($template['created_by_name']) . '</div>' : '' ?></dd>
|
||||
<dd class="col-7 mb-2" title="<?= formatDateTime($template['document_template_created_at']) ?>"><?= date('M j, Y', strtotime($template['document_template_created_at'])) ?><?= $template['created_by_name'] !== null ? '<div class="text-secondary">' . escapeHtml($template['created_by_name']) . '</div>' : '' ?></dd>
|
||||
<?php if ($template['document_template_updated_at']) { ?>
|
||||
<dt class="col-5 fw-normal text-secondary">Last changed</dt>
|
||||
<dd class="col-7 mb-2" title="<?= escapeHtml($template['document_template_updated_at']) ?>"><?= timeAgo($template['document_template_updated_at']) ?><?= $template['updated_by_name'] !== null ? '<div class="text-secondary">' . escapeHtml($template['updated_by_name']) . '</div>' : '' ?></dd>
|
||||
<dd class="col-7 mb-2" title="<?= formatDateTime($template['document_template_updated_at']) ?>"><?= timeAgo($template['document_template_updated_at']) ?><?= $template['updated_by_name'] !== null ? '<div class="text-secondary">' . escapeHtml($template['updated_by_name']) . '</div>' : '' ?></dd>
|
||||
<?php } ?>
|
||||
<dt class="col-5 fw-normal text-secondary">Images</dt>
|
||||
<dd class="col-7 mb-0"><?= $images ? $images . ' - copied into each document' : 'None' ?></dd>
|
||||
|
||||
@@ -196,7 +196,7 @@ $csrf = $_SESSION['csrf_token'];
|
||||
</td>
|
||||
<td class="d-none d-md-table-cell small text-nowrap"><?= $used_count ? escapeHtml($used_text) : '<span class="text-body-secondary">Not yet</span>' ?></td>
|
||||
<td class="d-none d-md-table-cell small text-body-secondary text-nowrap"<?= $row['last_used'] ? ' title="' . escapeHtml($row['last_used']) . '"' : '' ?>><?= $row['last_used'] ? timeAgo($row['last_used']) : '-' ?></td>
|
||||
<td class="d-none d-lg-table-cell small text-body-secondary text-nowrap" title="<?= escapeHtml($row['changed_at']) ?>">
|
||||
<td class="d-none d-lg-table-cell small text-body-secondary text-nowrap" title="<?= formatDateTime($row['changed_at']) ?>">
|
||||
<?= timeAgo($row['changed_at']) ?>
|
||||
<?php if ($row['changed_by'] !== null) { ?><div><?= escapeHtml($row['changed_by']) ?></div><?php } ?>
|
||||
</td>
|
||||
|
||||
@@ -219,7 +219,7 @@ $lock = '<i class="fas fa-fw fa-lock text-body-secondary ms-1" title="Set by ' .
|
||||
<?= $fact('Updates', '<span class="fw-semibold">' . ($state['update_policy'] === 'auto' ? 'Automatic' : 'From there') . '</span>' . $lock
|
||||
. ($state['update_policy'] === 'auto' ? '<div class="text-body-secondary">' . ($state['update_delay_days'] > 0 ? $state['update_delay_days'] . ' day' . ($state['update_delay_days'] === 1 ? '' : 's') . ' after a release' : 'As soon as a release is out') . ', security fixes straight away</div>' : '')) ?>
|
||||
<?= $fact('Support sign-in', $last_support
|
||||
? 'Last <span title="' . escapeHtml($last_support['log_created_at']) . '">' . escapeHtml(timeAgo($last_support['log_created_at'])) . '</span><div class="text-body-secondary"><a href="audit_logs.php">Audit log</a></div>'
|
||||
? 'Last <span title="' . formatDateTime($last_support['log_created_at']) . '">' . escapeHtml(timeAgo($last_support['log_created_at'])) . '</span><div class="text-body-secondary"><a href="audit_logs.php">Audit log</a></div>'
|
||||
: '<span class="text-body-secondary">Not yet</span>') ?>
|
||||
</ul>
|
||||
<div class="card-footer bg-body small text-body-secondary">Everything else is yours, as it was.</div>
|
||||
|
||||
@@ -72,7 +72,7 @@ if (!$row) { ?>
|
||||
<tr>
|
||||
<td class="font-monospace small text-break"><?= escapeHtml($endpoint['endpoint'] !== '' ? $endpoint['endpoint'] : '-') ?></td>
|
||||
<td class="text-end small text-nowrap"><?= number_format(intval($endpoint['calls'])) ?></td>
|
||||
<td class="text-end small text-body-secondary text-nowrap" title="<?= escapeHtml($endpoint['last_at']) ?>"><?= escapeHtml(timeAgo($endpoint['last_at'])) ?></td>
|
||||
<td class="text-end small text-body-secondary text-nowrap" title="<?= formatDateTime($endpoint['last_at']) ?>"><?= escapeHtml(timeAgo($endpoint['last_at'])) ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
@@ -88,7 +88,7 @@ if (!$row) { ?>
|
||||
<?php foreach ($ips as $ip) { ?>
|
||||
<li class="d-flex justify-content-between gap-2 py-1 border-bottom">
|
||||
<a class="font-monospace" href="/admin/audit_logs.php?q=<?= urlencode($ip['ip']) ?>" title="Everything from it in the audit log"><?= escapeHtml($ip['ip']) ?></a>
|
||||
<span class="text-body-secondary text-nowrap" title="<?= escapeHtml($ip['last_at']) ?>"><?= escapeHtml(timeAgo($ip['last_at'])) ?></span>
|
||||
<span class="text-body-secondary text-nowrap" title="<?= formatDateTime($ip['last_at']) ?>"><?= escapeHtml(timeAgo($ip['last_at'])) ?></span>
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
|
||||
@@ -55,7 +55,7 @@ ob_start();
|
||||
<span class="itflow-asset-icon itflow-asset-icon-lg bg-<?= $style['tone'] ?>-subtle text-<?= $style['tone'] ?>-emphasis" aria-hidden="true"><i class="<?= appLogCategoryIcon($category) ?>"></i></span>
|
||||
<div class="min-w-0 flex-grow-1">
|
||||
<h5 class="modal-title fw-semibold text-break"><?= escapeHtml($category !== '' ? $category : 'No category') ?> · <?= $style['one'] ?></h5>
|
||||
<div class="small text-body-secondary mt-1"><?= escapeHtml(date('D, M j, Y \a\t g:i:s A', $created)) ?> · <?= escapeHtml(timeAgo($row['app_log_created_at'])) ?></div>
|
||||
<div class="small text-body-secondary mt-1"><?= escapeHtml(date('D, M j, Y g:i:s A', $created)) ?> · <?= escapeHtml(timeAgo($row['app_log_created_at'])) ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" class="btn-close btn-close-white ms-3" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
@@ -90,7 +90,7 @@ ob_start();
|
||||
</div>
|
||||
<div class="itflow-glance-item" title="When">
|
||||
<i class="fas fa-fw fa-clock"></i>
|
||||
<span class="font-monospace small"><?= escapeHtml($row['app_log_created_at']) ?></span>
|
||||
<span class="font-monospace small"><?= formatDateTime($row['app_log_created_at'], true) ?></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -106,7 +106,7 @@ ob_start();
|
||||
<div class="list-group">
|
||||
<?php foreach ($around as $entry) { ?>
|
||||
<a href="#" class="list-group-item list-group-item-action d-flex align-items-start gap-2 small ajax-modal" data-modal-size="lg" data-modal-url="/admin/modals/app_log/app_log.php?id=<?= intval($entry['app_log_id']) ?>">
|
||||
<span class="text-body-secondary text-nowrap flex-shrink-0" style="min-width: 4.5rem;" title="<?= escapeHtml($entry['app_log_created_at']) ?>"><?= escapeHtml(date('g:i:s A', strtotime($entry['app_log_created_at']))) ?></span>
|
||||
<span class="text-body-secondary text-nowrap flex-shrink-0" style="min-width: 4.5rem;" title="<?= formatDateTime($entry['app_log_created_at'], true) ?>"><?= escapeHtml(date('g:i:s A', strtotime($entry['app_log_created_at']))) ?></span>
|
||||
<span class="flex-shrink-0"><?= appLogLevelPill($entry['app_log_type']) ?></span>
|
||||
<span class="text-break"><span class="fw-semibold"><?= escapeHtml((string) $entry['app_log_category']) ?></span> <?= escapeHtml(mb_strimwidth((string) $entry['app_log_details'], 0, 160, '…')) ?></span>
|
||||
</a>
|
||||
@@ -131,7 +131,7 @@ ob_start();
|
||||
<div class="list-group">
|
||||
<?php foreach ($audit as $entry) { ?>
|
||||
<a href="#" class="list-group-item list-group-item-action d-flex align-items-start gap-2 small ajax-modal" data-modal-size="lg" data-modal-url="/admin/modals/audit_log/audit_log.php?id=<?= intval($entry['log_id']) ?>">
|
||||
<span class="text-body-secondary text-nowrap flex-shrink-0" style="min-width: 4.5rem;" title="<?= escapeHtml($entry['log_created_at']) ?>"><?= escapeHtml(date('g:i:s A', strtotime($entry['log_created_at']))) ?></span>
|
||||
<span class="text-body-secondary text-nowrap flex-shrink-0" style="min-width: 4.5rem;" title="<?= formatDateTime($entry['log_created_at'], true) ?>"><?= escapeHtml(date('g:i:s A', strtotime($entry['log_created_at']))) ?></span>
|
||||
<span class="flex-shrink-0"><?= auditLogActionPill($entry['log_action']) ?></span>
|
||||
<span class="text-break"><?= escapeHtml($entry['log_description']) ?></span>
|
||||
</a>
|
||||
|
||||
@@ -65,7 +65,7 @@ $entry_line = function ($entry, $show_when_as = 'date') {
|
||||
$time = strtotime($entry['log_created_at']);
|
||||
$when = $show_when_as === 'time' ? date('g:i A', $time) : date('M j, Y g:i A', $time);
|
||||
return '<a href="#" class="list-group-item list-group-item-action d-flex align-items-start gap-2 small ajax-modal" data-modal-size="lg" data-modal-url="/admin/modals/audit_log/audit_log.php?id=' . intval($entry['log_id']) . '">'
|
||||
. '<span class="text-body-secondary text-nowrap flex-shrink-0" style="min-width: 4.5rem;" title="' . escapeHtml($entry['log_created_at']) . '">' . escapeHtml($when) . '</span>'
|
||||
. '<span class="text-body-secondary text-nowrap flex-shrink-0" style="min-width: 4.5rem;" title="' . formatDateTime($entry['log_created_at']) . '">' . escapeHtml($when) . '</span>'
|
||||
. '<span class="flex-shrink-0">' . auditLogActionPill($entry['log_action']) . '</span>'
|
||||
. '<span class="text-break">' . escapeHtml($entry['log_description']) . '</span>'
|
||||
. '</a>';
|
||||
@@ -80,7 +80,7 @@ ob_start();
|
||||
<span class="itflow-asset-icon itflow-asset-icon-lg bg-<?= $style['tone'] ?>-subtle text-<?= $style['tone'] ?>-emphasis" aria-hidden="true"><i class="fas <?= auditLogTypeIcon($type) ?>"></i></span>
|
||||
<div class="min-w-0 flex-grow-1">
|
||||
<h5 class="modal-title fw-semibold text-break"><?= escapeHtml($type) ?> · <?= escapeHtml($row['log_action']) ?></h5>
|
||||
<div class="small text-body-secondary mt-1"><?= escapeHtml(date('D, M j, Y \a\t g:i:s A', $created)) ?> · <?= escapeHtml(timeAgo($row['log_created_at'])) ?></div>
|
||||
<div class="small text-body-secondary mt-1"><?= escapeHtml(date('D, M j, Y g:i:s A', $created)) ?> · <?= escapeHtml(timeAgo($row['log_created_at'])) ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" class="btn-close btn-close-white ms-3" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
|
||||
@@ -91,7 +91,7 @@ ob_start();
|
||||
<?php } ?>
|
||||
|
||||
<dt>Added</dt>
|
||||
<dd><span title="<?= escapeHtml($user['user_created_at']) ?>"><?= escapeHtml(timeAgo($user['user_created_at'])) ?></span>
|
||||
<dd><span title="<?= formatDateTime($user['user_created_at']) ?>"><?= escapeHtml(timeAgo($user['user_created_at'])) ?></span>
|
||||
<?php if ($joined = userInviteJoined($user_id)) { ?>
|
||||
<span class="text-body-secondary" data-user-joined>· joined from <?= $joined['by'] !== '' ? escapeHtml($joined['by']) . "'s" : 'an' ?> invite</span>
|
||||
<?php } ?>
|
||||
@@ -99,7 +99,7 @@ ob_start();
|
||||
|
||||
<?php if ($is_archived) { ?>
|
||||
<dt>Archived</dt>
|
||||
<dd><span title="<?= escapeHtml($user['user_archived_at']) ?>"><?= escapeHtml(timeAgo($user['user_archived_at'])) ?></span></dd>
|
||||
<dd><span title="<?= formatDateTime($user['user_archived_at']) ?>"><?= escapeHtml(timeAgo($user['user_archived_at'])) ?></span></dd>
|
||||
<?php } ?>
|
||||
</dl>
|
||||
|
||||
|
||||
@@ -203,7 +203,7 @@ if (isset($_POST['add_holiday'])) {
|
||||
getBusinessHolidays(true);
|
||||
$restamped = restampOpenSlaTickets();
|
||||
|
||||
logAudit("Settings", "Create", "$session_name added SLA closure day $holiday_date - $holiday_name");
|
||||
logAudit("Settings", "Create", "$session_name added SLA closure day " . formatDate($holiday_date) . " - $holiday_name");
|
||||
|
||||
flashAlert("Closure day added" . ($restamped ? " - targets worked out again on " . $sla_open_tickets_text($restamped) : ''));
|
||||
|
||||
@@ -230,7 +230,7 @@ if (isset($_POST['delete_holiday'])) {
|
||||
getBusinessHolidays(true);
|
||||
$restamped = restampOpenSlaTickets();
|
||||
|
||||
logAudit("Settings", "Delete", "$session_name removed SLA closure day $holiday_date - $holiday_name");
|
||||
logAudit("Settings", "Delete", "$session_name removed SLA closure day " . formatDate($holiday_date) . " - $holiday_name");
|
||||
|
||||
flashAlert("Closure day removed" . ($restamped ? " - targets worked out again on " . $sla_open_tickets_text($restamped) : ''), 'error');
|
||||
|
||||
|
||||
@@ -136,9 +136,9 @@ $devices_in = intval(mysqli_fetch_row(mysqli_query($mysqli, "SELECT COUNT(*) FRO
|
||||
<?php if (!$provider['rmm_provider_sync_at']) { ?>
|
||||
<span class="text-body-secondary"><i class="fas fa-fw fa-info-circle me-1"></i>Not synced yet - link a client below and its devices come in straight away.</span>
|
||||
<?php } elseif (intval($provider['rmm_provider_sync_ok'])) { ?>
|
||||
<span><i class="fas fa-fw fa-check-circle text-success me-1"></i>Synced <span title="<?= escapeHtml($provider['rmm_provider_sync_at']) ?>"><?= escapeHtml(timeAgo($provider['rmm_provider_sync_at'])) ?></span> - <?= escapeHtml((string) $provider['rmm_provider_sync_note']) ?></span>
|
||||
<span><i class="fas fa-fw fa-check-circle text-success me-1"></i>Synced <span title="<?= formatDateTime($provider['rmm_provider_sync_at']) ?>"><?= escapeHtml(timeAgo($provider['rmm_provider_sync_at'])) ?></span> - <?= escapeHtml((string) $provider['rmm_provider_sync_note']) ?></span>
|
||||
<?php } else { ?>
|
||||
<span class="text-danger-emphasis"><i class="fas fa-fw fa-exclamation-circle me-1"></i>The sync <span title="<?= escapeHtml($provider['rmm_provider_sync_at']) ?>"><?= escapeHtml(timeAgo($provider['rmm_provider_sync_at'])) ?></span> didn't work: <?= escapeHtml((string) $provider['rmm_provider_sync_note']) ?></span>
|
||||
<span class="text-danger-emphasis"><i class="fas fa-fw fa-exclamation-circle me-1"></i>The sync <span title="<?= formatDateTime($provider['rmm_provider_sync_at']) ?>"><?= escapeHtml(timeAgo($provider['rmm_provider_sync_at'])) ?></span> didn't work: <?= escapeHtml((string) $provider['rmm_provider_sync_note']) ?></span>
|
||||
<?php } ?>
|
||||
<span class="text-body-secondary"><?= number_format($devices_in) ?> device<?= $devices_in === 1 ? '' : 's' ?> in ITFlow</span>
|
||||
</div>
|
||||
@@ -236,7 +236,7 @@ $devices_in = intval(mysqli_fetch_row(mysqli_query($mysqli, "SELECT COUNT(*) FRO
|
||||
</td>
|
||||
<td class="d-none d-lg-table-cell small text-nowrap">
|
||||
<?php if ($row['rmm_client_synced_at']) { ?>
|
||||
<span title="<?= escapeHtml($row['rmm_client_synced_at']) ?>"><?= escapeHtml(timeAgo($row['rmm_client_synced_at'])) ?></span>
|
||||
<span title="<?= formatDateTime($row['rmm_client_synced_at']) ?>"><?= escapeHtml(timeAgo($row['rmm_client_synced_at'])) ?></span>
|
||||
<?php } else { ?>
|
||||
<span class="text-body-secondary"><?= $linked ? 'Next sync' : '-' ?></span>
|
||||
<?php } ?>
|
||||
|
||||
@@ -184,7 +184,7 @@ $csrf = $_SESSION['csrf_token'];
|
||||
<?php } elseif (intval($row['rmm_provider_sync_ok'])) { ?>
|
||||
<span class="text-nowrap" title="<?= escapeHtml($row['rmm_provider_sync_at'] . ' - ' . $row['rmm_provider_sync_note']) ?>"><i class="fas fa-fw fa-check-circle text-success me-1"></i><?= escapeHtml(timeAgo($row['rmm_provider_sync_at'])) ?></span>
|
||||
<?php } else { ?>
|
||||
<div class="text-danger-emphasis text-nowrap" title="<?= escapeHtml($row['rmm_provider_sync_at']) ?>"><i class="fas fa-fw fa-exclamation-circle me-1"></i>Didn't work, <?= escapeHtml(timeAgo($row['rmm_provider_sync_at'])) ?></div>
|
||||
<div class="text-danger-emphasis text-nowrap" title="<?= formatDateTime($row['rmm_provider_sync_at']) ?>"><i class="fas fa-fw fa-exclamation-circle me-1"></i>Didn't work, <?= escapeHtml(timeAgo($row['rmm_provider_sync_at'])) ?></div>
|
||||
<div class="text-body-secondary text-truncate" style="max-width: 22rem;" title="<?= escapeHtml((string) $row['rmm_provider_sync_note']) ?>"><?= escapeHtml((string) $row['rmm_provider_sync_note']) ?></div>
|
||||
<?php } ?>
|
||||
</td>
|
||||
|
||||
@@ -218,7 +218,7 @@ $page_title = 'Saved Cards';
|
||||
</div>
|
||||
<?php } ?>
|
||||
</td>
|
||||
<td class="d-none d-lg-table-cell small text-body-secondary text-nowrap" title="<?= escapeHtml($row['saved_payment_created_at']) ?>"><?= escapeHtml(date('M j, Y', strtotime($row['saved_payment_created_at']))) ?></td>
|
||||
<td class="d-none d-lg-table-cell small text-body-secondary text-nowrap" title="<?= formatDateTime($row['saved_payment_created_at']) ?>"><?= escapeHtml(date('M j, Y', strtotime($row['saved_payment_created_at']))) ?></td>
|
||||
<td class="text-end pe-3">
|
||||
<div class="dropdown dropstart">
|
||||
<button class="btn btn-sm btn-light" title="More actions" type="button" data-bs-toggle="dropdown"><i class="fas fa-fw fa-ellipsis-v"></i></button>
|
||||
|
||||
@@ -74,7 +74,7 @@ echo settingsPageStart('notification');
|
||||
|
||||
<?php if (smsColumnExists('settings', 'config_sms_client_tickets')) {
|
||||
$sms_client = smsClientSettings(); ?>
|
||||
<?= settingsSectionStart('texts', 'Texts to clients', 'What ITFlow texts your clients by itself - only to contacts who agreed to texts, on their contact or in the client portal. Texts that would land between ' . date('ga', mktime(SMS_QUIET_FROM, 0)) . ' and ' . date('ga', mktime(SMS_QUIET_UNTIL, 0)) . ' wait for the morning. A reply to one about a ticket goes on the ticket.') ?>
|
||||
<?= settingsSectionStart('texts', 'Texts to clients', 'What ITFlow texts your clients by itself - only to contacts who agreed to texts, on their contact or in the client portal. Texts that would land between ' . date('g A', mktime(SMS_QUIET_FROM, 0)) . ' and ' . date('g A', mktime(SMS_QUIET_UNTIL, 0)) . ' wait for the morning. A reply to one about a ticket goes on the ticket.') ?>
|
||||
<?php if (!smsReady()) { ?>
|
||||
<div class="alert alert-light border py-2 small" data-notification-no-texting><i class="fas fa-info-circle me-2"></i>Texting isn't set up, so none of these go. <a href="text_messaging.php">Set up texting</a></div>
|
||||
<?php } ?>
|
||||
|
||||
@@ -290,7 +290,7 @@ $audit_url = function (array $query) use ($dates_query) {
|
||||
</td>
|
||||
<td class="d-none d-md-table-cell small">
|
||||
<?php if ($success) { ?>
|
||||
<div title="<?= escapeHtml($success['log_created_at']) ?>"><?= escapeHtml(timeAgo($success['log_created_at'])) ?></div>
|
||||
<div title="<?= formatDateTime($success['log_created_at']) ?>"><?= escapeHtml(timeAgo($success['log_created_at'])) ?></div>
|
||||
<div class="text-body-secondary"><span class="font-monospace"><?= escapeHtml($success['log_ip']) ?></span><?= auditLogDevice($success['log_user_agent']) !== '' ? ' · ' . escapeHtml(auditLogDevice($success['log_user_agent'])) : '' ?></div>
|
||||
<?php } else { ?>
|
||||
<span class="text-body-secondary">None<?= $dated ? ' in these dates' : '' ?></span>
|
||||
|
||||
@@ -362,18 +362,7 @@ $pill_url = function ($view) use ($on_days) {
|
||||
$resolution = intval($sla['sla_resolution_minutes']);
|
||||
$used = $used_text($sla);
|
||||
$default_priorities = $default_for[$sla_id] ?? [];
|
||||
$edit_url = "modals/sla/sla_edit.php?id=$sla_id";
|
||||
// What archiving it changes, for the confirmation - the part that differs from one SLA to the next first.
|
||||
// As getTicketSlaId() has it: a default that is archived gives nothing, and a contract's falls back to the default.
|
||||
$contracts_giving = intval($sla_used[$sla_id]['contracts'] ?? 0);
|
||||
$default_priorities_text = implode(' and ', array_filter([implode(', ', array_slice($default_priorities, 0, -1)), end($default_priorities) ?: '']));
|
||||
$gives = array_filter([
|
||||
$default_priorities ? "It is the default for $default_priorities_text tickets, which get no SLA from then on." : '',
|
||||
$contracts_giving ? number_format($contracts_giving) . ' contract' . ($contracts_giving === 1 ? ' gives' : 's give') . ' it - new tickets under ' . ($contracts_giving === 1 ? 'it' : 'them') . ' get the default for their priority instead.' : '',
|
||||
]);
|
||||
$open_tickets = intval($sla['n_tickets']);
|
||||
$archive_text = ($gives ? implode(' ', $gives) : 'New tickets no longer get it.') . ' '
|
||||
. ($open_tickets ? 'The ' . number_format($open_tickets) . ' open ticket' . ($open_tickets === 1 ? ' on it keeps its' : 's on it keep their') . ' targets.' : 'Tickets that have it keep their targets.'); ?>
|
||||
$edit_url = "modals/sla/sla_edit.php?id=$sla_id"; ?>
|
||||
<tr data-sla-id="<?= $sla_id ?>">
|
||||
<td class="ps-3">
|
||||
<div class="d-flex align-items-start gap-3">
|
||||
@@ -410,8 +399,7 @@ $pill_url = function ($view) use ($on_days) {
|
||||
<a class="dropdown-item" href="post.php?unarchive_sla=<?= $sla_id ?>&csrf_token=<?= $csrf ?>" data-sla-restore><i class="fas fa-fw fa-box-open text-secondary me-2"></i>Restore</a>
|
||||
<?php } else { ?>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item text-danger confirm-link" href="post.php?archive_sla=<?= $sla_id ?>&csrf_token=<?= $csrf ?>" data-sla-archive
|
||||
data-confirm-title="Archive <?= $name ?>?" data-confirm-text="<?= escapeHtml($archive_text) ?>" data-confirm-button="Archive">
|
||||
<a class="dropdown-item text-danger" href="post.php?archive_sla=<?= $sla_id ?>&csrf_token=<?= $csrf ?>">
|
||||
<i class="fas fa-fw fa-archive me-2"></i>Archive
|
||||
</a>
|
||||
<?php } ?>
|
||||
|
||||
@@ -353,10 +353,10 @@ $facts = array_filter([
|
||||
<div class="card-body">
|
||||
<dl class="row mb-0 small">
|
||||
<dt class="col-5 fw-normal text-secondary">Made</dt>
|
||||
<dd class="col-7 mb-2" title="<?= escapeHtml($template['software_template_created_at']) ?>"><?= date('M j, Y', strtotime($template['software_template_created_at'])) ?><?= $template['created_by_name'] !== null ? '<div class="text-secondary">' . escapeHtml($template['created_by_name']) . '</div>' : '' ?></dd>
|
||||
<dd class="col-7 mb-2" title="<?= formatDateTime($template['software_template_created_at']) ?>"><?= date('M j, Y', strtotime($template['software_template_created_at'])) ?><?= $template['created_by_name'] !== null ? '<div class="text-secondary">' . escapeHtml($template['created_by_name']) . '</div>' : '' ?></dd>
|
||||
<?php if ($template['software_template_updated_at']) { ?>
|
||||
<dt class="col-5 fw-normal text-secondary">Last changed</dt>
|
||||
<dd class="col-7 mb-0" title="<?= escapeHtml($template['software_template_updated_at']) ?>"><?= timeAgo($template['software_template_updated_at']) ?><?= $template['updated_by_name'] !== null ? '<div class="text-secondary">' . escapeHtml($template['updated_by_name']) . '</div>' : '' ?></dd>
|
||||
<dd class="col-7 mb-0" title="<?= formatDateTime($template['software_template_updated_at']) ?>"><?= timeAgo($template['software_template_updated_at']) ?><?= $template['updated_by_name'] !== null ? '<div class="text-secondary">' . escapeHtml($template['updated_by_name']) . '</div>' : '' ?></dd>
|
||||
<?php } ?>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
@@ -225,7 +225,7 @@ $csrf = $_SESSION['csrf_token'];
|
||||
<?php } ?>
|
||||
</td>
|
||||
<td class="d-none d-md-table-cell small text-body-secondary text-nowrap"<?= $row['last_used'] ? ' title="' . escapeHtml($row['last_used']) . '"' : '' ?>><?= $row['last_used'] ? timeAgo($row['last_used']) : '-' ?></td>
|
||||
<td class="d-none d-lg-table-cell small text-body-secondary text-nowrap" title="<?= escapeHtml($row['changed_at']) ?>">
|
||||
<td class="d-none d-lg-table-cell small text-body-secondary text-nowrap" title="<?= formatDateTime($row['changed_at']) ?>">
|
||||
<?= timeAgo($row['changed_at']) ?>
|
||||
<?php if ($row['changed_by'] !== null) { ?><div><?= escapeHtml($row['changed_by']) ?></div><?php } ?>
|
||||
</td>
|
||||
|
||||
@@ -136,7 +136,7 @@ $csrf = $_SESSION['csrf_token'];
|
||||
</td>
|
||||
<td class="d-none d-md-table-cell small text-nowrap" data-sms-last-in>
|
||||
<?php if ($row['sms_provider_last_inbound_at']) { ?>
|
||||
<span title="<?= escapeHtml($row['sms_provider_last_inbound_at']) ?>"><?= escapeHtml(timeAgo($row['sms_provider_last_inbound_at'])) ?></span>
|
||||
<span title="<?= formatDateTime($row['sms_provider_last_inbound_at']) ?>"><?= escapeHtml(timeAgo($row['sms_provider_last_inbound_at'])) ?></span>
|
||||
<?php } else { ?>
|
||||
<span class="text-body-secondary">None yet - text the number to try it</span>
|
||||
<?php } ?>
|
||||
|
||||
@@ -480,7 +480,7 @@ $hero = [
|
||||
<span class="text-body-secondary">Last checked</span>
|
||||
<span class="text-end">
|
||||
<?php if (!empty($update_checked_at)) { ?>
|
||||
<span title="<?= escapeHtml($update_checked_at) ?>"><?= escapeHtml(timeAgo($update_checked_at)) ?></span>
|
||||
<span title="<?= formatDateTime($update_checked_at) ?>"><?= escapeHtml(timeAgo($update_checked_at)) ?></span>
|
||||
<?php } else { ?>
|
||||
<span class="text-body-secondary">Never</span>
|
||||
<?php } ?>
|
||||
@@ -490,7 +490,7 @@ $hero = [
|
||||
<span class="text-body-secondary">Last updated</span>
|
||||
<span class="text-end">
|
||||
<?php if (!empty($update_job['cron_job_last_finished_at']) && in_array($update_status, ['Completed', 'Failed'], true)) { ?>
|
||||
<span title="<?= escapeHtml($update_job['cron_job_last_finished_at']) ?>"><?= escapeHtml(timeAgo($update_job['cron_job_last_finished_at'])) ?></span>
|
||||
<span title="<?= formatDateTime($update_job['cron_job_last_finished_at']) ?>"><?= escapeHtml(timeAgo($update_job['cron_job_last_finished_at'])) ?></span>
|
||||
<?php if ($update_status === 'Failed') { ?><span class="badge bg-danger-subtle text-danger-emphasis ms-1">Failed</span><?php } ?>
|
||||
<?php } else { ?>
|
||||
<span class="text-body-secondary">Not from this page yet</span>
|
||||
|
||||
@@ -625,7 +625,7 @@ $csrf = $_SESSION['csrf_token'];
|
||||
|
||||
<!-- Who sent it, and how -->
|
||||
<td class="d-none d-lg-table-cell small">
|
||||
<div><?= escapeHtml(userInviteBy($invite) !== '' ? userInviteBy($invite) : 'Someone no longer here') ?> <span class="text-body-secondary" title="<?= escapeHtml($invite['invite_created_at']) ?>">· <?= escapeHtml(timeAgo($invite['invite_created_at'])) ?></span></div>
|
||||
<div><?= escapeHtml(userInviteBy($invite) !== '' ? userInviteBy($invite) : 'Someone no longer here') ?> <span class="text-body-secondary" title="<?= formatDateTime($invite['invite_created_at']) ?>">· <?= escapeHtml(timeAgo($invite['invite_created_at'])) ?></span></div>
|
||||
<div class="text-body-secondary">
|
||||
<?php if ($invite_sent) { ?>
|
||||
<i class="fas fa-fw fa-envelope me-1"></i><span title="<?= escapeHtml((string) $invite['invite_sent_at']) ?>">Emailed <?= escapeHtml(timeAgo($invite['invite_sent_at'])) ?></span><?= $invite_sent > 1 ? " · $invite_sent times" : '' ?>
|
||||
@@ -759,7 +759,7 @@ $csrf = $_SESSION['csrf_token'];
|
||||
<div class="small text-body-secondary mt-1 text-nowrap" title="Browsers that skip the MFA code - remember me, at sign in"><i class="fas fa-fw fa-laptop me-1"></i><?= $remember_count ?> remembered browser<?= $remember_count === 1 ? '' : 's' ?></div>
|
||||
<?php } ?>
|
||||
<?php if ($is_archived) { ?>
|
||||
<div class="small text-body-secondary mt-1" title="<?= escapeHtml($row['user_archived_at']) ?>"><?= escapeHtml(timeAgo($row['user_archived_at'])) ?></div>
|
||||
<div class="small text-body-secondary mt-1" title="<?= formatDateTime($row['user_archived_at']) ?>"><?= escapeHtml(timeAgo($row['user_archived_at'])) ?></div>
|
||||
<?php } ?>
|
||||
</td>
|
||||
|
||||
|
||||
@@ -295,7 +295,7 @@ foreach (vendorTemplateFieldLabels() as $field) {
|
||||
<span class="text-body-secondary">-</span>
|
||||
<?php } ?>
|
||||
</td>
|
||||
<td class="d-none d-lg-table-cell small text-body-secondary text-nowrap" title="<?= escapeHtml($vendor['created_at']) ?>"><?= date('M j, Y', strtotime($vendor['created_at'])) ?></td>
|
||||
<td class="d-none d-lg-table-cell small text-body-secondary text-nowrap" title="<?= formatDateTime($vendor['created_at']) ?>"><?= date('M j, Y', strtotime($vendor['created_at'])) ?></td>
|
||||
<td class="text-end pe-3">
|
||||
<div class="dropdown dropstart">
|
||||
<button class="btn btn-sm btn-light" title="More actions" type="button" data-bs-toggle="dropdown"><i class="fas fa-fw fa-ellipsis-v"></i></button>
|
||||
@@ -461,10 +461,10 @@ foreach (vendorTemplateFieldLabels() as $field) {
|
||||
<div class="card-body">
|
||||
<dl class="row mb-0 small">
|
||||
<dt class="col-5 fw-normal text-secondary">Made</dt>
|
||||
<dd class="col-7 mb-2" title="<?= escapeHtml($template['vendor_template_created_at']) ?>"><?= date('M j, Y', strtotime($template['vendor_template_created_at'])) ?><?= $template['created_by_name'] !== null ? '<div class="text-secondary">' . escapeHtml($template['created_by_name']) . '</div>' : '' ?></dd>
|
||||
<dd class="col-7 mb-2" title="<?= formatDateTime($template['vendor_template_created_at']) ?>"><?= date('M j, Y', strtotime($template['vendor_template_created_at'])) ?><?= $template['created_by_name'] !== null ? '<div class="text-secondary">' . escapeHtml($template['created_by_name']) . '</div>' : '' ?></dd>
|
||||
<?php if ($template['vendor_template_updated_at']) { ?>
|
||||
<dt class="col-5 fw-normal text-secondary">Last changed</dt>
|
||||
<dd class="col-7 mb-0" title="<?= escapeHtml($template['vendor_template_updated_at']) ?>"><?= timeAgo($template['vendor_template_updated_at']) ?><?= $template['updated_by_name'] !== null ? '<div class="text-secondary">' . escapeHtml($template['updated_by_name']) . '</div>' : '' ?></dd>
|
||||
<dd class="col-7 mb-0" title="<?= formatDateTime($template['vendor_template_updated_at']) ?>"><?= timeAgo($template['vendor_template_updated_at']) ?><?= $template['updated_by_name'] !== null ? '<div class="text-secondary">' . escapeHtml($template['updated_by_name']) . '</div>' : '' ?></dd>
|
||||
<?php } ?>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
@@ -260,7 +260,7 @@ $csrf = $_SESSION['csrf_token'];
|
||||
<?php } ?>
|
||||
</td>
|
||||
<td class="d-none d-md-table-cell small text-body-secondary text-nowrap"<?= $row['last_used'] ? ' title="' . escapeHtml($row['last_used']) . '"' : '' ?>><?= $row['last_used'] ? timeAgo($row['last_used']) : '-' ?></td>
|
||||
<td class="d-none d-lg-table-cell small text-body-secondary text-nowrap" title="<?= escapeHtml($row['changed_at']) ?>">
|
||||
<td class="d-none d-lg-table-cell small text-body-secondary text-nowrap" title="<?= formatDateTime($row['changed_at']) ?>">
|
||||
<?= timeAgo($row['changed_at']) ?>
|
||||
<?php if ($row['changed_by'] !== null) { ?><div><?= escapeHtml($row['changed_by']) ?></div><?php } ?>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user