Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions next/components/organisms/DatasetSearchCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ const DatasetSearchCard= ({
borderRadius="16px"
overflow="hidden"
width="222px"
height={locale !== 'pt' ? "165px" : "138px"}
height="165px"
position="relative"
_hover={{ opacity: 0.9 }}
>
Expand Down Expand Up @@ -258,11 +258,9 @@ const DatasetSearchCard= ({
{temporalCoverageText || t('notProvided')}
</MetadataRow>

{locale !== 'pt' && (
<MetadataRow label={t('spatialCoverage')}>
{spatialCoverage || t('notProvided')}
</MetadataRow>
)}
<MetadataRow label={t('spatialCoverage')}>
{spatialCoverage || t('notProvided')}
</MetadataRow>

<MetadataRow label={t('resources')}>
{resourcesText}
Expand Down
48 changes: 22 additions & 26 deletions next/components/organisms/TablePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -577,34 +577,30 @@ export default function TablePage({ id, isBDSudo, changeTab, datasetName }) {
</StackSkeleton>
</Stack>

{/* {locale !== 'pt' ?
<Stack spacing="8px" marginBottom="40px !important">
<StackSkeleton width="300px" height="28px" isLoading={isLoading}>
<TitleText typography="small">
{t('table.spatialCoverage')}
</TitleText>
</StackSkeleton>
<Stack spacing="8px" marginBottom="40px !important">
<StackSkeleton width="300px" height="28px" isLoading={isLoading}>
<TitleText typography="small">
{t('table.spatialCoverage')}
</TitleText>
</StackSkeleton>

<StackSkeleton
height="20px"
width={resource?.[`spatialCoverageName${capitalize(locale)}`] ? "100%" : "200px"}
isLoading={isLoading}
<StackSkeleton
height="20px"
width={resource?.[`spatialCoverageName${capitalize(locale)}`] ? "100%" : "200px"}
isLoading={isLoading}
>
<BodyText
typography="small"
color="#464A51"
>
<BodyText
typography="small"
color="#464A51"
>
{resource?.[`spatialCoverageName${capitalize(locale)}`]
? Object.values(resource[`spatialCoverageName${capitalize(locale)}`])
.sort((a, b) => a.localeCompare(b, locale))
.join(', ')
: t('table.notProvided')}
</BodyText>
</StackSkeleton>
</Stack>
:
<></>
} */}
{resource?.[`spatialCoverageName${capitalize(locale)}`]
? Object.values(resource[`spatialCoverageName${capitalize(locale)}`])
.sort((a, b) => a.localeCompare(b, locale))
.join(', ')
: t('table.notProvided')}
</BodyText>
</StackSkeleton>
</Stack>

<Stack
spacing="8px"
Expand Down
1 change: 1 addition & 0 deletions next/pages/api/tables/getTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ async function getTable(id, locale='pt') {
isDeprecated
temporalCoverage
fullTemporalCoverage
spatialCoverageName${capitalize(locale)}
rawDataSource {
edges {
node {
Expand Down
38 changes: 18 additions & 20 deletions next/pages/dataset/[dataset].js
Original file line number Diff line number Diff line change
Expand Up @@ -483,26 +483,24 @@ export default function DatasetPage ({ dataset, userGuide, hiddenDataset }) {
</BodyText>
</GridItem>

{locale !== 'pt' &&
<GridItem colSpan={{ base: 5, lg: 4 }} marginBottom="8px">
<LabelText
typography="large"
marginBottom="8px"
>
{t('spatialCoverage')}
</LabelText>
<BodyText
typography="small"
color="#464A51"
>
{dataset?.[`spatialCoverageName${capitalize(locale)}`]
? Object.values(dataset[`spatialCoverageName${capitalize(locale)}`])
.sort((a, b) => a.localeCompare(b, locale))
.join(', ')
: t('notProvided')}
</BodyText>
</GridItem>
}
<GridItem colSpan={{ base: 5, lg: 4 }} marginBottom="8px">
<LabelText
typography="large"
marginBottom="8px"
>
{t('spatialCoverage')}
</LabelText>
<BodyText
typography="small"
color="#464A51"
>
{dataset?.[`spatialCoverageName${capitalize(locale)}`]
? Object.values(dataset[`spatialCoverageName${capitalize(locale)}`])
.sort((a, b) => a.localeCompare(b, locale))
.join(', ')
: t('notProvided')}
</BodyText>
</GridItem>
</Grid>
</GridItem>
</Grid>
Expand Down
28 changes: 12 additions & 16 deletions next/pages/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -704,23 +704,19 @@ export default function SearchDatasetPage() {

<Divider marginY="16px !important" borderColor="#DEDFE0"/>

{locale !== 'pt' && (
<>
<CheckboxFilterAccordion
isActive={validateActiveFilterAccordin("spatial_coverage")}
choices={memoizedFilters.spatialCoverages}
valueField="key"
displayField="name"
fieldName={t('spatialCoverage')}
valuesChecked={valuesCheckedFilter("spatial_coverage")}
onChange={(value) => handleSelectFilter(["spatial_coverage",`${value}`])}
isLoading={!isLoading}
facet="spatial_coverage"
/>
<CheckboxFilterAccordion
isActive={validateActiveFilterAccordin("spatial_coverage")}
choices={memoizedFilters.spatialCoverages}
valueField="key"
displayField="name"
fieldName={t('spatialCoverage')}
valuesChecked={valuesCheckedFilter("spatial_coverage")}
onChange={(value) => handleSelectFilter(["spatial_coverage",`${value}`])}
isLoading={!isLoading}
facet="spatial_coverage"
/>

<Divider marginY="16px !important" borderColor="#DEDFE0"/>
</>
)}
<Divider marginY="16px !important" borderColor="#DEDFE0"/>

<CheckboxFilterAccordion
isActive={validateActiveFilterAccordin("organization")}
Expand Down