Merged PR 1910: feat(remission-list, ui-tooltip): add info tooltip with performance optimization

feat(remission-list, ui-tooltip): add info tooltip with performance optimization

Add tooltip to department capacity info button with enhanced trigger management.
Optimize department list fetching to only load when search input or department
filter is active, improving initial load performance.

- Add tooltip directive to info button showing capacity details
- Implement conditional department list fetching based on input/filter presence
- Enhance tooltip directive with improved trigger management and positioning
- Update tooltip component to use modern Angular control flow syntax
- Add proper show/hide logic with trigger-specific behavior

Refs: #5255
This commit is contained in:
Nino Righi
2025-08-06 16:02:27 +00:00
committed by Andreas Schickinger
parent a0f24aac17
commit d22e320294
5 changed files with 114 additions and 54 deletions

View File

@@ -3,11 +3,14 @@
{{ title() }}
</div>
}
<div class="ui-tooltip-content">
@let t = template();
@if (t) {
<ng-container *ngTemplateOutlet="t"></ng-container>
} @else {
{{ text() }}
}
</div>
@if (text() || template()) {
<div class="ui-tooltip-content">
@let t = template();
@if (t) {
<ng-container *ngTemplateOutlet="t"></ng-container>
} @else {
{{ text() }}
}
</div>
}

View File

@@ -82,8 +82,8 @@ export class TooltipDirective implements OnDestroy {
/** Optional title for the tooltip. */
title = input<string>();
/** Content for the tooltip. Can be a string or a TemplateRef. This input is required. */
content = input.required<string | TemplateRef<unknown>>();
/** Content for the tooltip. Can be a string or a TemplateRef. */
content = input<string | TemplateRef<unknown>>();
/**
* Array of triggers that will cause the tooltip to show.