diff --git a/src/components/Feature/Detail/FeatureComments.vue b/src/components/Feature/Detail/FeatureComments.vue index a6d633779638868f9b562d7c435c2776e45f2502..c47c5ec5659b72699b3dffe4bcae00a6f853c892 100644 --- a/src/components/Feature/Detail/FeatureComments.vue +++ b/src/components/Feature/Detail/FeatureComments.vue @@ -207,10 +207,12 @@ export default { 'user', 'isOnline', ]), - ...mapGetters([ 'permissions', ]), + ...mapState('feature', [ + 'currentFeature', + ]), DJANGO_BASE_URL() { return this.$store.state.configuration.VUE_APP_DJANGO_BASE; @@ -231,14 +233,14 @@ export default { if (this.validateForm()) { featureAPI .postComment({ - featureId: this.$route.params.slug_signal, + featureId: this.currentFeature.feature_id, comment: this.comment_form.comment.value, }) .then((response) => { if (response && this.comment_form.attachment_file.file) { featureAPI .postCommentAttachment({ - featureId: this.$route.params.slug_signal, + featureId: this.currentFeature.feature_id, file: this.comment_form.attachment_file.file, fileName: this.comment_form.attachment_file.fileName, title: this.comment_form.attachment_file.title, diff --git a/src/components/Feature/Detail/FeatureTable.vue b/src/components/Feature/Detail/FeatureTable.vue index fd124755b3a821ca21da6b3eaab97b48a6e1a627..ef36f677aa2df6d4aa818ac0a5f065e6a020d132 100644 --- a/src/components/Feature/Detail/FeatureTable.vue +++ b/src/components/Feature/Detail/FeatureTable.vue @@ -115,6 +115,13 @@ {{ link.feature_to.created_on }}) </td> </tr> + <tr v-if="linked_features.length === 0"> + <td> + <em> + Aucune liaison associée au signalement. + </em> + </td> + </tr> </tbody> </table> </div>