feat(helpdesk): add software updates tracking with BC ticket integration

New Updates page in the Helpdesk module that fetches UPDATE/UPDATE-HF tickets
from Business Central (PBI_LV_Tickets) and allows assigning a domain and Gitea
link via a dialog. Ticket status (from BC) and assignment status (local) are
shown as separate columns with filters for both plus type and free-text search.
Assigned updates also appear on the domain detail page. Includes session-cached
BC fetch with refresh button, admin permissions, migration, and 16 unit tests.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-16 13:21:40 +02:00
parent 693d33a0c8
commit da0abc824a
23 changed files with 1971 additions and 6 deletions

View File

@@ -0,0 +1,23 @@
CREATE TABLE IF NOT EXISTS `helpdesk_updates` (
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
`tenant_id` INT UNSIGNED NOT NULL,
`ticket_no` VARCHAR(30) NOT NULL,
`category_code` VARCHAR(30) NOT NULL,
`debitor_no` VARCHAR(30) NOT NULL,
`debitor_name` VARCHAR(255) NOT NULL DEFAULT '',
`domain_no` VARCHAR(30) NOT NULL DEFAULT '',
`domain_url` VARCHAR(255) NOT NULL DEFAULT '',
`gitea_path` VARCHAR(255) NOT NULL DEFAULT '',
`notes` TEXT NULL DEFAULT NULL,
`status` VARCHAR(20) NOT NULL DEFAULT 'open',
`created_by` INT UNSIGNED NOT NULL,
`updated_by` INT UNSIGNED NULL DEFAULT NULL,
`created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` DATETIME NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `uq_hu_ticket` (`tenant_id`, `ticket_no`),
KEY `idx_hu_tenant` (`tenant_id`),
KEY `idx_hu_domain` (`tenant_id`, `domain_no`),
KEY `idx_hu_status` (`tenant_id`, `status`),
KEY `idx_hu_debitor` (`tenant_id`, `debitor_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;