diff --git a/src/components/manage/Blocks/DiscodataOpenlayersMapBlock/View.jsx b/src/components/manage/Blocks/DiscodataOpenlayersMapBlock/View.jsx index e6f8dec..4b97096 100644 --- a/src/components/manage/Blocks/DiscodataOpenlayersMapBlock/View.jsx +++ b/src/components/manage/Blocks/DiscodataOpenlayersMapBlock/View.jsx @@ -513,7 +513,7 @@ const OpenlayersMapView = (props) => { axios .get( encodeURI( - `${settings.providerUrl}?query=SELECT shape_wm.STX as x, shape_wm.STY as y from [IED].[latest].[SiteMap] WHERE siteName LIKE '%${stateRef.current.siteTerm}%' ORDER BY [Site_reporting_year] DESC`, + `${settings.providerUrl}?query=SELECT shape_wm.STX as x, shape_wm.STY as y, Site_reporting_year from [IED].[latest].[SiteMap] WHERE siteName LIKE '%${stateRef.current.siteTerm}%' ORDER BY [Site_reporting_year] DESC`, ), ) .then((response) => { diff --git a/src/components/manage/Blocks/FiltersBlock/View.jsx b/src/components/manage/Blocks/FiltersBlock/View.jsx index d565130..a7ef9aa 100644 --- a/src/components/manage/Blocks/FiltersBlock/View.jsx +++ b/src/components/manage/Blocks/FiltersBlock/View.jsx @@ -868,9 +868,9 @@ const View = ({ content, ...props }) => { let promises = []; const sqls = [ { - query: `SELECT DISTINCT siteName FROM [IED].[latest].[SiteMap] WHERE [site] LIKE '%${data.value}%' ORDER BY [siteName]`, + query: `SELECT DISTINCT siteName FROM [IED].[latest].[SiteMap] WHERE [siteName] LIKE '%${data.value}%' ORDER BY [siteName]`, reqKey: 'results', - searchKey: 'site', + searchKey: 'siteName', updateState: setSitesResults, }, ];