don't show included in when no mandatory addon

This commit is contained in:
Tobias Brunner 2025-07-16 11:00:35 +02:00
parent 6c884b7804
commit 92af0a9627
Signed by: tobru
SSH key fingerprint: SHA256:kOXg1R6c11XW3/Pt9dbLdQvOJGFAy+B2K6v6PtRWBGQ
3 changed files with 20 additions and 4 deletions

View file

@ -85,14 +85,28 @@ class UIManager {
// Update addon pricing display in the results panel
updateAddonPricingDisplay(domManager, mandatoryAddons, selectedOptionalAddons) {
// Update mandatory addons in the managed service includes container
// Get references to the managed service includes elements
const managedServiceIncludesContainer = domManager.get('managedServiceIncludesContainer');
const managedServiceIncludes = domManager.get('managedServiceIncludes');
const managedServiceToggleButton = domManager.get('managedServiceToggleButton');
if (managedServiceIncludesContainer) {
// Clear existing content
managedServiceIncludesContainer.innerHTML = '';
// Show/hide the entire managed service includes section based on mandatory addons
const hasMandatoryAddons = mandatoryAddons && mandatoryAddons.length > 0;
if (managedServiceIncludes) {
managedServiceIncludes.style.display = hasMandatoryAddons ? 'block' : 'none';
}
if (managedServiceToggleButton) {
managedServiceToggleButton.style.display = hasMandatoryAddons ? 'inline-block' : 'none';
}
// Add mandatory addons to the managed service includes section
if (mandatoryAddons && mandatoryAddons.length > 0) {
if (hasMandatoryAddons) {
mandatoryAddons.forEach(addon => {
const addonRow = document.createElement('div');
addonRow.className = 'd-flex justify-content-between small text-muted mb-1';