fix for double params in dashboard widget request urls

This commit is contained in:
Tim Chamberlain
2023-03-16 11:37:45 -05:00
parent c812dea8ea
commit f1baefa5f6

View File

@ -119,6 +119,7 @@ function DashboardWidgets({widgetMetaDataList, tableName, entityPrimaryKey, omit
{
let ampersand = "";
let params = "";
if(entityPrimaryKey)
{
params += `${ampersand}id=${entityPrimaryKey}`;
@ -134,16 +135,13 @@ function DashboardWidgets({widgetMetaDataList, tableName, entityPrimaryKey, omit
params += `${ampersand}${extraParams}`;
ampersand = "&";
}
if(childUrlParams)
{
params += `${ampersand}${childUrlParams}`;
ampersand = "&";
}
/////////////////////////////////////////////////////////////////////////////
// see if local storage is used for any widget dropdowns, if so, look them //
// up and append to the query string //
/////////////////////////////////////////////////////////////////////////////
if(params === "")
{
let thisWidgetHasDropdowns = widgetMetaData && widgetMetaData.storeDropdownSelections && widgetMetaData.dropdowns;
let parentWidgetHasDropdowns = parentWidgetMetaData && parentWidgetMetaData.storeDropdownSelections && parentWidgetMetaData.dropdowns;
if (thisWidgetHasDropdowns || parentWidgetHasDropdowns)
@ -161,6 +159,7 @@ function DashboardWidgets({widgetMetaDataList, tableName, entityPrimaryKey, omit
}
}
}
}
return params;
}