');
+
+ // Horizontal rules (--- or ***)
+ html = html.replace(/^(?:---|___|\*\*\*)$/gm, '');
+
+ // Line breaks (two spaces at end of line or double newline)
+ html = html.replace(/ \n/g, ' ');
+ html = html.replace(/\n\n/g, '
');
+
+ // Wrap in paragraph if not already wrapped
+ if (!html.startsWith('<')) {
+ html = '
' + html + '
';
+ }
+
+ return html;
+}
+
+// Apply markdown rendering to all elements with data-markdown attribute
+function renderMarkdownElements() {
+ document.querySelectorAll('[data-markdown]').forEach(element => {
+ const markdownText = element.getAttribute('data-markdown') || element.textContent;
+ element.innerHTML = parseMarkdown(markdownText);
+ });
+}
+
+// Apply markdown to description and comments on page load
+document.addEventListener('DOMContentLoaded', renderMarkdownElements);
+
+// Expose for manual use
+window.parseMarkdown = parseMarkdown;
+window.renderMarkdownElements = renderMarkdownElements;
diff --git a/models/BulkOperationsModel.php b/models/BulkOperationsModel.php
index 34df0f2..6c5c8d8 100644
--- a/models/BulkOperationsModel.php
+++ b/models/BulkOperationsModel.php
@@ -150,14 +150,6 @@ class BulkOperationsModel {
}
}
break;
-
- case 'bulk_delete':
- $success = $ticketModel->deleteTicket($ticketId);
- if ($success) {
- $auditLogModel->log($operation['performed_by'], 'delete', 'ticket', $ticketId,
- ['bulk_operation_id' => $operationId]);
- }
- break;
}
if ($success) {
diff --git a/views/DashboardView.php b/views/DashboardView.php
index 56377c9..2d2823b 100644
--- a/views/DashboardView.php
+++ b/views/DashboardView.php
@@ -262,7 +262,6 @@
-