[tcb-script]
document.addEventListener('DOMContentLoaded', function(event) {
const lang = document.documentElement.lang;
const urlParams = new URLSearchParams(window.location.search);
const section = urlParams.get('reportId');
switch(lang) {
case "en":
url = "https://app.powerbi.com/view?r=eyJrIjoiYjUzY2FmZmQtOGU2OC00YzE4LTg5N2MtMGQwNmQ1MjE1N2EzIiwidCI6IjZhZTg5MzBmLWU5MGYtNDM4ZC1iMDY4LWM2ODc0MzZkNjgxZiIsImMiOjl9";
title = "Dashboard SDG 1";
break;
case "ca":
url = "https://app.powerbi.com/view?r=eyJrIjoiNDFmNTMwYzAtNTY0My00ZDliLWIzZDktMTc3ZGI2NTc2Yjg2IiwidCI6IjZhZTg5MzBmLWU5MGYtNDM4ZC1iMDY4LWM2ODc0MzZkNjgxZiIsImMiOjl9";
title = "Cuadre de comandament ODS 1";
break;
default:
url = "https://app.powerbi.com/view?r=eyJrIjoiNDRlN2QwNmYtMzhkMi00MDA4LTk5ZmEtYjRkYWRkZTc2MWRhIiwidCI6IjZhZTg5MzBmLWU5MGYtNDM4ZC1iMDY4LWM2ODc0MzZkNjgxZiIsImMiOjl9";
title = "Cuadro de mando ODS 1";
}
if(section != null) {
url = url + "&pageName=ReportSection" + section;
}
const cover = document.getElementById('dash-cover');
const iframe = '<iframe loading="lazy" title="'+title+
'" width="100%" height="600" frameborder="0" allowfullscreen="true"'+
' id="dashboard" src="'+url+'" data-uw-styling-context="true"></iframe>';
cover.insertAdjacentHTML("beforebegin", iframe);
});
[/tcb-script]
Sobre l'Observatori