mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Refactor: Put id in data.resource object
This commit is contained in:
parent
173c2c3281
commit
7d7a1be43d
@ -86,7 +86,9 @@ describe('DisableModal.vue', () => {
|
||||
beforeEach(() => {
|
||||
propsData = {
|
||||
isOpen: true,
|
||||
id: 4711
|
||||
resource: {
|
||||
id: 4711
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user