Skip to content

Commit

Permalink
Show safety measures (closes #623)
Browse files Browse the repository at this point in the history
  • Loading branch information
PanierAvide committed May 15, 2020
1 parent 08437f9 commit ad808ff
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
12 changes: 11 additions & 1 deletion components/place/detail.vue
Expand Up @@ -304,13 +304,23 @@ export default {
},
infos() {
const infos = [];
let infos = [];
// Custom POI description
if (this.place.properties.tags['description:cro']) {
infos.push(this.place.properties.tags['description:cro']);
}
// Mandatory mask
if (this.place.properties.tags['safety:covid19']) {
infos = infos.concat(
this.place.properties.tags['safety:covid19']
.split(';')
.filter(v => !this.$t(`details.safety.${v}`).startsWith("details."))
.map(v => this.$t(`details.safety.${v}`))
);
}
// Access
if (this.place.properties.tags['access:covid19'] === 'no') {
infos.push(this.$t('details.not_accessible'));
Expand Down
5 changes: 4 additions & 1 deletion locales/en.json
Expand Up @@ -175,6 +175,9 @@
"has": "has",
"hasnot": "has no"
},
"safety": {
"mask": "Mask must be worn"
},
"update_dialog": {
"complete1": "Is this your establishment or part of your group ?",
"complete2": "Gain visibility after lockdown",
Expand Down Expand Up @@ -351,4 +354,4 @@
}
}
}
}
}
3 changes: 3 additions & 0 deletions locales/fr.json
Expand Up @@ -175,6 +175,9 @@
"has": "Il en reste",
"hasnot": "Il n'y en a plus"
},
"safety": {
"mask": "Port du masque obligatoire"
},
"update_dialog": {
"complete1": "C'est votre établissement ou celui de votre groupe ?",
"complete2": "Gagnez en visibilité après le confinement",
Expand Down

0 comments on commit ad808ff

Please sign in to comment.