feat(helpdesk): add handover protocol management

Implement handover protocols as a new entity in the helpdesk module,
allowing users to create fillable protocol records from admin-defined
software product schemas.

Key additions:
- DB migration (helpdesk_handovers table) with tenant scope
- HandoverService with status workflow (draft/in_progress/completed/archived)
- Three-tier permissions (view/create/manage)
- Two-step creation wizard (Stripe-style assistant)
- Grid.js list page with search and status filter
- Edit/detail page with aside metadata and status controls
- Reusable core autocomplete lookup component (app-lookup-field)
- Debitor lookup data endpoint for autocomplete
- Dynamic form rendering from schema snapshots
- 11 PHPUnit tests for HandoverService
- DE+EN i18n translations (48 keys each)

Also includes: PHPStan fixes (dead code removal, stale baseline cleanup),
software product edit title improvement, fieldset simplification,
and Stripe-style hover for schema preview.

Workflow: HD-HANDOVERS-001 (.agents/runs/HD-HANDOVERS-001/)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-15 20:42:41 +02:00
parent 57b7920098
commit a26c106083
34 changed files with 2572 additions and 91 deletions

View File

@@ -46,9 +46,22 @@ function init(root) {
clearElement(root);
if (fields.length === 0) {
const empty = document.createElement('p');
empty.className = 'handover-schema-empty';
empty.textContent = t.no_fields || 'No fields defined yet.';
const empty = document.createElement('div');
empty.className = 'handover-schema-empty-state';
const emptyText = document.createElement('p');
emptyText.textContent = t.no_fields || 'No fields defined yet.';
empty.appendChild(emptyText);
const addButton = document.createElement('button');
addButton.type = 'button';
addButton.className = 'secondary outline';
addButton.appendChild(createIcon('bi-plus-lg'));
addButton.appendChild(document.createTextNode(' ' + (t.add_field || 'Add field')));
addButton.addEventListener('click', () => {
fields.push({ type: 'text', key: '', label: '', required: false, options: [] });
render();
notifyChange();
});
empty.appendChild(addButton);
root.appendChild(empty);
} else {
const list = document.createElement('div');
@@ -60,9 +73,8 @@ function init(root) {
list.appendChild(buildFieldRow(field, index));
});
root.appendChild(list);
root.appendChild(buildInsertDivider(fields.length));
}
root.appendChild(buildInsertDivider(fields.length));
}
function buildInsertDivider(insertIndex) {
@@ -314,7 +326,7 @@ function init(root) {
if (field.type === 'checkbox') {
const input = document.createElement('input');
input.type = 'checkbox';
input.disabled = true;
input.addEventListener('click', (e) => e.preventDefault());
group.appendChild(input);
const label = document.createElement('label');
label.textContent = field.label || '';