From dd16bda8faee1797adfd4212b297295dd9c4c6ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Poussard?= <tpoussard@neogeo.fr> Date: Wed, 19 Jan 2022 09:54:15 +0100 Subject: [PATCH] fix conflicts --- src/App.vue | 97 +----- src/components/ImportTask.vue | 13 +- src/main.js | 18 -- src/store/modules/feature.store.js | 2 +- src/views/My_account.vue | 7 - src/views/Projects.vue | 55 ---- .../feature_type/Feature_type_detail.vue | 67 +--- src/views/feature_type/Feature_type_edit.vue | 102 +----- src/views/project/Project_detail.vue | 302 +++--------------- src/views/project/Project_edit.vue | 26 +- src/views/project/Project_members.vue | 9 - src/views/registration/Login.vue | 13 - 12 files changed, 78 insertions(+), 633 deletions(-) diff --git a/src/App.vue b/src/App.vue index 2e19e19c..92894d4f 100644 --- a/src/App.vue +++ b/src/App.vue @@ -11,20 +11,10 @@ <div class="menu container"> <div class="ui inverted icon menu"> <router-link -<<<<<<< HEAD - to="/" - class="header item" - > - <img - class="ui mini right spaced image" - :src="logo" - > -======= :to="isSharedProject ? '' : '/'" :class="['header item', {disable: isSharedProject}]" > <img class="ui mini right spaced image" :src="logo" /> ->>>>>>> develop <span class="desktop"> {{ APPLICATION_NAME }} </span> @@ -150,15 +140,7 @@ </div> <div class="desktop flex push-right-desktop"> -<<<<<<< HEAD - <router-link - v-if="user" - to="/my_account/" - class="item" - > -======= <router-link v-if="user" :to="{name: 'my_account'}" class="item"> ->>>>>>> develop {{ userFullname || user.username || "Utilisateur inconnu" }} </router-link> <div @@ -207,26 +189,6 @@ class="ui stackable grid centered container" > <transition name="fadeDownUp"> -<<<<<<< HEAD - <div - v-if="messages && messages.length > 0" - class="row" - > - <div class="fourteen wide column"> - <div - v-for="(message, index) in messages" - :key="'message-' + index" - class="ui info message" - > - <div class="header"> - <i class="info circle icon" /> Informations - </div> - <ul class="list"> - {{ - message.comment - }} - </ul> -======= <div v-if="messages && messages.length > 0" class="row over-content"> <div class="fourteen wide column"> <div @@ -238,7 +200,12 @@ <div class="header"> <i class="info circle icon"></i> Informations ->>>>>>> develop + </div> + <ul class="list"> + {{ + message.comment + }} + </ul> </div> </div> </div> @@ -258,41 +225,17 @@ <footer> <div class="ui compact text menu"> -<<<<<<< HEAD - <router-link - to="/mentions/" - class="item" - > - Mentions légales - </router-link> - <router-link - to="/aide/" - class="item" - > - Aide - </router-link> - <p class="item"> - Version {{ PACKAGE_VERSION }} - </p> -======= <router-link :to="{name: 'mentions'}" class="item">Mentions légales</router-link> <router-link :to="{name: 'aide'}" class="item">Aide</router-link> <p class="item">Version {{ PACKAGE_VERSION }}</p> ->>>>>>> develop </div> </footer> </div> </template> <script> -<<<<<<< HEAD -import frag from 'vue-frag'; -import { mapState } from 'vuex'; -import { mapGetters } from 'vuex'; -======= import frag from "vue-frag"; import { mapMutations, mapState, mapGetters } from "vuex"; ->>>>>>> develop export default { name: 'App', @@ -312,16 +255,6 @@ export default { computed: { ...mapState([ -<<<<<<< HEAD - 'projects', - 'user', - 'USER_LEVEL_PROJECTS', - 'configuration', - 'messages', - 'loader', - ]), - ...mapGetters(['project']), -======= "user", "USER_LEVEL_PROJECTS", "configuration", @@ -334,7 +267,6 @@ export default { ...mapGetters('projects', [ 'project' ]), ->>>>>>> develop APPLICATION_NAME() { return this.configuration.VUE_APP_APPLICATION_NAME; }, @@ -501,23 +433,6 @@ footer { } -.bounce-enter-active { - animation: bounce-in .5s; -} -.bounce-leave-active { - animation: bounce-in .5s reverse; -} -@keyframes bounce-in { - 0% { - transform: scale(0); - } - 50% { - transform: scale(1.5); - } - 100% { - transform: scale(1); - } -} .ui.grid > .row.over-content { position: absolute; z-index: 99; diff --git a/src/components/ImportTask.vue b/src/components/ImportTask.vue index 677f09ff..5b168b50 100644 --- a/src/components/ImportTask.vue +++ b/src/components/ImportTask.vue @@ -67,15 +67,6 @@ import { mapState } from 'vuex'; export default { - data() { - return { - open: false, - ready: true, - }; - }, - - props: ["data", "reloading"], - filters: { setDate: function (value) { let date = new Date(value); @@ -95,6 +86,10 @@ export default { data: { type: Array, default: null, + }, + reloading: { + type: Boolean, + default: false, } }, diff --git a/src/main.js b/src/main.js index a27c6cb2..e0ddb4c0 100644 --- a/src/main.js +++ b/src/main.js @@ -1,17 +1,10 @@ const axios = require('axios'); import Vue from 'vue'; -<<<<<<< HEAD -import App from './App.vue'; -import './registerServiceWorker'; -import router from './router'; -import store from './store'; -======= import App from './App.vue' import './registerServiceWorker' import router from '@/router' import store from '@/store' ->>>>>>> develop import 'leaflet/dist/leaflet.css'; import 'leaflet-draw/dist/leaflet.draw.css'; import '@/assets/resources/leaflet-control-geocoder-1.13.0/Control.Geocoder.css'; @@ -54,16 +47,6 @@ let onConfigLoaded = function(config){ link.href = config.VUE_APP_APPLICATION_FAVICO; document.head.appendChild(link); -<<<<<<< HEAD - window.proxy_url=config.VUE_APP_DJANGO_API_BASE+'proxy/'; - axios.all([store.dispatch('USER_INFO'), - store.dispatch('GET_ALL_PROJECTS'), - store.dispatch('GET_STATIC_PAGES'), - store.dispatch('GET_USER_LEVEL_PROJECTS'), - store.dispatch('map/GET_AVAILABLE_LAYERS'), - store.dispatch('GET_USER_LEVEL_PERMISSIONS'), - store.dispatch('GET_LEVELS_PERMISSIONS'), -======= window.proxy_url=config.VUE_APP_DJANGO_API_BASE+"proxy/"; axios.all([ store.dispatch("USER_INFO"), @@ -73,7 +56,6 @@ let onConfigLoaded = function(config){ store.dispatch("map/GET_AVAILABLE_LAYERS"), store.dispatch("GET_USER_LEVEL_PERMISSIONS"), store.dispatch("GET_LEVELS_PERMISSIONS"), ->>>>>>> develop ]).then(axios.spread(function () { new Vue({ router, diff --git a/src/store/modules/feature.store.js b/src/store/modules/feature.store.js index 71e90546..75381a59 100644 --- a/src/store/modules/feature.store.js +++ b/src/store/modules/feature.store.js @@ -225,7 +225,7 @@ const feature = { ...extraFormObject } } - }; + } const geojson = createGeojson(); let url = `${rootState.configuration.VUE_APP_DJANGO_API_BASE}features/` diff --git a/src/views/My_account.vue b/src/views/My_account.vue index a21a20dd..4edc8223 100644 --- a/src/views/My_account.vue +++ b/src/views/My_account.vue @@ -317,16 +317,9 @@ export default { computed: { // todo : filter projects to user ...mapState([ -<<<<<<< HEAD - 'user', - 'projects', - 'USER_LEVEL_PROJECTS', - 'user_permissions', -======= "user", "USER_LEVEL_PROJECTS", "user_permissions", ->>>>>>> develop ]), ...mapState('projects', [ 'projects' diff --git a/src/views/Projects.vue b/src/views/Projects.vue index e00cfc26..08d61a51 100644 --- a/src/views/Projects.vue +++ b/src/views/Projects.vue @@ -1,33 +1,10 @@ <template> <div class="fourteen wide column"> -<<<<<<< HEAD:src/views/Index.vue - <img - class="ui centered small image" - :src="logo" - > - <!-- :src="LOGO_PATH" --> - <h2 class="ui center aligned icon header"> - <div class="content"> - {{ APPLICATION_NAME }} - <div class="sub header"> - {{ APPLICATION_ABSTRACT }} - </div> - </div> - </h2> - - <h4 - id="les_projets" - class="ui horizontal divider header" - > - PROJETS - </h4> -======= <h2 class="ui horizontal divider header"> PROJETS </h2> ->>>>>>> develop:src/views/Projects.vue <div class="flex"> <router-link v-if="user && user.can_create_project && isOffline() != true" @@ -47,17 +24,6 @@ </router-link> </div> -<<<<<<< HEAD:src/views/Index.vue - <div - v-if="projects" - class="ui divided items" - > - <div - v-for="project in projects" - :key="project.slug" - class="item" - > -======= <!-- FILTRES DES PROJETS --> <projects-menu @filter="setProjectsFilters" @@ -83,7 +49,6 @@ <div class="ui loader" /> </div> <div v-for="project in projects" class="item" :key="project.slug"> ->>>>>>> develop:src/views/Projects.vue <div class="ui tiny image"> <img :src=" @@ -164,15 +129,6 @@ </template> <script> -<<<<<<< HEAD:src/views/Index.vue -import { mapState } from 'vuex'; - -export default { - name: 'Index', - - computed: { - ...mapState(['projects', 'user', 'USER_LEVEL_PROJECTS']), -======= import { mapState, mapMutations, mapActions } from 'vuex'; import ProjectsMenu from '@/components/Projects/ProjectsMenu.vue'; @@ -204,7 +160,6 @@ export default { 'count', 'filters' ]), ->>>>>>> develop:src/views/Projects.vue APPLICATION_NAME() { return this.$store.state.configuration.VUE_APP_APPLICATION_NAME; }, @@ -219,11 +174,6 @@ export default { }, }, -<<<<<<< HEAD:src/views/Index.vue - created() { - if (this.$store.getters.project) { - this.$store.commit('SET_PROJECT_SLUG', null); -======= watch: { filters: { deep: true, @@ -258,7 +208,6 @@ export default { if (this.$store.getters.project) { this.$store.commit("SET_PROJECT_SLUG", null); ->>>>>>> develop:src/views/Projects.vue } }, @@ -278,9 +227,6 @@ export default { //* change path of thumbnail to update image return '?ver=' + Math.random(); }, -<<<<<<< HEAD:src/views/Index.vue - }, -======= getData(page) { this.loading = true; @@ -301,7 +247,6 @@ export default { this.SET_PROJECTS_FILTER(e); }, } ->>>>>>> develop:src/views/Projects.vue }; </script> diff --git a/src/views/feature_type/Feature_type_detail.vue b/src/views/feature_type/Feature_type_detail.vue index ba82219c..63cc83db 100644 --- a/src/views/feature_type/Feature_type_detail.vue +++ b/src/views/feature_type/Feature_type_detail.vue @@ -84,16 +84,8 @@ :class="loadingImportFile ? 'loading' : ''" > <div class="field"> -<<<<<<< HEAD - <label - class="ui icon button" - for="json_file" - > - <i class="file icon" /> -======= <label class="ui icon button ellipsis" for="json_file"> <i class="file icon"></i> ->>>>>>> develop <span class="label">{{ fileToImport.name }}</span> </label> <input @@ -105,12 +97,6 @@ @change="onFileChange" > </div> -<<<<<<< HEAD - <ul - v-if="importError" - class="errorlist" - > -======= <router-link v-if=" @@ -132,20 +118,14 @@ Ressource {{$route.params.geojson.name}} </div> <ul v-if="importError" class="errorlist"> ->>>>>>> develop <li> {{ importError }} </li> </ul> <button -<<<<<<< HEAD - :disabled="fileToImport.size === 0" -======= :disabled="fileToImport.size === 0 && !$route.params.geojson" @click="importGeoJson" ->>>>>>> develop class="ui fluid teal icon button" - @click="importGeoJson" > <i class="upload icon" /> Lancer l'import </button> @@ -304,11 +284,11 @@ import { fileConvertSizeToMo } from '@/assets/js/utils'; export default { name: 'FeatureTypeDetail', + components: { ImportTask: ImportTask, }, -<<<<<<< HEAD filters: { formatDate(value) { let date = new Date(value); @@ -316,9 +296,13 @@ export default { return date.substr(0, date.length - 3); //* quick & dirty way to remove seconds from date }, }, -======= - props: ["geojson", "typename", ], ->>>>>>> develop + + props: { + geojson: { + type: Object, + default: null, + }, + }, data() { return { @@ -330,20 +314,12 @@ export default { showImport: false, featuresLoading: true, loadingImportFile: false, -<<<<<<< HEAD -======= waitMessage: false, reloadingImport: false, ->>>>>>> develop }; }, computed: { -<<<<<<< HEAD - ...mapGetters(['project', 'permissions']), - ...mapState('feature', ['features', 'features_count']), - ...mapState('feature_type', ['feature_types', 'importFeatureTypeData']), -======= ...mapGetters([ 'project', 'permissions' @@ -368,7 +344,6 @@ export default { IDGO() { return this.$store.state.configuration.VUE_APP_IDGO; }, ->>>>>>> develop structure: function () { if (Object.keys(this.feature_types).length) { let st = this.feature_types.find( @@ -406,14 +381,8 @@ export default { structure(newValue) { if (newValue.slug) { this.GET_IMPORTS({ -<<<<<<< HEAD - feature_type: this.$route.params.feature_type_slug, - }); - } - }, -======= feature_type: this.$route.params.feature_type_slug - }) + }); } }, @@ -436,20 +405,12 @@ export default { } } }, ->>>>>>> develop }, created() { if (!this.project) { this.GET_PROJECT_INFO(this.$route.params.slug); } -<<<<<<< HEAD - this.$store.commit('feature/SET_FEATURES', []); //* empty features remaining in case they were in geojson format and will be fetch anyway - this.getFeatures(); - // .then(res => resolve(res)) - // .catch(err => reject(err)); - this.SET_CURRENT_FEATURE_TYPE_SLUG(this.$route.params.feature_type_slug); -======= this.$store.commit("feature/SET_FEATURES", []); //* empty remaining features in case they were in geojson format and will be fetch anyway this.getFeatures(); this.SET_CURRENT_FEATURE_TYPE_SLUG( @@ -458,7 +419,6 @@ export default { if (this.$route.params.type === "external-geojson") { this.showImport = true; } ->>>>>>> develop }, methods: { @@ -469,14 +429,9 @@ export default { toggleShowImport() { this.showImport = !this.showImport; if (this.showImport) { -<<<<<<< HEAD - this.$store.dispatch('feature_type/GET_IMPORTS', { - feature_type: this.$route.params.feature_type_slug, - }); -======= this.GET_IMPORTS({ - feature_type: this.$route.params.feature_type_slug }); ->>>>>>> develop + feature_type: this.$route.params.feature_type_slug + }); } }, diff --git a/src/views/feature_type/Feature_type_edit.vue b/src/views/feature_type/Feature_type_edit.vue index 6fc41d9a..30e7e0db 100644 --- a/src/views/feature_type/Feature_type_edit.vue +++ b/src/views/feature_type/Feature_type_edit.vue @@ -93,22 +93,13 @@ <div class="field"> <div class="ui checkbox"> <input -<<<<<<< HEAD -======= class="hidden" :id="form.title_optional.html_name" :name="form.title_optional.html_name" ->>>>>>> develop v-model="form.title_optional.value" - :name="form.title_optional.html_name" type="checkbox" -<<<<<<< HEAD - > - <label>{{ form.title_optional.label }}</label> -======= /> <label :for="form.title_optional.html_name">{{ form.title_optional.label }}</label> ->>>>>>> develop </div> </div> @@ -213,20 +204,12 @@ export default { FeatureTypeCustomForm, }, -<<<<<<< HEAD props: { geojson: { type: Object, default: null, }, - fileToImport: { - type: File, - default: null, - } }, -======= - props: ["geojson", "typename", ], ->>>>>>> develop data() { return { @@ -302,15 +285,9 @@ export default { }, computed: { -<<<<<<< HEAD - ...mapGetters(['project']), - ...mapState('feature_type', ['customForms', 'colorsStyleList']), - ...mapGetters('feature_type', ['feature_type']), -======= ...mapGetters(["project"]), ...mapState("feature_type", ["customForms", "colorsStyleList", "fileToImport"]), ...mapGetters("feature_type", ["feature_type"]), ->>>>>>> develop selectedGeomType: { get() { const currentGeomType = this.geomTypeChoices.find( @@ -384,10 +361,10 @@ export default { created() { if (!this.project) { - this.$store.dispatch('GET_PROJECT_INFO', this.$route.params.slug); + this.$store.dispatch("GET_PROJECT_INFO", this.$route.params.slug); } this.$store.commit( - 'feature_type/SET_CURRENT_FEATURE_TYPE_SLUG', + "feature_type/SET_CURRENT_FEATURE_TYPE_SLUG", this.$route.params.slug_type_signal ); @@ -395,32 +372,38 @@ export default { }, mounted() { - if (this.action === 'edit' || this.action === 'duplicate') { + if (this.action === "edit" || this.action === "duplicate") { if (this.feature_type) { //* add datas from store to state to avoid mutating directly store with v-model (not good practice), could have used computed with getter and setter as well this.fillFormData(this.feature_type); } - if (this.action === 'duplicate') { + if (this.action === "duplicate") { //* replace original name with new default title this.form.title.value += ` (Copie-${new Date() .toLocaleString() .slice(0, -3) - .replace(',', '')})`; + .replace(",", "")})`; this.updateStore(); // * initialize form in store in case this.form would not be modified } } //* when creation from a geojson if (this.geojson) { this.importGeoJsonFeatureType(); - if (this.$store.state.feature_type.fileToImport.name) { + if (this.fileToImport && this.fileToImport.name) { this.form.title.value = // * use the filename as title by default - this.$store.state.feature_type.fileToImport.name.split('.')[0]; + this.fileToImport.name.split(".")[0]; + } else { //* case when the geojson comes from datasud catalog + this.form.title.value = this.geojson.name;// * use the typename as title by default } } }, beforeDestroy() { - this.$store.commit('feature_type/EMPTY_FORM'); - this.$store.commit('feature_type/EMPTY_CUSTOM_FORMS'); + this.$store.commit("feature_type/EMPTY_FORM"); + this.$store.commit("feature_type/EMPTY_CUSTOM_FORMS"); + this.$store.commit( + "feature_type/SET_FILE_TO_IMPORT", + null + ); }, methods: { @@ -586,12 +569,7 @@ export default { }, async postFeatureTypeThenFeatures() { -<<<<<<< HEAD - this.loading = true; - const requestType = this.action === 'edit' ? 'put' : 'post'; -======= const requestType = this.action === "edit" ? "put" : "post"; ->>>>>>> develop if (this.checkForms()) { this.loading = true; await this.$store @@ -678,56 +656,6 @@ export default { } }, }, -<<<<<<< HEAD -======= - - created() { - if (!this.project) { - this.$store.dispatch("GET_PROJECT_INFO", this.$route.params.slug); - } - this.$store.commit( - "feature_type/SET_CURRENT_FEATURE_TYPE_SLUG", - this.$route.params.slug_type_signal - ); - - this.definePageType(); - }, - - mounted() { - if (this.action === "edit" || this.action === "duplicate") { - if (this.feature_type) { - //* add datas from store to state to avoid mutating directly store with v-model (not good practice), could have used computed with getter and setter as well - this.fillFormData(this.feature_type); - } - if (this.action === "duplicate") { - //* replace original name with new default title - this.form.title.value += ` (Copie-${new Date() - .toLocaleString() - .slice(0, -3) - .replace(",", "")})`; - this.updateStore(); // * initialize form in store in case this.form would not be modified - } - } - //* when creation from a geojson - if (this.geojson) { - this.importGeoJsonFeatureType(); - if (this.fileToImport && this.fileToImport.name) { - this.form.title.value = // * use the filename as title by default - this.fileToImport.name.split(".")[0]; - } else { //* case when the geojson comes from datasud catalog - this.form.title.value = this.geojson.name;// * use the typename as title by default - } - } - }, - beforeDestroy() { - this.$store.commit("feature_type/EMPTY_FORM"); - this.$store.commit("feature_type/EMPTY_CUSTOM_FORMS"); - this.$store.commit( - "feature_type/SET_FILE_TO_IMPORT", - null - ); - }, ->>>>>>> develop }; </script> diff --git a/src/views/project/Project_detail.vue b/src/views/project/Project_detail.vue index e6774bad..a0f9275f 100644 --- a/src/views/project/Project_detail.vue +++ b/src/views/project/Project_detail.vue @@ -1,6 +1,5 @@ <template> <div v-frag> -<<<<<<< HEAD <div v-if="permissions && permissions.can_view_project && project" v-frag @@ -13,16 +12,7 @@ v-if="tempMessage" class="ui positive message" > - <!-- <i class="close icon"></i> --> - <!-- <div class="header">You are eligible for a reward</div> --> - <p><i class="check icon" /> {{ tempMessage }}</p> -======= - <div v-frag v-if="permissions && permissions.can_view_project && project"> - <div id="message" class="fullwidth"> - <div v-if="tempMessage" class="ui positive message"> - <p><i class="check icon"></i> {{ tempMessage }}</p> ->>>>>>> develop </div> </div> <div @@ -77,60 +67,6 @@ }} </div> </div> -<<<<<<< HEAD - <div class="ten wide column"> - <h1 class="ui header"> - <div class="content"> - {{ project.title }} - <div v-if="arraysOffline.length > 0"> - {{ arraysOffline.length }} modification<span - v-if="arraysOffline.length > 1" - >s</span> - en attente - <button - :disabled="isOffline()" - class="ui fluid teal icon button" - @click="sendOfflineFeatures()" - > - <i class="upload icon" /> Envoyer au serveur - </button> - </div> - <div class="ui icon right floated compact buttons"> - <a - v-if=" - user && - permissions && - permissions.can_view_project && - isOffline() !== true - " - id="subscribe-button" - class="ui button button-hover-green" - data-tooltip="S'abonner au projet" - data-position="top center" - data-variation="mini" - @click="isModalOpen = true" - > - <i class="inverted grey envelope icon" /> - </a> - <router-link - v-if=" - permissions && - permissions.can_update_project && - isOffline() !== true - " - :to="{ name: 'project_edit', params: { slug: project.slug } }" - class="ui button button-hover-orange" - data-tooltip="Modifier le projet" - data-position="top center" - data-variation="mini" - > - <i class="inverted grey pencil alternate icon" /> - </router-link> - </div> - <div class="ui hidden divider" /> - <div class="sub header"> - {{ project.description }} -======= <div class="ten wide column important-flex space-between"> <div> <h1 class="ui header"> @@ -210,7 +146,6 @@ <i class="close icon" @click="confirmMsg = ''" /> </div> ->>>>>>> develop </div> </div> </div> @@ -338,99 +273,41 @@ <i class="info circle icon" /> Import en cours </div> -<<<<<<< HEAD - <div - v-else - v-frag -======= <div v-else v-frag> - <a - v-if=" - user_permissions && - user_permissions[project.slug] && - user_permissions[project.slug].is_project_administrator && - isOffline() !== true - " - @click="toggleDeleteFeatureType(type)" - class=" - ui - compact - small - icon - right - floated - button button-hover-red - " - data-tooltip="Supprimer le type de signalement" - data-position="top center" - data-variation="mini" - > - <i class="inverted grey trash alternate icon"></i> - </a> - <router-link - :to="{ - name: 'editer-symbologie-signalement', - params: { slug_type_signal: type.slug }, - }" - v-if=" - project && - permissions && - permissions.can_create_feature_type && - isOffline() != true - " - class=" - ui - compact - small - icon - right - floated - button button-hover-orange - " - data-tooltip="Éditer la symbologie du type de signalement" - data-position="top center" - data-variation="mini" - > - <i class="inverted grey paint brush alternate icon"></i> - </router-link> - <router-link - :to="{ - name: 'editer-type-signalement', - params: { slug_type_signal: type.slug }, - }" - v-if=" - project && - type.is_editable && - permissions && - permissions.can_create_feature_type && - isOffline() !== true - " - class=" - ui - compact - small - icon - right - floated - button button-hover-orange - " - data-tooltip="Éditer le type de signalement" - data-position="top left" - data-variation="mini" ->>>>>>> develop - > - <router-link + <a v-if=" - project && - type.geom_type === 'point' && - permissions && - permissions.can_create_feature_type && - isOffline() != true + user_permissions && + user_permissions[project.slug] && + user_permissions[project.slug].is_project_administrator && + isOffline() !== true + " + @click="toggleDeleteFeatureType(type)" + class=" + ui + compact + small + icon + right + floated + button button-hover-red " + data-tooltip="Supprimer le type de signalement" + data-position="top center" + data-variation="mini" + > + <i class="inverted grey trash alternate icon"></i> + </a> + <router-link :to="{ name: 'editer-symbologie-signalement', params: { slug_type_signal: type.slug }, }" + v-if=" + project && + permissions && + permissions.can_create_feature_type && + isOffline() != true + " class=" ui compact @@ -438,26 +315,26 @@ icon right floated - button button-hover-green + button button-hover-orange " data-tooltip="Éditer la symbologie du type de signalement" - data-position="left center" + data-position="top center" data-variation="mini" > - <i class="inverted grey paint brush alternate icon" /> + <i class="inverted grey paint brush alternate icon"></i> </router-link> <router-link - v-if=" - project && - type.is_editable && - permissions && - permissions.can_create_feature_type && - isOffline() !== true - " :to="{ name: 'editer-type-signalement', params: { slug_type_signal: type.slug }, }" + v-if=" + project && + type.is_editable && + permissions && + permissions.can_create_feature_type && + isOffline() !== true + " class=" ui compact @@ -465,10 +342,10 @@ icon right floated - button button-hover-green + button button-hover-orange " data-tooltip="Éditer le type de signalement" - data-position="left center" + data-position="top center" data-variation="mini" > <i class="inverted grey pencil alternate icon" /> @@ -530,25 +407,7 @@ style="display: none" name="json_file" @change="onFileChange" -<<<<<<< HEAD - > - </a> - <br> - <div - v-if="fileToImport.size > 0" - id="button-import" - > - <button - :disabled="fileToImport.size === 0" - class="ui fluid teal icon button" - @click="toNewFeatureType" - > - <i class="upload icon" /> Lancer l'import avec le fichier - {{ fileToImport.name }} - </button> -======= /> ->>>>>>> develop </div> </div> @@ -805,15 +664,6 @@ { 'transition visible active': modalType }, ]" > -<<<<<<< HEAD - <i - class="close icon" - @click="isModalOpen = false" - /> - <div class="ui icon header"> - <i class="envelope icon" /> - Notifications du projet -======= <i @click="modalType = false" class="close icon"></i> <div class="ui icon header"> <i :class="[modalType === 'subscribe' ? 'envelope' : 'trash', 'icon']"></i> @@ -822,7 +672,6 @@ }} du {{ modalType === 'deleteFeatureType' ? 'type de signalement ' + featureTypeToDelete.title : 'projet' }} ->>>>>>> develop </div> <div class="content"> <div v-if="modalType !== 'subscribe'" > @@ -835,13 +684,8 @@ </p> </div> <button -<<<<<<< HEAD - :class="['ui compact fluid button', is_suscriber ? 'red' : 'green']" - @click="subscribeProject" -======= @click="handleModalClick" :class="['ui compact fluid button', modalType === 'subscribe' && !is_suscriber ? 'green' : 'red']" ->>>>>>> develop > <span v-if="modalType === 'subscribe'"> {{ @@ -894,20 +738,12 @@ </template> <script> -<<<<<<< HEAD -import frag from 'vue-frag'; -import { mapUtil } from '@/assets/js/map-util.js'; -import { mapGetters, mapState, mapActions, mapMutations } from 'vuex'; -import projectAPI from '@/services/project-api'; -import featureAPI from '@/services/feature-api'; -======= import frag from "vue-frag"; import { mapUtil } from "@/assets/js/map-util.js"; import { mapGetters, mapState, mapActions, mapMutations } from "vuex"; import projectAPI from "@/services/project-api"; import featureTypeAPI from "@/services/featureType-api"; import featureAPI from "@/services/feature-api"; ->>>>>>> develop import axios from '@/axios-client.js'; @@ -963,13 +799,6 @@ export default { }, computed: { -<<<<<<< HEAD - ...mapGetters(['project', 'permissions']), - ...mapState('feature_type', ['feature_types', 'importFeatureTypeData']), - ...mapState('feature', ['features']), - ...mapState(['last_comments', 'user', 'reloadIntervalId']), - ...mapState('map', ['map']), -======= ...mapGetters([ 'permissions' ]), @@ -995,7 +824,6 @@ export default { ...mapState('map', [ 'map' ]), ->>>>>>> develop DJANGO_BASE_URL() { return this.configuration.VUE_APP_DJANGO_BASE; }, @@ -1011,12 +839,9 @@ export default { fileSize() { return fileConvertSizeToMo(this.fileToImport.size); }, -<<<<<<< HEAD -======= isSharedProject() { return this.$route.path.includes('projet-partage'); } ->>>>>>> develop }, watch: { @@ -1056,24 +881,6 @@ export default { } }, }, -<<<<<<< HEAD - - features: { - deep: true, - handler(newValue, oldValue) { - if (newValue && newValue.length && newValue !== oldValue) { - mapUtil.addFeatures(this.features, {}, true, this.feature_types); - this.mapLoading = false; - } - }, - }, - featuresLoading(newValue) { - if (!newValue && this.features && this.features.length === 0) { - this.mapLoading = false; - } - }, -======= ->>>>>>> develop }, created() { @@ -1090,19 +897,7 @@ export default { }, mounted() { -<<<<<<< HEAD - this.GET_PROJECT_INFO(this.slug) - .then(() => { - this.projectInfoLoading = false; - setTimeout(this.initMap, 1000); - }) - .catch((err) => { - console.error(err); - this.projectInfoLoading = false; - }); -======= this.retrieveProjectInfo(); ->>>>>>> develop if (this.message) { this.tempMessage = this.message; @@ -1118,14 +913,6 @@ export default { }, methods: { -<<<<<<< HEAD - ...mapMutations(['SET_RELOAD_INTERVAL_ID', 'CLEAR_RELOAD_INTERVAL_ID']), - ...mapActions(['GET_PROJECT_INFO']), - ...mapActions('map', ['INITIATE_MAP']), - ...mapActions('feature_type', ['GET_IMPORTS']), - ...mapActions('feature', ['GET_PROJECT_FEATURES']), - ...mapActions('feature_type', ['GET_PROJECT_FEATURE_TYPES']), -======= ...mapMutations([ 'SET_RELOAD_INTERVAL_ID', 'CLEAR_RELOAD_INTERVAL_ID', @@ -1147,19 +934,14 @@ export default { ...mapActions('feature_type', [ 'GET_PROJECT_FEATURE_TYPES' ]), ->>>>>>> develop refreshId() { return '?ver=' + Math.random(); }, getRouteUrl(url) { -<<<<<<< HEAD - return '/' + url.replace(this.$store.state.configuration.BASE_URL, ''); // remove duplicate /geocontrib -======= if (this.isSharedProject) { url = url.replace("projet", "projet-partage") } return url.replace(this.$store.state.configuration.BASE_URL, ""); //* remove duplicate /geocontrib ->>>>>>> develop }, isOffline() { return navigator.onLine === false; @@ -1476,11 +1258,7 @@ export default { .nouveau-type-signalement { margin-top: 1em; } -<<<<<<< HEAD -.nouveau-type-signalement > a > .ui > .label { -======= .nouveau-type-signalement .label{ ->>>>>>> develop cursor: pointer; } diff --git a/src/views/project/Project_edit.vue b/src/views/project/Project_edit.vue index 08c617cf..7873ebf8 100644 --- a/src/views/project/Project_edit.vue +++ b/src/views/project/Project_edit.vue @@ -193,14 +193,10 @@ <div class="field"> <div class="ui checkbox"> <input -<<<<<<< HEAD id="moderation" -======= class="hidden" type="checkbox" ->>>>>>> develop v-model="form.moderation" - type="checkbox" name="moderation" > <label for="moderation">Modération</label> @@ -210,14 +206,10 @@ <div class="field"> <div class="ui checkbox"> <input -<<<<<<< HEAD id="is_project_type" -======= class="hidden" type="checkbox" ->>>>>>> develop v-model="form.is_project_type" - type="checkbox" name="is_project_type" > <label for="is_project_type">Est un projet type</label> @@ -227,11 +219,11 @@ <div class="field"> <div class="ui checkbox"> <input + id="generate_share_link" class="hidden" type="checkbox" v-model="form.generate_share_link" name="generate_share_link" - id="generate_share_link" /> <label for="generate_share_link">Génération d'un lien de partage externe</label> </div> @@ -254,17 +246,7 @@ import axios from '@/axios-client.js'; import Dropdown from '@/components/Dropdown.vue'; -<<<<<<< HEAD -import { mapState, mapGetters } from 'vuex'; - -// axios.defaults.headers.common["X-CSRFToken"] = ((name) => { -// var re = new RegExp(name + "=([^;]+)"); -// var value = re.exec(document.cookie); -// return value !== null ? unescape(value[1]) : null; -// })("csrftoken"); -======= import { mapState, mapGetters, mapActions } from "vuex"; ->>>>>>> develop export default { name: 'ProjectEdit', @@ -455,15 +437,9 @@ export default { goBackNrefresh(slug) { Promise.all([ -<<<<<<< HEAD - this.$store.dispatch('GET_USER_LEVEL_PROJECTS'), //* refresh projects user levels - this.$store.dispatch('GET_USER_LEVEL_PERMISSIONS'), //* refresh projects permissions - this.$store.dispatch('GET_ALL_PROJECTS'), //* & refresh project list -======= this.$store.dispatch("GET_USER_LEVEL_PROJECTS"), //* refresh projects user levels this.$store.dispatch("GET_USER_LEVEL_PERMISSIONS"), //* refresh projects permissions this.GET_ALL_PROJECTS(), //* & refresh project list ->>>>>>> develop ]).then(() => // * go back to project list this.$router.push({ diff --git a/src/views/project/Project_members.vue b/src/views/project/Project_members.vue index 13dcd39c..ffdd8f42 100644 --- a/src/views/project/Project_members.vue +++ b/src/views/project/Project_members.vue @@ -304,14 +304,6 @@ export default { ) .then((response) => { if (response.status === 200) { -<<<<<<< HEAD - this.$store.dispatch('GET_USER_LEVEL_PROJECTS'); //* update user status in top right menu - this.$store.commit('DISPLAY_MESSAGE', 'Permissions mises à jour'); - } else { - this.$store.commit( - 'DISPLAY_MESSAGE', - "Une erreur s'est produite pendant la mises à jour des permissions" -======= this.$store.dispatch("GET_USER_LEVEL_PROJECTS"); //* update user status in top right menu this.$store.commit("DISPLAY_MESSAGE", {comment: "Permissions mises à jour", level: "positive"}); } else { @@ -321,7 +313,6 @@ export default { comment : "Une erreur s'est produite pendant la mises à jour des permissions", level: "negative" } ->>>>>>> develop ); } }) diff --git a/src/views/registration/Login.vue b/src/views/registration/Login.vue index 9852de0a..2e5d99c9 100644 --- a/src/views/registration/Login.vue +++ b/src/views/registration/Login.vue @@ -125,18 +125,5 @@ export default { .catch(); }, }, -<<<<<<< HEAD -======= - - mounted() { - if (this.$store.state.user) { - this.$store.commit( - "DISPLAY_MESSAGE", - {comment :"Vous êtes déjà connecté, vous allez être redirigé vers la page d'accueil."} - ); - setTimeout(() => this.$router.push("/"), 3100); - } - }, ->>>>>>> develop }; </script> \ No newline at end of file -- GitLab