-
Notifications
You must be signed in to change notification settings - Fork 2
ScheduledMaintenanceComponent HTML
Ethan Dunzer edited this page May 22, 2024
·
2 revisions
The HTML template for the ScheduledMaintenanceComponent is responsible for the visual representation of scheduled maintenance alerts within a Salesforce application. It uses Lightning Web Components (LWC) to render modals, accordions, and badges based on the state managed in the JavaScript code.
-
Modal Container: Wraps the entire modal content.
- Header: Contains the modal title and a close button if the modal is dismissible and not fully locked.
-
Content: Displays scheduled maintenance details in an accordion format if
isInMaintenanceis true, otherwise shows maintenance details in separate blocks. - Footer: Contains action buttons for navigation or dismissing the modal based on its dismissible status.
-
isModalOpen: Controls the visibility of the modal. -
isDismissible: Determines if the modal can be dismissed. -
isFullLock: Indicates if the application is fully locked due to maintenance. -
title: The title of the modal. -
isInMaintenance: Indicates if one of the records is in the maintenance window. -
activeSectionName: Stores the name of the active section in the accordion. -
scheduledMaintenances: The list of scheduled maintenance records.
-
Section: Represents the modal dialog with ARIA roles for accessibility.
-
Header:
-
Close Button: Conditional rendering based on
isDismissibleandisFullLock. Useslightning-iconfor the close icon. - Title: Displays the modal title.
- Warning Badge: Shown if the app is not dismissible.
-
Close Button: Conditional rendering based on
-
Content:
-
Accordion: Renders maintenance records in an accordion format if
isInMaintenanceis true. -
Blocks: Renders maintenance records in separate blocks if
isInMaintenanceis false.
-
Accordion: Renders maintenance records in an accordion format if
-
Footer:
- Navigate Button: Allows navigation to another app if the modal is not fully locked and not dismissible.
- Dismiss Button: Allows dismissing the modal if it is dismissible and not fully locked.
-
Header:
-
Modal Visibility: Controlled by
isModalOpen. -
Close Button and Dismiss Button: Rendered based on
isDismissibleandisFullLock. -
Accordion vs. Blocks: Rendered based on the
isInMaintenancestate. -
Badges: Rendered based on the
Dismissible__cproperty of each maintenance record.
The template works in tandem with the JavaScript code to display scheduled maintenance alerts dynamically. It ensures that the UI updates based on the current maintenance state and user interactions.