Skip to content

Commit d1d132b

Browse files
committed
VIRCN-9 Added a information modal for the option of "Cannot find my city" in the initiative step.
1 parent 1c06613 commit d1d132b

File tree

4 files changed

+61
-24
lines changed

4 files changed

+61
-24
lines changed

src/components/initiatives/new/AddCityModal.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<div class="content">
88
<h1 class="title is-3">This feature will be available soon</h1>
99
<p>Sorry! We will add this feature in a future update, stay tuned!</p>
10+
<p>Meanwhile, you can contact us by filling our support form by going to <a href="https://docs.google.com/forms/d/e/1FAIpQLSf02YyfE8ddsf5B0u2wSF_ZggEYQi_-U0fQQcSaqfdtKmpWng/viewform" target="_blank" title="Support and feedback form">to this link</a></p>
1011
<div class="buttons is-centered">
1112
<button class="button is-outlined is-dark" type="button" @click="$parent.close()">Close</button>
1213
</div>
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<template>
2+
<div class="modal-card" style="width: 100%">
3+
<!-- <header class="modal-card-head">
4+
<p class="modal-card-title">Add your city</p>
5+
</header>-->
6+
<section class="modal-card-body has-text-centered">
7+
<div class="content">
8+
<h1 class="title is-3">Before continuing...</h1>
9+
<p>If you weren't able to find your city, we are sorry about that :(</p>
10+
<p>You can contact us to add your location by filling our support form by going to <a href="https://docs.google.com/forms/d/e/1FAIpQLSf02YyfE8ddsf5B0u2wSF_ZggEYQi_-U0fQQcSaqfdtKmpWng/viewform" target="_blank" title="Support and feedback form">to this link</a></p>
11+
<div class="buttons is-centered">
12+
<button class="button is-outlined is-dark" type="button" @click="$parent.close()">Close</button>
13+
<button class="button is-primary" type="button" @click="nextStep">Next step</button>
14+
</div>
15+
</div>
16+
</section>
17+
<!-- <footer class="modal-card-foot">
18+
<button class="button" type="button" @click="$parent.close()">Close</button>
19+
<button class="button is-primary"><i class="fas fa-plus"></i>&nbps;Add city</button>
20+
</footer>-->
21+
</div>
22+
</template>
23+
24+
<script>
25+
export default {
26+
methods: {
27+
nextStep: function(){
28+
this.$emit('continue')
29+
this.$parent.close()
30+
}
31+
}
32+
}
33+
</script>
34+
35+
36+
<style scoped>
37+
.modal-card {
38+
color: #000;
39+
}
40+
</style>

src/i18n/en/forms/user/addInitiative.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ const addInitiative = {
5555
noCity: 'My initiative is not located in a city',
5656
cantFindCity: 'Can\t find your city? Click here',
5757
notificationNoCity: 'The initiative is not located in a city',
58-
skip: 'Skip this step, I cannot locate my city in a map',
58+
skip: 'Skip this step, my initiative cannot be placed in a location',
59+
cantLocate: 'I cannot find my city in the list',
5960
feature: {
6061
title: 'This feature will be available soon',
6162
text: 'Sorry! We will add this feature in a future update, stay tuned!',

src/views/initiatives/steps/Step3.vue

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,17 @@
8686
<br>
8787
<div class="content">
8888
<p class="has-text-centered">
89-
<a @click="skip" class="has-text-primary">
89+
<a @click="$emit('goTo',5)" class="has-text-primary">
9090
<i class="fas fa-share"></i>
9191
&nbsp;{{$t('forms.user.addInitiative.step3.skip')}}
9292
</a>
9393
</p>
94+
<p class="has-text-centered">
95+
<a @click="skip" class="has-text-primary">
96+
<i class="fas fa-info-circle"></i>
97+
&nbsp;{{$t('forms.user.addInitiative.step3.cantLocate')}}
98+
</a>
99+
</p>
94100
</div>
95101
<div class="buttons is-centered">
96102
<button @click="$emit('backward')" class="button is-rounded is-white is-outlined is-medium">
@@ -105,6 +111,7 @@
105111

106112
<script>
107113
import AddCityModal from "@/components/initiatives/new/AddCityModal";
114+
import ModalSkipStep3 from "@/components/initiatives/new/ModalSkipStep3.vue"
108115
import debounce from "lodash/debounce";
109116
110117
export default {
@@ -182,14 +189,6 @@ export default {
182189
this.selectedCountry = selectedCountry;
183190
this.queryCity = "";
184191
this.selectedCity = null;
185-
// this.$http
186-
// .get(`/v1/registered-cities?size=100&country_id=${selectedCountry.id}`)
187-
// .then(res => {
188-
// this.dataCities = res.data.data;
189-
// })
190-
// .finally(() => {
191-
// this.fetchingCities = false;
192-
// });
193192
},
194193
getCityAsync: debounce(function(name) {
195194
if (!name.length) {
@@ -209,14 +208,19 @@ export default {
209208
});
210209
}, 500),
211210
skip() {
212-
this.model.selectedRegion = null;
213-
this.model.selectedCountry = null;
214-
this.model.selectedCity = null;
215-
this.$emit("forward");
211+
this.$modal.open({
212+
parent: this,
213+
component: ModalSkipStep3,
214+
hasModalCard: true,
215+
events: {
216+
continue: () => {
217+
this.$emit('goTo',5)
218+
}
219+
}
220+
});
216221
},
217222
selectCity(selectedCity) {
218223
if (selectedCity === null) return;
219-
// this.fetchingCities = true;
220224
this.selectedCity = selectedCity;
221225
},
222226
notLocatedInACity() {
@@ -268,15 +272,6 @@ export default {
268272
.indexOf(this.queryCountry.toLowerCase()) >= 0
269273
);
270274
},
271-
// filteredCities() {
272-
// return this.dataCities.filter(
273-
// option =>
274-
// option.name
275-
// .toString()
276-
// .toLowerCase()
277-
// .indexOf(this.queryCity.toLowerCase()) >= 0
278-
// );
279-
// }
280275
}
281276
};
282277
</script>

0 commit comments

Comments
 (0)