don't show included in when no mandatory addon
This commit is contained in:
parent
6c884b7804
commit
92af0a9627
3 changed files with 20 additions and 4 deletions
|
|
@ -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';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue