forked from episphere/dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from episphere/dev
Dev -> Stage Sync (December 2024)
- Loading branch information
Showing
25 changed files
with
1,207 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/** | ||
* When back button clicked, navigates user back to the data corrections tool selection page. | ||
* @returns {void} | ||
*/ | ||
export const handleBackToToolSelect = () => { | ||
const backToToolSelectButton = document.getElementById('backToToolSelect'); | ||
if (!backToToolSelectButton) return; | ||
|
||
backToToolSelectButton.addEventListener('click', () => { | ||
location.hash = '#dataCorrectionsToolSelection'; | ||
}); | ||
}; | ||
|
||
export const displayDataCorrectionsNavbar = () => { | ||
return `<div class="mt-4"> | ||
<div class="navTabsDataCorrectionsContainer"> | ||
<ul class="btn-group" id="dataCorrectionsTabsGroup"> | ||
<li> | ||
<a class="dataCorrectionLink" id="verificationCorrectionsTool" href="#verificationCorrectionsTool">Verification Corrections</a> | ||
</li> | ||
<li> | ||
<a class="dataCorrectionLink" id="surveyResetTool" href="#surveyResetTool">Survey Status Reset</a> | ||
</li> | ||
<li> | ||
<a class="dataCorrectionLink" id="incentiveEligibilityTool" href="#incentiveEligibilityTool">Incentive Eligibility</a> | ||
</li> | ||
</ul> | ||
</div> | ||
</div>`; | ||
}; | ||
|
||
export const setActiveDataCorrectionsTab = () => { | ||
const dataCorrectionsTabs = document.getElementById('dataCorrectionsTabsGroup'); | ||
if (!dataCorrectionsTabs) return; | ||
|
||
document.querySelectorAll(".dataCorrectionLink").forEach((link) => { | ||
link.classList.remove('active'); | ||
}); | ||
|
||
const activeLink = document.querySelector(`a[href="${location.hash}"]`); | ||
if (activeLink) activeLink.classList.add('active'); | ||
}; |
Oops, something went wrong.