diff --git a/geonode_mapstore_client/client/js/api/geonode/v2/index.js b/geonode_mapstore_client/client/js/api/geonode/v2/index.js index 07cc9def4c..7e53257c0e 100644 --- a/geonode_mapstore_client/client/js/api/geonode/v2/index.js +++ b/geonode_mapstore_client/client/js/api/geonode/v2/index.js @@ -225,7 +225,7 @@ export const getDocumentsByDocType = (docType = 'image', { params: { ...params, ...(sort && { sort: isArray(sort) ? sort : [ sort ]}), - 'filter{doc_type}': [docType], + 'filter{subtype}': [docType], page, page_size: pageSize } diff --git a/geonode_mapstore_client/client/js/components/DetailsPanel/DetailsPanel.jsx b/geonode_mapstore_client/client/js/components/DetailsPanel/DetailsPanel.jsx index 6eaef7ae95..07c8cac212 100644 --- a/geonode_mapstore_client/client/js/components/DetailsPanel/DetailsPanel.jsx +++ b/geonode_mapstore_client/client/js/components/DetailsPanel/DetailsPanel.jsx @@ -169,7 +169,7 @@ function DetailsPanel({ formatDetailUrl = res => res?.detail_url, icon, name - } = resource && (types[resource.doc_type] || types[resource.resource_type]) || {}; + } = resource && (types[resource.subtype] || types[resource.resource_type]) || {}; const embedUrl = resource?.embed_url && formatEmbedUrl(resource); const detailUrl = resource?.pk && formatDetailUrl(resource); const documentDownloadUrl = (resource?.href && resource?.href.includes('download')) ? resource?.href : undefined; diff --git a/geonode_mapstore_client/client/js/components/ResourceCard/ResourceCard.jsx b/geonode_mapstore_client/client/js/components/ResourceCard/ResourceCard.jsx index ba67ec8562..8bf1cb8e50 100644 --- a/geonode_mapstore_client/client/js/components/ResourceCard/ResourceCard.jsx +++ b/geonode_mapstore_client/client/js/components/ResourceCard/ResourceCard.jsx @@ -24,7 +24,7 @@ const ResourceCard = forwardRef(({ const res = data; const types = getTypesInfo(); - const { icon } = types[res.doc_type] || types[res.resource_type] || {}; + const { icon } = types[res.subtype] || types[res.resource_type] || {}; return (