Skip to content

Commit

Permalink
rename blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
mdickson-adbe committed May 29, 2024
1 parent c0f0b12 commit f32b68a
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { decorateIcons, readBlockConfig } from '../../scripts/lib-franklin.js';
import { getQueryVariable } from '../../scripts/shared.js';
import { getProgramInfo } from '../../scripts/graphql.js';
import { resolveMappings, filterArray, getProductMapping } from '../../scripts/shared-mappings.js';
import { checkBlankString } from '../gmo-campaign-list/gmo-campaign-list.js'
import { resolveMappings, filterArray, getProductMapping, checkBlankString } from '../../scripts/shared-program.js';
import { getBaseConfigPath } from '../../scripts/site-config.js';
import { searchAsset } from '../../scripts/assets.js';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
.inputs-wrapper {
display: flex;
height: 50px;
padding-left: 10px;
}
.search-wrapper {
background-color: #FFF;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { readBlockConfig } from '../../scripts/lib-franklin.js';
import { decorateIcons } from '../../scripts/lib-franklin.js';
import { graphqlAllCampaignsFilter, graphqlCampaignCount, generateFilterJSON, getMappingInfo } from '../../scripts/graphql.js';
import { getProductMapping } from '../../scripts/shared-mappings.js'
import { getProductMapping, checkBlankString } from '../../scripts/shared-program.js'
import { getBaseConfigPath } from '../../scripts/site-config.js';
import { searchAsset } from '../../scripts/assets.js';

Expand Down Expand Up @@ -473,10 +473,12 @@ function sortColumn(dir, property) {
}

// supply dummy data if none present
/*
export function checkBlankString(string) {
if (string == undefined || string == '' ) {
return 'Not Available';
} else {
return string;
}
}
*/
13 changes: 12 additions & 1 deletion scripts/shared-mappings.js → scripts/shared-program.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,15 @@ export async function getProductMapping(product) {
label: productsText,
icon: icon
}
}
}

/*
* Check for undefined/blank property and supply 'Not Available' if no data
*/
export function checkBlankString(string) {
if (string == undefined || string == '' ) {
return 'Not Available';
} else {
return string;
}
}

0 comments on commit f32b68a

Please sign in to comment.