Skip to content

Commit

Permalink
Removed hindering statement
Browse files Browse the repository at this point in the history
  • Loading branch information
LorenzoJokhan committed Apr 28, 2023
1 parent 9e09f78 commit 8e296da
Showing 1 changed file with 21 additions and 15 deletions.
36 changes: 21 additions & 15 deletions packages/cms/lib/modules/resource-representation-widgets/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,23 +106,29 @@ module.exports = {
.getConfig();
}

if (widget.activeResourceType === 'activeUser' && widget.displayType === 'user-activity') {
// console.log({resource: widget.activeResource});
// console.log({resourceType: widget.activeResourceType});
// console.log({type: widget.displayType});

if (widget.displayType === 'user-activity') {
// console.log({widget});
const activities = widget.activeResource.activity;
activities.forEach(activity => {
const idea = activity.idea || {};
const site = activity.site
if (site) {
let siteConfig = widget.allSites && widget.allSites[site.id] && widget.allSites[site.id].config;
let ideaSlug = siteConfig && siteConfig.cms && siteConfig.cms.ideaSlug || 'plan';
if (!ideaSlug.match(/^\//)) ideaSlug = '/' + ideaSlug;
ideaSlug = ideaSlug.match(/\{ideaId\}/i) ? ideaSlug.replace(/\{ideaId\}/ig, idea.id) : `${ideaSlug}/${idea.id}`;
let cmsUrl = siteConfig && siteConfig.cms && siteConfig.cms.url;
if (cmsUrl) {
activity.cmsUrl = cmsUrl + ideaSlug;
}
}
});

console.log({activities});
// activities.forEach(activity => {
// const idea = activity.idea || {};
// const site = activity.site
// if (site) {
// let siteConfig = widget.allSites && widget.allSites[site.id] && widget.allSites[site.id].config;
// let ideaSlug = siteConfig && siteConfig.cms && siteConfig.cms.ideaSlug || 'plan';
// if (!ideaSlug.match(/^\//)) ideaSlug = '/' + ideaSlug;
// ideaSlug = ideaSlug.match(/\{ideaId\}/i) ? ideaSlug.replace(/\{ideaId\}/ig, idea.id) : `${ideaSlug}/${idea.id}`;
// let cmsUrl = siteConfig && siteConfig.cms && siteConfig.cms.url;
// if (cmsUrl) {
// activity.cmsUrl = cmsUrl + ideaSlug;
// }
// }
// });

}

Expand Down

1 comment on commit 8e296da

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Published new image: openstad/frontend:fix-remove-useless-consolelog-hindering-logging-8e296da

Please sign in to comment.