Skip to content

Commit

Permalink
update queries and site search zoom
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiaifrim committed Sep 21, 2020
1 parent 55e1646 commit ea6e56f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
4 changes: 2 additions & 2 deletions src/components/manage/Blocks/FiltersBlock/View.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
];
Expand Down

0 comments on commit ea6e56f

Please sign in to comment.