diff --git a/app/javascript/vue/protocol/attachments.vue b/app/javascript/vue/protocol/attachments.vue
index f757b95b3..965a452a8 100644
--- a/app/javascript/vue/protocol/attachments.vue
+++ b/app/javascript/vue/protocol/attachments.vue
@@ -80,7 +80,7 @@
:attachment.sync="attachmentsOrdered[index]"
:stepId="parseInt(step.id)"
@attachment:viewMode="updateAttachmentViewMode"
- @attachment:delete="attachments.splice(index, 1)"
+ @attachment:delete="deleteAttachment"
/>
@@ -155,7 +155,11 @@
return 'uploadingAttachment'
}
return `${attachment.attributes.view_mode}Attachment`
- }
+ },
+ deleteAttachment(index) {
+ this.attachments.splice(index, 1)
+ this.$emit('attachment:deleted')
+ },
}
}
diff --git a/app/javascript/vue/protocol/container.vue b/app/javascript/vue/protocol/container.vue
index a529a9d89..b5371a85f 100644
--- a/app/javascript/vue/protocol/container.vue
+++ b/app/javascript/vue/protocol/container.vue
@@ -101,6 +101,7 @@
:inRepository="inRepository"
@step:delete="updateStepsPosition"
@step:update="updateStep"
+ @stepUpdated="refreshProtocolStatus"
:reorderStepUrl="steps.length > 1 ? urls.reorder_steps_url : null"
/>
diff --git a/app/javascript/vue/protocol/mixins/attachments.js b/app/javascript/vue/protocol/mixins/attachments.js
index 64b81d5c9..c0dfe87a8 100644
--- a/app/javascript/vue/protocol/mixins/attachments.js
+++ b/app/javascript/vue/protocol/mixins/attachments.js
@@ -64,6 +64,7 @@ export default {
});
filesUploadedCntr += 1;
if (filesUploadedCntr === filesToUploadCntr) {
+ this.$emit('stepUpdated');
resolve('done');
}
}
diff --git a/app/javascript/vue/protocol/step.vue b/app/javascript/vue/protocol/step.vue
index 12826f81b..25daf9763 100644
--- a/app/javascript/vue/protocol/step.vue
+++ b/app/javascript/vue/protocol/step.vue
@@ -139,6 +139,7 @@
{{i18n.t('assets.from_clipboard.file_name')}}