diff --git a/client/js/components/map/publicdetail/Map.vue b/client/js/components/map/publicdetail/Map.vue index 3033aa747f..0af8ff7b37 100644 --- a/client/js/components/map/publicdetail/Map.vue +++ b/client/js/components/map/publicdetail/Map.vue @@ -394,7 +394,7 @@ export default { addTerritoryLayer () { // If there is no territory wms layer defined but a "hand-drawn" territory, craft a vector layer from it - if (!this.hasTerritoryWMS && this.procedureSettings.territory.length > 0 && this.procedureSettings.territory !== '{}') { + if (!this.hasTerritoryWMS && this.hasTerritory()) { // Read GeoJson features const features = new GeoJSON().readFeatures(this.procedureSettings.territory) @@ -1614,6 +1614,10 @@ export default { this.$root.$emit('changeActive') }, + hasTerritory() { + return this.procedureSettings.territory && this.procedureSettings.territory.features.length > 0 + }, + removeOtherInteractions (reset) { this.map.getInteractions().forEach(interaction => { if (interaction instanceof Draw) { diff --git a/client/js/components/procedure/admin/DpAddOrganisationList.vue b/client/js/components/procedure/admin/DpAddOrganisationList.vue index dd5f4d0b6d..aba937c4e5 100644 --- a/client/js/components/procedure/admin/DpAddOrganisationList.vue +++ b/client/js/components/procedure/admin/DpAddOrganisationList.vue @@ -30,23 +30,25 @@
{{ Translator.trans('address') }}
+
- {{ locationContacts.street }} -
-
- {{ locationContacts.postalcode }} -
-
- {{ locationContacts.city }} -
-
{{ Translator.trans('notspecified') }}
@@ -56,7 +58,7 @@ {{ Translator.trans('phone') }}
{{ locationContacts.phone }}
@@ -179,8 +181,8 @@ export default { rowItems () { return Object.values(this.invitableToebItems).reduce((acc, item) => { - const locationContactId = item.relationships.locationContacts.data[0].id - const locationContact = this.getLocationContactById(locationContactId) + const locationContactId = item.relationships.locationContacts?.data.length > 0 ? item.relationships.locationContacts.data[0].id : null + const locationContact = locationContactId ? this.getLocationContactById(locationContactId) : null const hasNoEmail = !item.attributes.participationFeedbackEmailAddress return [ @@ -189,10 +191,10 @@ export default { { id: item.id, ...item.attributes, - locationContacts: { + locationContacts: locationContact ? { id: locationContact.id, ...locationContact.attributes - }, + } : null, hasNoEmail } ] @@ -267,6 +269,10 @@ export default { return this.institutionLocationContactItems[id] }, + hasAdress () { + return this.rowItems.locationContacts?.street || this.rowItems.locationContacts?.postalcode || this.rowItems.locationContacts?.city + }, + returnPermissionChecksValuesArray (permissionChecks) { return permissionChecks.reduce((acc, check) => { if (hasPermission(check.permission)) { diff --git a/client/js/components/statement/DpStatementAnonymize.vue b/client/js/components/statement/DpStatementAnonymize.vue index f05feea035..5414b2ede8 100644 --- a/client/js/components/statement/DpStatementAnonymize.vue +++ b/client/js/components/statement/DpStatementAnonymize.vue @@ -24,6 +24,7 @@ id="r_anonymize_statement_meta" v-model="actions.anonymizeStatementMeta" :class="{'u-mb-0_5': !actions.anonymizeStatementMeta}" + data-cy="statementAnonymize:meta" :label="{ hint: Translator.trans('statement.anonymize.meta.hint'), text: Translator.trans('statement.anonymize.meta.label') @@ -40,9 +41,11 @@ @@ -220,6 +229,7 @@
- {{ Translator.trans('street') }}: {{ statement.r_street }}
-