# Onboarding **File:** `Meesterproef-SNSimulation/js/Onboarding.js` ## Description The `Onboarding` class handles the onboarding process for new users. It displays a series of dialogs to guide users through the application and saves the completion status in local storage to ensure the onboarding process is not repeated for returning users. ## Methods - **Constructor**: Initializes the onboarding process, sets up event listeners for onboarding steps, and handles local storage to track completion status. - **Parameters:** None - **[View Code](https://github.com/JopMolenaar/Meesterproef-SNSimulation/blob/main/js/Onboarding.js#L1)** ### Event Listeners - **DOMContentLoaded**: Checks if the onboarding process is complete. If not, displays the first onboarding dialog. - **[View Code](https://github.com/JopMolenaar/Meesterproef-SNSimulation/blob/main/js/Onboarding.js#L3)** - **next1 click**: Closes the first onboarding dialog and shows the second dialog. - **[View Code](https://github.com/JopMolenaar/Meesterproef-SNSimulation/blob/main/js/Onboarding.js#L11)** - **skipOnboarding click**: Closes the first onboarding dialog, sets the onboarding completion flag in local storage, and skips the onboarding process. - **[View Code](https://github.com/JopMolenaar/Meesterproef-SNSimulation/blob/main/js/Onboarding.js#L16)** - **next2 click**: Closes the second onboarding dialog, hides it, and shows the third dialog. - **[View Code](https://github.com/JopMolenaar/Meesterproef-SNSimulation/blob/main/js/Onboarding.js#L22)** - **skipOnboarding2 click**: Closes the second onboarding dialog, sets the onboarding completion flag in local storage, hides it, and skips the onboarding process. - **[View Code](https://github.com/JopMolenaar/Meesterproef-SNSimulation/blob/main/js/Onboarding.js#L25)** - **next3 click**: Closes the third onboarding dialog and sets the onboarding completion flag in local storage. - **[View Code](https://github.com/JopMolenaar/Meesterproef-SNSimulation/blob/main/js/Onboarding.js#L29)** - **next3Button click**: Closes the third onboarding dialog when the next3 button is clicked. - **[View Code](https://github.com/JopMolenaar/Meesterproef-SNSimulation/blob/main/js/Onboarding.js#L36)** ### Local Storage - **onboardingComplete**: A flag stored in local storage to indicate whether the onboarding process has been completed. If this flag is not set or is false, the onboarding process will be shown to the user. - **[View Code](https://github.com/JopMolenaar/Meesterproef-SNSimulation/blob/main/js/Onboarding.js#L5)**