Admin messages use the same colours as the rest of ITFlow - red after archiving, removing, unlinking or cancelling something and green after restoring it or Undo - covering tags, categories, custom links, payment methods, roles, SLAs, ticket statuses, starter content, offices, closure days, backups, app logs, RMM clients, invites, queued emails and texts, and the company logo

This commit is contained in:
johnnyq
2026-11-20 17:59:26 -05:00
parent 478c8edcc8
commit c1bdc99c14
17 changed files with 21 additions and 21 deletions

View File

@@ -188,7 +188,7 @@ Update from Maintenance > Update — Queue Update hands the job to cron, which u
- Projects: a project has a Timeline - its booked tickets as bars in time, from its start to its due date, with now marked. A booking that is past and still open shows in amber, and two of the same agent's at the same time are flagged. Its open tickets with no booking are listed under it, with Book.
- Pickers: long lists of clients, contacts, vendors, categories, locations, assets, technicians, projects, accounts and products start with the last five you picked in a field like it, under Recent, above All. Typing searches everything as before.
- Archived: Tools > Archived lists what was archived lately - clients, contacts, locations, vendors, assets, credentials, documents, files, domains, certificates, networks, racks, services, licenses, projects and products - newest first, with who archived each one, to restore one or several at once. The last 30 days to start with, or pick another time, a kind or a client.
- Undo: archiving no longer asks "Are you sure?" - the message that says it's done has Undo instead, as do moves and changes to several records at once. The message stays up for ten seconds, or as long as the pointer is on it, and only its x closes it - set apart from Undo, so a click that just misses Undo doesn't lose it. Undo covers archiving one or several of every kind Archived lists, bringing back what archiving took with it - a contact's roles, a document's links, a client's recurring invoices; moving files, documents and folders, dragged or with Move; dragging kit on a rack; and the bulk changes to a ticket's priority, category or project, an asset's location, physical location, contact or status, a contact's location, department, phone number or roles, a client's industry or referral, a project's manager or due date, an invoice's or product's category, and an IP address's type. In Admin, Undo is on archiving tags and categories (one or several), canned responses, ticket, project, document, vendor, license and contract templates, roles, payment methods (a default it stopped being comes back with it), SLAs, custom links, portal announcements and banners, on archiving a tax, and on switching off a ticket status - those last two when nothing was moved to another. A payment method is archived without asking first now. Undo works once and only for whoever made the change, and leaves anything changed again since as it is, saying how many. Archiving a client still asks first, and has no Undo when it withdrew a contract out for signing.
- Undo: archiving no longer asks "Are you sure?" - the message that says it's done has Undo instead, as do moves and changes to several records at once. The message stays up for ten seconds, or as long as the pointer is on it, and only its x closes it - set apart from Undo, so a click that just misses Undo doesn't lose it. Undo covers archiving one or several of every kind Archived lists, bringing back what archiving took with it - a contact's roles, a document's links, a client's recurring invoices; moving files, documents and folders, dragged or with Move; dragging kit on a rack; and the bulk changes to a ticket's priority, category or project, an asset's location, physical location, contact or status, a contact's location, department, phone number or roles, a client's industry or referral, a project's manager or due date, an invoice's or product's category, and an IP address's type. In Admin, Undo is on archiving tags and categories (one or several), canned responses, ticket, project, document, vendor, license and contract templates, roles, payment methods (a default it stopped being comes back with it), SLAs, custom links, portal announcements and banners, on archiving a tax, and on switching off a ticket status - those last two when nothing was moved to another. A payment method is archived without asking first now. In Admin, as everywhere else, the message after archiving, removing, unlinking or cancelling something is red and the one after restoring it or Undo is green. Undo works once and only for whoever made the change, and leaves anything changed again since as it is, saying how many. Archiving a client still asks first, and has no Undo when it withdrew a contract out for signing.
- Client portal: one Search box in the top bar looks through the client's tickets - their subject, number and what was said on them - the documents you share with them and your Help articles at once, the first eight of each with See all. Nothing found offers Ask us, and a search with no Help article goes on the Knowledge Base's Not found list.
- Client portal: a ticket says when to expect your first reply - We'll reply by and the time, from its SLA - until you reply, while it isn't on hold and the time is still ahead. New ticket says how soon you reply to each priority, beside the priority and under What happens next. Without SLAs nothing is promised.
- Users: Invite several, beside New User, invites a list of people at once with one role (and office, and whether two-step sign-in is required) - one per line, as a name and email or just the email. Each gets their own invite email; anyone who already has an account is skipped and named. It needs email set up.

View File

