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>
17 lines
649 B
SQL
17 lines
649 B
SQL
-- Helpdesk module: assign updates permissions to Admin role.
|
|
-- Idempotent: safe to run multiple times.
|
|
|
|
INSERT INTO `role_permissions` (`role_id`, `permission_id`, `created`)
|
|
SELECT r.id, p.id, NOW()
|
|
FROM roles r
|
|
JOIN permissions p ON p.`key` = 'helpdesk.updates.view'
|
|
WHERE r.description IN ('Admin', 'Administrator') OR r.id = 1
|
|
ON DUPLICATE KEY UPDATE role_id = role_id;
|
|
|
|
INSERT INTO `role_permissions` (`role_id`, `permission_id`, `created`)
|
|
SELECT r.id, p.id, NOW()
|
|
FROM roles r
|
|
JOIN permissions p ON p.`key` = 'helpdesk.updates.manage'
|
|
WHERE r.description IN ('Admin', 'Administrator') OR r.id = 1
|
|
ON DUPLICATE KEY UPDATE role_id = role_id;
|