Skip to content

Commit

Permalink
Merge branch 'release'
Browse files Browse the repository at this point in the history
  • Loading branch information
mussbach committed Sep 12, 2024
2 parents 4d866c3 + 6e9fba0 commit 217c991
Show file tree
Hide file tree
Showing 13 changed files with 144 additions and 92 deletions.
6 changes: 5 additions & 1 deletion client/js/components/map/publicdetail/Map.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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) {
Expand Down
48 changes: 27 additions & 21 deletions client/js/components/procedure/admin/DpAddOrganisationList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,25 @@
<dt class="color--grey">
{{ Translator.trans('address') }}
</dt>
<template v-if="locationContacts && hasAdress">
<dd
v-if="locationContacts.street"
class="ml-0">
{{ locationContacts.street }}
</dd>
<dd
v-if="locationContacts.postalcode"
class="ml-0">
{{ locationContacts.postalcode }}
</dd>
<dd
v-if="locationContacts.city"
class="ml-0">
{{ locationContacts.city }}
</dd>
</template>
<dd
v-if="locationContacts.street"
class="ml-0">
{{ locationContacts.street }}
</dd>
<dd
v-if="locationContacts.postalcode"
class="ml-0">
{{ locationContacts.postalcode }}
</dd>
<dd
v-if="locationContacts.city"
class="ml-0">
{{ locationContacts.city }}
</dd>
<dd
v-if="!locationContacts.street && !locationContacts.city && !locationContacts.postalCode"
v-else
class="ml-0">
{{ Translator.trans('notspecified') }}
</dd>
Expand All @@ -56,7 +58,7 @@
{{ Translator.trans('phone') }}
</dt>
<dd
v-if="locationContacts.hasOwnProperty('phone') && locationContacts.phone"
v-if="locationContacts?.hasOwnProperty('phone') && locationContacts.phone"
class="ml-0">
{{ locationContacts.phone }}
</dd>
Expand Down Expand Up @@ -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 [
Expand All @@ -189,10 +191,10 @@ export default {
{
id: item.id,
...item.attributes,
locationContacts: {
locationContacts: locationContact ? {
id: locationContact.id,
...locationContact.attributes
},
} : null,
hasNoEmail
}
]
Expand Down Expand Up @@ -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)) {
Expand Down
12 changes: 11 additions & 1 deletion client/js/components/statement/DpStatementAnonymize.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -40,9 +41,11 @@
</ul>

<dp-checkbox
v-if="hasPermission('feature_statement_text_history_delete')"
id="r_delete_statement_text_history"
v-model="actions.deleteStatementTextHistory"
class="u-mb-0_5"
data-cy="statementAnonymize:history"
:label="{
hint: Translator.trans('statement.anonymize.delete.history.hint'),
text: Translator.trans('statement.anonymize.delete.history.label')
Expand All @@ -52,6 +55,7 @@
id="r_anonymize_statement_text"
v-model="actions.anonymizeStatementText"
:class="{'u-mb-0_5': !actions.anonymizeStatementText}"
data-cy="statementAnonymize:text"
:label="{
hint: Translator.trans('statement.anonymize.text.hint'),
text: Translator.trans('statement.anonymize.text.label')
Expand All @@ -75,6 +79,7 @@
id="r_delete_statement_attachments"
v-model="actions.deleteStatementAttachments"
class="u-mb-0_5"
data-cy="statementAnonymize:deleteAttachments"
:label="{
hint: Translator.trans('statement.anonymize.delete.attachments.hint'),
text: Translator.trans('statement.anonymize.delete.attachments.label')
Expand All @@ -83,13 +88,15 @@
<div class="flow-root">
<dp-button
color="secondary"
data-cy="statementAnonymize:backToOriginalStatements"
:href="Routing.generate('dplan_assessmenttable_view_original_table', {
procedureId: procedureId,
filterHash: originalFilterHash
})"
:text="Translator.trans('back.to.statements.original')" />
<dp-button
class="float-right"
data-cy="statementAnonymize:next"
:disabled="isInvalid()"
icon-after="chevron-right"
:text="Translator.trans('continue.confirm')"
Expand Down Expand Up @@ -136,12 +143,14 @@
<div class="flow-root">
<dp-button
color="secondary"
data-cy="statementAnonymize:back"
icon="chevron-left"
:text="Translator.trans('bulk.edit.actions.edit')"
@click="back" />
<dp-button
class="float-right"
:busy="busy"
class="float-right"
data-cy="statementAnonymize:submit"
icon-after="chevron-right"
:text="Translator.trans('bulk.edit.actions.apply')"
@click="submit" />
Expand Down Expand Up @@ -220,6 +229,7 @@

<div class="flow-root">
<dp-button
data-cy="statementAnonymize:backToOriginalStatements"
:href="Routing.generate('dplan_assessmenttable_view_original_table', {
procedureId: procedureId,
filterHash: originalFilterHash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,10 @@
--><span
v-if="(fieldIsActive('streetAndHouseNumber') || fieldIsActive('street')) && hasPermission('field_statement_meta_street')"
:class="prefixClass('layout__item u-1-of-4-desk-up')">
<em>{{ Translator.trans('street') }}: </em> {{ statement.r_street }}<br>
<template v-if="fieldIsActive('streetAndHouseNumber')">
<template v-if="showStreet">
<em>{{ Translator.trans('street') }}: </em> {{ statement.r_street }}<br>
</template>
<template v-if="fieldIsActive('streetAndHouseNumber') && showHouseNumber">
<em>{{ Translator.trans('street.number.short') }}: </em> {{ statement.r_houseNumber }}<br>
</template>
</span><!--
Expand Down Expand Up @@ -287,8 +289,16 @@ export default {
return this.statement.r_email && this.statement.r_email !== ''
},
showHouseNumber () {
return this.statement.r_houseNumber && this.statement.r_houseNumber !== ''
},
showPostalCode () {
return hasPermission('field_statement_meta_postal_code') && this.statement.r_postalCode && this.statement.r_postalCode !== ''
},
showStreet () {
return this.statement.r_street && this.statement.r_street !== ''
}
},
Expand Down
Loading

0 comments on commit 217c991

Please sign in to comment.