@@ -69,7 +69,7 @@ if (isset($_POST['clear_app_logs'])) {
if ($cleared > 0) {
$what = lcfirst(appLogFiltersText($summary));
logAudit("App Log", "Delete", "$session_name cleared $cleared app log " . ($cleared === 1 ? 'entry' : 'entries') . ($all ? ' - all of them' : ' - ' . escapeSql($what)));
flashAlert("Cleared $cleared app log " . ($cleared === 1 ? 'entry' : 'entries'));
flashAlert("Cleared $cleared app log " . ($cleared === 1 ? 'entry' : 'entries'), 'error');
} else {
flashAlert('There was nothing to clear.', 'error');
}

View File

@@ -52,10 +52,10 @@ if (isset($_GET['delete_backup'])) {
// One still waiting has no file yet - taking it off the queue is all there is to it
if ($row['backup_status'] === 'Pending') {
logAudit("Backup", "Delete", ($session_name ?? 'Unknown User') . " took a queued " . backupTypeLabel($row['backup_type']) . " off the queue");
flashAlert(backupTypeLabel($row['backup_type']) . " taken off the queue.");
flashAlert(backupTypeLabel($row['backup_type']) . " taken off the queue.", 'error');
} else {
logAudit("Backup", "Delete", ($session_name ?? 'Unknown User') . " deleted backup " . escapeSql($row['backup_file_name']));
flashAlert($row['backup_status'] === 'Complete' ? "Backup deleted." : "Backup removed from the list.");
flashAlert($row['backup_status'] === 'Complete' ? "Backup deleted." : "Backup removed from the list.", 'error');
}
} else {
flashAlert("Backup not found.", 'error');

View File

@@ -98,7 +98,7 @@ if (isset($_GET['archive_category'])) {
$used = categoryUsageFor($row['category_id']);
logAudit("Category", "Archive", "$session_name archived " . $category_kind_word($row) . " " . escapeSql($row['category_name']), 0, intval($row['category_id']));
flashAlert(ucfirst($category_kind_word($row)) . " <strong>" . escapeHtml($row['category_name']) . "</strong> archived - "
. ($used['all'] ? "it stays on the " . escapeHtml(categoryUsageText($row, $used)) . " that have it, but isn't offered for new ones" : "it isn't offered for new ones"));
. ($used['all'] ? "it stays on the " . escapeHtml(categoryUsageText($row, $used)) . " that have it, but isn't offered for new ones" : "it isn't offered for new ones"), 'error');
undoOfferArchived($undo, 'categor', $row['category_name'], [], 'y|ies');
}
@@ -262,7 +262,7 @@ if (isset($_POST['bulk_archive_categories']) || isset($_POST['bulk_restore_categ
$count++;
}
flashAlert(($archive ? "Archived " : "Restored ") . $count . ($count === 1 ? " category" : " categories") . ($archive && $count ? " - they stay on their records, but aren't offered for new ones" : ''));
flashAlert(($archive ? "Archived " : "Restored ") . $count . ($count === 1 ? " category" : " categories") . ($archive && $count ? " - they stay on their records, but aren't offered for new ones" : ''), $archive ? 'error' : 'success');
if ($undo) {
undoOfferArchived($undo, 'categor', '', [], 'y|ies');
}

View File

@@ -76,7 +76,7 @@ if (isset($_GET['archive_custom_link']) || isset($_GET['restore_custom_link']))
mysqli_query($mysqli, "UPDATE custom_links SET custom_link_archived_at = NULL, custom_link_order = " . customLinkNextOrder($row['custom_link_location']) . " WHERE custom_link_id = $custom_link_id");
}
logAudit("Custom Link", $archive ? "Archive" : "Restore", "$session_name " . ($archive ? 'archived' : 'restored') . " custom link " . escapeSql($row['custom_link_name']), 0, $custom_link_id);
flashAlert("Link <strong>" . escapeHtml($row['custom_link_name']) . "</strong> " . ($archive ? 'archived - it no longer shows in its menu' : 'restored'));
flashAlert("Link <strong>" . escapeHtml($row['custom_link_name']) . "</strong> " . ($archive ? 'archived - it no longer shows in its menu' : 'restored'), $archive ? 'error' : 'success');
if ($undo) {
undoOfferArchived($undo, '', $row['custom_link_name']);
}

View File

@@ -54,7 +54,7 @@ foreach ($mail_queue_actions as $mail_queue_action => [$one_key, $bulk_key, $don
};
if ($count === $asked) {
$note = $done_note[$count === 1 ? 0 : 1];
flashAlert(ucfirst($done_word) . " <strong>$count</strong> " . $email_word($count) . ($note !== '' ? " - $note" : ''), $mail_queue_action === 'delete' ? 'error' : 'success');
flashAlert(ucfirst($done_word) . " <strong>$count</strong> " . $email_word($count) . ($note !== '' ? " - $note" : ''), $mail_queue_action === 'retry' ? 'success' : 'error');
} elseif ($count) {
flashAlert(ucfirst($done_word) . " <strong>$count</strong> of $asked " . $email_word($asked) . ". $why_not", 'warning');
} else {

View File

@@ -39,7 +39,7 @@ if (isset($_GET['remove_office'])) {
}
logAudit("Settings", "Delete", "$session_name removed the office " . escapeSql($name));
flashAlert("Removed the office <strong>" . escapeHtml($name) . "</strong> - those who worked there are in the main office now");
flashAlert("Removed the office <strong>" . escapeHtml($name) . "</strong> - those who worked there are in the main office now", 'error');
redirect('settings_company.php#section-offices');
}

View File

@@ -76,7 +76,7 @@ if (isset($_GET['archive_payment_method']) || isset($_GET['restore_payment_metho
$cleared = paymentMethodSetArchived($row, $archive);
$no_longer = $cleared ? ' - no longer the default for ' . implode(' or ', array_map(function ($way) { return $way === 'in' ? 'payments' : 'expenses'; }, $cleared)) : '';
logAudit("Payment Method", $archive ? "Archive" : "Restore", "$session_name " . ($archive ? 'archived' : 'restored') . " payment method " . escapeSql($row['payment_method_name']) . $no_longer, 0, intval($row['payment_method_id']));
flashAlert("Payment method <strong>" . escapeHtml($row['payment_method_name']) . "</strong> " . ($archive ? "archived - it isn't offered any more$no_longer" : 'restored'));
flashAlert("Payment method <strong>" . escapeHtml($row['payment_method_name']) . "</strong> " . ($archive ? "archived - it isn't offered any more$no_longer" : 'restored'), $archive ? 'error' : 'success');
if ($undo) {
undoOfferArchived($undo, '', $row['payment_method_name'], [$defaults]);
}

View File

@@ -261,7 +261,7 @@ if (isset($_GET['unlink_rmm_client'])) {
$rmm_client_id = intval($rmm_client['rmm_client_id']);
mysqli_query($mysqli, "UPDATE rmm_clients SET rmm_client_client_id = 0, rmm_client_synced_at = NULL WHERE rmm_client_id = $rmm_client_id");
logAudit("RMM Provider", "Unlink", "$session_name unlinked " . escapeSql(rmmProviderName($rmm_client) . " client {$rmm_client['rmm_client_name']} from " . $rmm_client['client_name']), intval($rmm_client['rmm_client_client_id']), intval($rmm_client['rmm_client_provider_id']));
flashAlert('<strong>' . escapeHtml($rmm_client['rmm_client_name']) . '</strong> unlinked - its devices no longer come in. Their assets stay.');
flashAlert('<strong>' . escapeHtml($rmm_client['rmm_client_name']) . '</strong> unlinked - its devices no longer come in. Their assets stay.', 'error');
redirect('rmm_clients.php?provider_id=' . intval($rmm_client['rmm_client_provider_id']));
}

View File

@@ -83,7 +83,7 @@ if (isset($_GET['archive_role'])) {
logAudit("User Role", "Archive", "$session_name archived role " . escapeSql($row['role_name']), 0, $row['role_id']);
flashAlert("Role <strong>" . escapeHtml($row['role_name']) . "</strong> archived");
flashAlert("Role <strong>" . escapeHtml($row['role_name']) . "</strong> archived", 'error');
undoOfferArchived($undo, '', $row['role_name']);
redirect();

View File

@@ -89,7 +89,7 @@ if (isset($_GET['remove_company_logo'])) {
logAudit("Settings", "Edit", "$session_name took the company logo off");
flashAlert("The logo is taken off");
flashAlert("The logo is taken off", 'error');
redirect();

View File

@@ -96,7 +96,7 @@ if (isset($_GET['archive_sla'])) {
logAudit("SLA", "Archive", "$session_name archived SLA ID $sla_id");
flashAlert($sla_name !== '' ? "SLA <strong>" . escapeHtml($sla_name) . "</strong> archived" : "SLA archived");
flashAlert($sla_name !== '' ? "SLA <strong>" . escapeHtml($sla_name) . "</strong> archived" : "SLA archived", 'error');
undoOfferArchived($undo, 'SLA', $sla_name);
redirect();
@@ -232,7 +232,7 @@ if (isset($_POST['delete_holiday'])) {
logAudit("Settings", "Delete", "$session_name removed SLA closure day $holiday_date - $holiday_name");
flashAlert("Closure day removed" . ($restamped ? " - targets worked out again on " . $sla_open_tickets_text($restamped) : ''));
flashAlert("Closure day removed" . ($restamped ? " - targets worked out again on " . $sla_open_tickets_text($restamped) : ''), 'error');
redirect();

View File

@@ -90,7 +90,7 @@ if (isset($_POST['clear_starter_unused'])) {
if ($count) {
logAudit("Starter Content", "Archive", "$session_name archived $count unused from the starter $label pack");
flashAlert("Archived <strong>$count</strong> unused from " . escapeHtml($label));
flashAlert("Archived <strong>$count</strong> unused from " . escapeHtml($label), 'error');
undoOfferChanges($before, "<strong>{n}</strong> from " . escapeHtml($label) . " put back", 'module_client');
} else {
flashAlert("Nothing to archive - those are in use now, or already archived", 'info');

View File

@@ -82,7 +82,7 @@ if (isset($_GET['archive_tag'])) {
$used = tagUsage($row['tag_id']);
logAudit("Tag", "Archive", "$session_name archived " . $tag_kind_word($row) . " tag " . escapeSql($row['tag_name']), 0, intval($row['tag_id']));
flashAlert("Tag <strong>" . escapeHtml($row['tag_name']) . "</strong> archived - "
. ($used ? "it stays on its " . $tag_records_text($used, $row['tag_type']) . ", but isn't offered for tagging" : "it isn't offered for tagging"));
. ($used ? "it stays on its " . $tag_records_text($used, $row['tag_type']) . ", but isn't offered for tagging" : "it isn't offered for tagging"), 'error');
undoOfferArchived($undo, 'tag', $row['tag_name']);
}
@@ -189,7 +189,7 @@ if (isset($_POST['bulk_archive_tags']) || isset($_POST['bulk_restore_tags'])) {
$count++;
}
flashAlert(($archive ? "Archived " : "Restored ") . $count . ($count === 1 ? " tag" : " tags") . ($archive && $count ? " - they stay on their records, but aren't offered for tagging" : ''));
flashAlert(($archive ? "Archived " : "Restored ") . $count . ($count === 1 ? " tag" : " tags") . ($archive && $count ? " - they stay on their records, but aren't offered for tagging" : ''), $archive ? 'error' : 'success');
if ($undo) {
undoOfferArchived($undo, 'tag');
}

View File

@@ -39,7 +39,7 @@ foreach (['retry' => 'retry_text', 'cancel' => 'cancel_text', 'delete' => 'delet
redirect();
}
logAudit("Text Message", ['retry' => 'Edit', 'cancel' => 'Edit', 'delete' => 'Delete'][$action], "$session_name " . ['retry' => 'retried', 'cancel' => 'cancelled', 'delete' => 'deleted'][$action] . " text " . intval($_GET[$key]));
flashAlert(['retry' => 'Text queued again - it goes at the next run of the Text Messages job', 'cancel' => 'Text cancelled - it won\'t be sent', 'delete' => 'Text deleted'][$action], $action === 'delete' ? 'error' : 'success');
flashAlert(['retry' => 'Text queued again - it goes at the next run of the Text Messages job', 'cancel' => 'Text cancelled - it won\'t be sent', 'delete' => 'Text deleted'][$action], $action === 'retry' ? 'success' : 'error');
redirect();
}
}

View File

@@ -132,7 +132,7 @@ if (isset($_POST['switch_off_ticket_status'])) {
$to_name = $moved ? ticketStatusesAll()[$move_to]['ticket_status_name'] : '';
logAudit("Ticket Status", "Edit", "$session_name switched off ticket status " . escapeSql($name) . ($moved ? ", moving $moved tickets to " . escapeSql($to_name) : ''), 0, intval($row['ticket_status_id']));
flashAlert("Status <strong>" . escapeHtml($name) . "</strong> switched off" . ($moved ? " - $moved " . ($moved === 1 ? 'ticket' : 'tickets') . " moved to <strong>" . escapeHtml($to_name) . "</strong>" : ''));
flashAlert("Status <strong>" . escapeHtml($name) . "</strong> switched off" . ($moved ? " - $moved " . ($moved === 1 ? 'ticket' : 'tickets') . " moved to <strong>" . escapeHtml($to_name) . "</strong>" : ''), 'error');
// Tickets moved to another status stay there - with none moved, Undo switches it back on
if (!$moved) {
undoOfferChanges($undo, '<strong>' . escapeHtml($name) . '</strong> is switched on again', 'admin', 3);

View File

@@ -215,7 +215,7 @@ if (isset($_GET['resend_user_invite']) || isset($_GET['link_user_invite']) || is
if ($what === 'cancel') {
userInviteCancel($invite_id);
logAudit("User", "Cancel", "$session_name cancelled the invite to $who");
flashAlert("Cancelled the invite to <strong>" . escapeHtml($invite['invite_email']) . "</strong> - its link no longer works");
flashAlert("Cancelled the invite to <strong>" . escapeHtml($invite['invite_email']) . "</strong> - its link no longer works", 'error');
redirect();
}