Skip to content
Snippets Groups Projects

REDMINE_ISSUE-15534| Amélioration du parcours de signalements - Activer le parcours de signalements sur tous les clics sur un signalement + affichage du tri et du filtre courants

Merged REDMINE_ISSUE-15534| Amélioration du parcours de signalements - Activer le parcours de signalements sur tous les clics sur un signalement + affichage du tri et du filtre courants
Merged Timothee P requested to merge redmine-issues/15534 into develop
3 files
+ 120
22
Compare changes
  • Side-by-side
  • Inline
Files
3
<template>
<div class="item">
<div class="content">
<div>
<router-link
:to="{
name: 'details-signalement-filtre',
params: {
slug_type_signal: item.properties.feature_type.slug,
},
query,
}"
>
{{ item.properties.title || item.id }}
</router-link>
</div>
<div class="description">
<em>
[{{ item.properties.created_on }}
<span v-if="user && item.properties.creator">
, par
{{
item.properties.creator.full_name
? item.properties.creator.full_name
: item.properties.creator.username
}}
</span>
]
</em>
</div>
</div>
</div>
<router-link
:to="{
name: 'details-signalement-filtre',
params: {
slug_type_signal: properties.feature_type.slug,
},
query,
}"
>
{{ properties.title || featureId }}
</router-link>
</template>
<script>
@@ -39,10 +19,14 @@ import axios from '@/axios-client.js';
export default {
name: 'ProjectLastFeatures',
name: 'FeatureFetchOffsetRoute',
props: {
item: {
featureId: {
type: String,
default: '',
},
properties: {
type: Object,
default: () => {},
}
@@ -56,26 +40,26 @@ export default {
},
computed: {
...mapState([
'user'
]),
...mapState('projects', [
'project'
]),
query() {
const searchParams = { ordering: this.project.feature_browsing_default_sort };
if (this.project && this.project.feature_browsing_default_filter === 'feature_type') { // when feature_type is the default filter of the project,
searchParams['feature_type_slug'] = this.item.properties.feature_type.slug; // get its slug for the current feature
}
if (this.position >= 0) {
searchParams['offset'] = this.position; // get its slug for the current feature
if (this.project) {
const searchParams = { ordering: this.project.feature_browsing_default_sort };
if (this.project.feature_browsing_default_filter === 'feature_type') { // when feature_type is the default filter of the project,
searchParams['feature_type_slug'] = this.properties.feature_type.slug; // get its slug for the current feature
}
if (this.position >= 0) {
searchParams['offset'] = this.position; // get its slug for the current feature
}
return searchParams;
}
return searchParams;
return {};
},
},
created() {
this.getFeaturePosition(this.item.id).then((position) => {
this.getFeaturePosition(this.featureId).then((position) => {
if (position >= 0) {
this.position = position;
}
Loading