Merge branch 'develop' into feature/digital/SSR-330

This commit is contained in:
Kroell 2023-03-22 09:01:04 -04:00
commit 13d04efec3
2 changed files with 23 additions and 2 deletions

View file

@ -37,6 +37,7 @@ export function fetchCmsContentForPage(issPage) {
}; };
// Support method for processing the page data from the CMS call. // Support method for processing the page data from the CMS call.
// widgets = current widget collection used by page.
// baseResponse = contains the widgets from the base page. // baseResponse = contains the widgets from the base page.
// clientResponse = contains the widgets from the client override page. (null if none) // clientResponse = contains the widgets from the client override page. (null if none)
function processPageData(baseResponse, clientResponse) { function processPageData(baseResponse, clientResponse) {
@ -49,7 +50,7 @@ function processPageData(baseResponse, clientResponse) {
} }
else else
{ {
// Overide any base widgets with the client override widgets if found. // Override any base widgets with the client override widgets if found.
baseResponse.data.Result.forEach((baseWidget) => { baseResponse.data.Result.forEach((baseWidget) => {
let found = false; let found = false;
clientResponse.data.Result.forEach((clientWidget) => { clientResponse.data.Result.forEach((clientWidget) => {
@ -62,9 +63,28 @@ function processPageData(baseResponse, clientResponse) {
}); });
if ( !found ) if ( !found )
{
widgets.push(baseWidget); widgets.push(baseWidget);
}
}); });
// Add any unique client widgets that does not exist in the current main widgets collection.
clientResponse.data.Result.forEach((clientWidget) => {
let found = false;
widgets.forEach((currentWidget) => {
if ( clientWidget.Name == currentWidget.Name )
{
found = true;
}
});
if ( !found )
{
widgets.push(clientWidget);
}
});
} }
widgets.forEach((widget) => { widgets.forEach((widget) => {

View file

@ -69,6 +69,7 @@ export default {
z-index: 2; z-index: 2;
span { span {
font-weight: 500; font-weight: 500;
color: $black;
} }
} }