fix: Update Contribution List after Admin Updates Contribution

This commit is contained in:
Moriz Wahl 2022-11-03 13:01:02 +01:00
parent 1bdb41f3a2
commit 0ba82d66fe
2 changed files with 9 additions and 6 deletions

View File

@ -118,12 +118,11 @@ export default {
},
methods: {
updateCreationData(data) {
this.creationUserData = data
// this.creationUserData.amount = data.amount
// this.creationUserData.date = data.date
// this.creationUserData.memo = data.memo
// this.creationUserData.moderator = data.moderator
data.row.toggleDetails()
const row = data.row
this.$emit('update-contribution', data)
delete data.row
this.creationUserData = { ...this.creationUserData, ...data }
row.toggleDetails()
},
updateUserData(rowItem, newCreation) {
rowItem.creation = newCreation

View File

@ -10,6 +10,7 @@
@remove-creation="removeCreation"
@show-overlay="showOverlay"
@update-state="updateState"
@update-contribution="updateContribution"
/>
</div>
</template>
@ -98,6 +99,9 @@ export default {
this.pendingCreations.find((obj) => obj.id === id).messagesCount++
this.pendingCreations.find((obj) => obj.id === id).state = 'IN_PROGRESS'
},
updateContribution() {
this.getPendingCreations()
},
},
computed: {
fields() {