diff --git a/components/Modal/DisableModal.spec.js b/components/Modal/DisableModal.spec.js index 920122842..272e1e56e 100644 --- a/components/Modal/DisableModal.spec.js +++ b/components/Modal/DisableModal.spec.js @@ -86,7 +86,9 @@ describe('DisableModal.vue', () => { beforeEach(() => { propsData = { isOpen: true, - id: 4711 + resource: { + id: 4711 + } } }) diff --git a/components/Modal/DisableModal.vue b/components/Modal/DisableModal.vue index ceafea7c3..90b13d542 100644 --- a/components/Modal/DisableModal.vue +++ b/components/Modal/DisableModal.vue @@ -33,14 +33,10 @@ export default { type: Boolean, default: false }, - id: { - type: Number, - default: null - }, resource: { type: Object, default() { - return { type: 'contribution', name: '' } + return { id: null, type: 'contribution', name: '' } } } }, @@ -62,7 +58,7 @@ export default { disable(id: $id) } `, - variables: { id: this.id } + variables: { id: this.resource.id } }) this.$toast.success(this.$t('disable.success')) } catch (err) {