diff --git a/src/components/LocationCard.vue b/src/components/LocationCard.vue index 17c5d988ad..b4f91e3a6f 100644 --- a/src/components/LocationCard.vue +++ b/src/components/LocationCard.vue @@ -7,9 +7,7 @@ > - - {{ getLocationCategory(location) }} - + @@ -24,6 +22,7 @@ import utils from '../utils.js' export default { components: { PriceCountChip: defineAsyncComponent(() => import('../components/PriceCountChip.vue')), + LocationOSMTagChip: defineAsyncComponent(() => import('../components/LocationOSMTagChip.vue')), LocationOSMIDChip: defineAsyncComponent(() => import('../components/LocationOSMIDChip.vue')), }, props: { @@ -53,9 +52,6 @@ export default { } return this.$route.params.id }, - getLocationCategory(location) { - return utils.getLocationCategory(location) - }, goToLocation(location) { if (this.readonly) { return diff --git a/src/components/LocationOSMIDChip.vue b/src/components/LocationOSMIDChip.vue index 7b31fddac9..15d92408e6 100644 --- a/src/components/LocationOSMIDChip.vue +++ b/src/components/LocationOSMIDChip.vue @@ -1,6 +1,6 @@ @@ -15,8 +15,8 @@ export default { } }, methods: { - getLocationOSMID(location) { - return utils.getLocationOSMID(location) + getLocationUniqueID(location) { + return utils.getLocationUniqueID(location) }, } } diff --git a/src/components/LocationOSMTagChip.vue b/src/components/LocationOSMTagChip.vue new file mode 100644 index 0000000000..7de7cdbc84 --- /dev/null +++ b/src/components/LocationOSMTagChip.vue @@ -0,0 +1,23 @@ + + + diff --git a/src/components/LocationSelectorDialog.vue b/src/components/LocationSelectorDialog.vue index 4af511c04c..09fa5c881e 100644 --- a/src/components/LocationSelectorDialog.vue +++ b/src/components/LocationSelectorDialog.vue @@ -45,7 +45,7 @@

{{ getLocationTitle(location, true, false, false) }}

{{ getLocationTitle(location, false, true, true) }}
- - {{ getLocationCategory(location) }} - - - {{ getLocationOSMID(location) }} - +
@@ -67,12 +62,12 @@ - +

{{ getLocationTitle(location, true, false, false) }}

{{ getLocationTitle(location, false, true, true) }}
- {{ getLocationCategory(location) }} + {{ getLocationTag(location) }}
@@ -97,7 +92,7 @@ import('../components/LocationOSMTagChip.vue')), LocationOSMIDChip: defineAsyncComponent(() => import('../components/LocationOSMIDChip.vue')), }, emits: ['location', 'close'], @@ -214,11 +210,11 @@ export default { getLocationTitle(location, withName=true, withRoad=false, withCity=true) { return utils.getLocationTitle(location, withName, withRoad, withCity) }, - getLocationOSMID(location) { - return utils.getLocationOSMID(location) + getLocationUniqueID(location) { + return utils.getLocationUniqueID(location) }, - getLocationCategory(location) { - return utils.getLocationCategory(location) + getLocationTag(location) { + return utils.getLocationTag(location) }, getLocationLatLng(location) { return utils.getLocationLatLng(location) diff --git a/src/utils.js b/src/utils.js index f21a974d4a..16397bd44b 100644 --- a/src/utils.js +++ b/src/utils.js @@ -187,12 +187,12 @@ function getLocationType(locationObject) { return locationObject.osm_type.toUpperCase() } -function getLocationOSMID(locationObject) { +function getLocationUniqueID(locationObject) { // examples: N12345 return `${getLocationType(locationObject)[0]}${getLocationID(locationObject).toString()}` } -function getLocationCategory(locationObject) { +function getLocationTag(locationObject) { // examples: shop:supermarket, shop:convenience, shop:bakery, shop:doityourself // Photon if (locationObject.properties) { @@ -249,8 +249,8 @@ export default { getLocationTitle, getLocationID, getLocationType, - getLocationOSMID, - getLocationCategory, + getLocationUniqueID, + getLocationTag, getLocationLatLng, getMapBounds, getMapCenter, diff --git a/src/views/AddPriceMultiple.vue b/src/views/AddPriceMultiple.vue index d28ea5f250..1084643699 100644 --- a/src/views/AddPriceMultiple.vue +++ b/src/views/AddPriceMultiple.vue @@ -95,7 +95,7 @@