@@ -155,13 +168,18 @@
count++
return `
-
- ${response[key].map(obj => (
- `
+
${levels[key]}
*
+ ${response[key].map(obj => {
+ const disabledLand = obj.area === 0
+ return `
${obj.name}
${obj.source_id !== "" ? `
(${obj.source_id})
` : ``}
+ ${disabledLand ? `
Territoire supprimé en 2024` : ``}
`
- )).join('')}
+ }).join('')}
`
}
}).join('')
@@ -226,6 +244,10 @@
_paq.push(['trackEvent', 'local_report_download_funnel', 'search_territory', 'local_report_home_search_territory_selected'])
}
+ if (e.target.classList.contain('disabled')) {
+ return
+ }
+
const public_key = e.target.id.split('territory-')[1]
createDiagnostic(public_key)
}
diff --git a/public_data/serializers.py b/public_data/serializers.py
index d191df7aa..fd9811dd6 100644
--- a/public_data/serializers.py
+++ b/public_data/serializers.py
@@ -102,6 +102,7 @@ class LandSerializer(s.Serializer):
name = s.CharField()
source_id = s.SerializerMethodField()
public_key = s.CharField()
+ area = s.FloatField()
def get_source_id(self, obj) -> str:
return obj.get_official_id()