summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/pipelines/components/async_button.vue
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/pipelines/components/async_button.vue')
-rw-r--r--app/assets/javascripts/pipelines/components/async_button.vue16
1 files changed, 7 insertions, 9 deletions
diff --git a/app/assets/javascripts/pipelines/components/async_button.vue b/app/assets/javascripts/pipelines/components/async_button.vue
index 77553ca67cc..a5f22c4ec80 100644
--- a/app/assets/javascripts/pipelines/components/async_button.vue
+++ b/app/assets/javascripts/pipelines/components/async_button.vue
@@ -31,10 +31,9 @@
type: String,
required: true,
},
- confirmActionMessage: {
- type: String,
- required: false,
- default: '',
+ id: {
+ type: Number,
+ required: true,
},
},
data() {
@@ -49,11 +48,10 @@
},
methods: {
onClick() {
- if (this.confirmActionMessage !== '' && confirm(this.confirmActionMessage)) {
- this.makeRequest();
- } else if (this.confirmActionMessage === '') {
- this.makeRequest();
- }
+ eventHub.$emit('actionConfirmationModal', {
+ id: this.id,
+ callback: this.makeRequest,
+ });
},
makeRequest() {
this.isLoading = true;