Skip to content
Snippets Groups Projects
Commit e0424382 authored by Timothee P's avatar Timothee P :sunflower:
Browse files

Merge branch 'develop' into redmine-issues/12567

parents 8351816e f0fd7779
No related branches found
No related tags found
No related merge requests found
...@@ -300,6 +300,9 @@ const mapUtil = { ...@@ -300,6 +300,9 @@ const mapUtil = {
const colorStyle = featureType.colors_style.colors[currentValue]; const colorStyle = featureType.colors_style.colors[currentValue];
return colorStyle ? colorStyle : featureType.color return colorStyle ? colorStyle : featureType.color
} }
else{
return featureType.color;
}
}, },
addVectorTileLayer: function (url, project_slug, featureTypes, form_filters) { addVectorTileLayer: function (url, project_slug, featureTypes, form_filters) {
......
...@@ -38,11 +38,8 @@ ...@@ -38,11 +38,8 @@
> >
<i class="inverted grey pencil alternate icon"></i> <i class="inverted grey pencil alternate icon"></i>
</router-link> </router-link>
<!-- (permissions && permissions.can_delete_feature) || -->
<a <a
v-if=" v-if="isFeatureCreator"
isFeatureCreator || (permissions && permissions.is_project_super_contributor)
"
@click="isCanceling = true" @click="isCanceling = true"
id="feature-delete" id="feature-delete"
class="ui button button-hover-red" class="ui button button-hover-red"
......
...@@ -211,6 +211,14 @@ ...@@ -211,6 +211,14 @@
> >
<i class="inverted grey copy alternate icon"></i> <i class="inverted grey copy alternate icon"></i>
</router-link> </router-link>
<div
v-if="isImporting(type)"
class="import-message"
>
<i class="info circle icon" />
Import en cours
</div>
<div v-else v-frag>
<router-link <router-link
:to="{ :to="{
name: 'editer-type-signalement', name: 'editer-type-signalement',
...@@ -221,11 +229,7 @@ ...@@ -221,11 +229,7 @@
type.is_editable && type.is_editable &&
permissions && permissions &&
permissions.can_create_feature_type && permissions.can_create_feature_type &&
isOffline() !== true && isOffline() !== true
!(
importFeatureTypeData.find(el => el.feature_type_title === type.slug) &&
importFeatureTypeData.find(el => el.feature_type_title === type.slug).status === 'pending'
)
" "
class=" class="
ui ui
...@@ -253,11 +257,7 @@ ...@@ -253,11 +257,7 @@
type.geom_type === 'point' && type.geom_type === 'point' &&
permissions && permissions &&
permissions.can_create_feature_type && permissions.can_create_feature_type &&
isOffline() != true && isOffline() != true
!(
importFeatureTypeData.find(el => el.feature_type_title === type.slug) &&
importFeatureTypeData.find(el => el.feature_type_title === type.slug).status === 'pending'
)
" "
class=" class="
ui ui
...@@ -274,15 +274,6 @@ ...@@ -274,15 +274,6 @@
> >
<i class="inverted grey paint brush alternate icon"></i> <i class="inverted grey paint brush alternate icon"></i>
</router-link> </router-link>
<div
v-if="
importFeatureTypeData.find(el => el.feature_type_title === type.slug) &&
importFeatureTypeData.find(el => el.feature_type_title === type.slug).status === 'pending'
"
class="import-message"
>
<i class="info circle icon" />
Import en cours
</div> </div>
</div> </div>
</div> </div>
...@@ -692,7 +683,8 @@ export default { ...@@ -692,7 +683,8 @@ export default {
project_slug: this.$route.params.slug project_slug: this.$route.params.slug
}); });
}, this.$store.state.configuration.VUE_APP_RELOAD_INTERVAL)); }, this.$store.state.configuration.VUE_APP_RELOAD_INTERVAL));
} else if (newValue && !newValue.some(el => el.status === 'pending')) { } else if (newValue && !newValue.some(el => el.status === 'pending') && this.reloadIntervalId) {
this.GET_PROJECT_FEATURE_TYPES(this.project.slug);
this.CLEAR_RELOAD_INTERVAL_ID(); this.CLEAR_RELOAD_INTERVAL_ID();
} }
} }
...@@ -713,6 +705,9 @@ export default { ...@@ -713,6 +705,9 @@ export default {
...mapActions('feature', [ ...mapActions('feature', [
'GET_PROJECT_FEATURES' 'GET_PROJECT_FEATURES'
]), ]),
...mapActions('feature_type', [
'GET_PROJECT_FEATURE_TYPES'
]),
refreshId() { refreshId() {
return "?ver=" + Math.random(); return "?ver=" + Math.random();
}, },
...@@ -722,6 +717,13 @@ export default { ...@@ -722,6 +717,13 @@ export default {
isOffline() { isOffline() {
return navigator.onLine === false; return navigator.onLine === false;
}, },
isImporting(type) {
if (this.importFeatureTypeData) {
const singleImportData = this.importFeatureTypeData.find(el => el.feature_type_title === type.slug);
return singleImportData && singleImportData.status === 'pending'
}
return false;
},
checkForOfflineFeature() { checkForOfflineFeature() {
let arraysOffline = []; let arraysOffline = [];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment