From 8181cf3f6fd71e371a88531dd7a2eeb928a97d75 Mon Sep 17 00:00:00 2001 From: Raphael Odini Date: Sun, 23 Jun 2024 01:28:23 +0200 Subject: [PATCH 1/3] Move new LocationInputRow inside ProofInputRow. Show LocationChip in ProofCard --- src/components/LocationChip.vue | 50 ++++++++++++++++++++++++++++ src/components/LocationInputRow.vue | 6 +++- src/components/PriceFooterRow.vue | 4 +-- src/components/PriceLocationChip.vue | 46 ------------------------- src/components/ProofFooter.vue | 2 ++ src/components/ProofInputRow.vue | 9 +++-- src/services/api.js | 5 +-- src/views/AddPriceMultiple.vue | 46 +++++-------------------- 8 files changed, 76 insertions(+), 92 deletions(-) create mode 100644 src/components/LocationChip.vue delete mode 100644 src/components/PriceLocationChip.vue diff --git a/src/components/LocationChip.vue b/src/components/LocationChip.vue new file mode 100644 index 0000000000..dd9b82a4d1 --- /dev/null +++ b/src/components/LocationChip.vue @@ -0,0 +1,50 @@ + + + diff --git a/src/components/LocationInputRow.vue b/src/components/LocationInputRow.vue index 2e9a2a1a95..a8885bf8e5 100644 --- a/src/components/LocationInputRow.vue +++ b/src/components/LocationInputRow.vue @@ -47,6 +47,10 @@ export default { type: Object, default: () => ({ location_osm_id: null, location_osm_type: null }) }, + maxRecentLocations: { + type: Number, + default: 3 + } }, data() { return { @@ -56,7 +60,7 @@ export default { computed: { ...mapStores(useAppStore), recentLocations() { - return this.appStore.getRecentLocations(3) + return this.appStore.getRecentLocations(this.maxRecentLocations) }, locationFormFilled() { let keys = ['location_osm_id', 'location_osm_type'] diff --git a/src/components/PriceFooterRow.vue b/src/components/PriceFooterRow.vue index 49b36e7ebe..49d6643b40 100644 --- a/src/components/PriceFooterRow.vue +++ b/src/components/PriceFooterRow.vue @@ -1,7 +1,7 @@