Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use current year in initial block, update msg #161

Merged
merged 1 commit into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion blocks/gmo-program-details/gmo-program-details.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ export default async function decorate(block) {
const audiences = buildAudienceList(program).outerHTML;
const artifactLinks = buildArtifactLinks(program).outerHTML;

const currentYear = new Date().getFullYear();

// Inject the additional HTML content
block.querySelector('.main-body-wrapper').innerHTML += `
<div class="tab-wrapper">
Expand Down Expand Up @@ -189,7 +191,7 @@ export default async function decorate(block) {
<img class="right" data-direction="right" src="/icons/chevron-right.svg"></img>
</div>
</div>
<div class="current-year" data-quarter="1" data-year="2024">2024</div>
<div class="current-year" data-quarter="1" data-year="${currentYear}">${currentYear}</div>
</div>
<div class="right-controls">
<div class="today-button">Today</div>
Expand Down
2 changes: 1 addition & 1 deletion scripts/program-calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export async function buildCalendar(dataObj, block, type, mappingArray, period)
if (deliverables.length === 0) {
const calendarTab = document.querySelector('.calendar.tab');
calendarTab.innerHTML = `
<div class="no-data-msg">Required Data is Unavailable.</div>
<div class="no-data-msg">Required Data is Unavailable for this view.</div>
`;
return;
}
Expand Down
Loading