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

fix comment not sent & add info message for empty linked features

parent 546d01eb
No related branches found
No related tags found
No related merge requests found
......@@ -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,
......
......@@ -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>
......
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