Skip to content
Snippets Groups Projects
Commit d025615a authored by Camille Blanchon's avatar Camille Blanchon
Browse files

Merge branch 'redmine-issues/13575' into 'develop'

REDMINE_ISSUE-13575| Mode déconnecté - Désactiver les filtres dans la page liste et carte

See merge request !473
parents 47c70826 d517222e
No related branches found
No related tags found
No related merge requests found
......@@ -147,6 +147,7 @@
>
<td
v-if="isOnline"
id="select"
class="dt-center"
>
<div
......@@ -165,7 +166,10 @@
</div>
</td>
<td class="dt-center">
<td
id="status"
class="dt-center"
>
<div
v-if="feature.status === 'archived'"
data-tooltip="Archivé"
......@@ -203,7 +207,10 @@
/>
</div>
</td>
<td class="dt-center">
<td
id="type"
class="dt-center"
>
<router-link
:to="{
name: 'details-type-signalement',
......@@ -216,7 +223,10 @@
{{ feature.feature_type.title }}
</router-link>
</td>
<td class="dt-center">
<td
id="name"
class="dt-center"
>
<router-link
:to="{
name: 'details-signalement-filtre',
......@@ -230,17 +240,22 @@
{{ feature.title || feature.feature_id }}
</router-link>
</td>
<td class="dt-center">
<td
id="update"
class="dt-center"
>
{{ feature.updated_on | formatDate }}
</td>
<td
v-if="user"
id="author"
class="dt-center"
>
{{ feature.display_creator || ' ---- ' }}
</td>
<td
v-if="user"
id="last_editor"
class="dt-center"
>
{{ feature.display_last_editor || ' ---- ' }}
......@@ -706,25 +721,25 @@ and also iPads specifically.
/*
Label the data
*/
td:nth-of-type(1):before {
td#select:before {
content: "";
}
td:nth-of-type(2):before {
td#status:before {
content: "Statut";
}
td:nth-of-type(3):before {
td#type:before {
content: "Type";
}
td:nth-of-type(4):before {
td#name:before {
content: "Nom";
}
td:nth-of-type(5):before {
td#update:before {
content: "Dernière modification";
}
td:nth-of-type(6):before {
td#author:before {
content: "Auteur";
}
td:nth-of-type(7):before {
td#last_editor:before {
content: "Dernier éditeur";
}
......
......@@ -154,6 +154,9 @@ export default {
},
computed: {
...mapState([
'isOnline'
]),
...mapState('projects', [
'project',
]),
......@@ -177,6 +180,17 @@ export default {
},
},
watch: {
isOnline(newValue, oldValue) {
if (newValue != oldValue && !newValue) {
this.DISPLAY_MESSAGE({
comment: 'Les signalements du projet non mis en cache ne sont pas accessibles en mode déconnecté',
});
}
},
},
mounted() {
if (!this.project) {
// Chargements des features et infos projet en cas d'arrivée directe sur la page ou de refresh
......@@ -196,6 +210,9 @@ export default {
},
methods: {
...mapMutations([
'DISPLAY_MESSAGE',
]),
...mapActions('feature', [
'DELETE_FEATURE',
]),
......@@ -243,7 +260,7 @@ export default {
this.UPDATE_CHECKED_FEATURES(newCheckedFeatures);
this.modifyStatus(newStatus);
} else {
this.$store.commit('DISPLAY_MESSAGE', {
this.DISPLAY_MESSAGE({
comment: `Le signalement ${feature.title} n'a pas pu être modifié`,
level: 'negative'
});
......@@ -253,7 +270,7 @@ export default {
}
} else {
this.fetchPagedFeatures();
this.$store.commit('DISPLAY_MESSAGE', {
this.DISPLAY_MESSAGE({
comment: 'Tous les signalements ont été modifié avec succès.',
level: 'positive'
});
......@@ -384,6 +401,12 @@ export default {
},
fetchPagedFeatures(newUrl) {
if (!navigator.onLine) {
this.DISPLAY_MESSAGE({
comment: 'Les signalements du projet non mis en cache ne sont pas accessibles en mode déconnecté',
});
return;
}
let url = `${this.API_BASE_URL}projects/${this.projectSlug}/feature-paginated/?limit=${this.pagination.pagesize}&offset=${this.pagination.start}`;
//* if receiving next & previous url (// todo : might be not used anymore, to check)
if (newUrl && typeof newUrl === 'string') {
......
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