diff --git a/frontend/src/components/Contributions/ContributionForm.vue b/frontend/src/components/Contributions/ContributionForm.vue index 20d7ff921..ff74786d6 100644 --- a/frontend/src/components/Contributions/ContributionForm.vue +++ b/frontend/src/components/Contributions/ContributionForm.vue @@ -16,7 +16,7 @@ {{ $t('contribution.activity') }} {{ $t('contribution.submit') }} - {{ $store.state }} + {{date}}, {{amount}}, {{ memo}} @@ -70,6 +70,12 @@ */ export default { name: 'ContributionForm', + props: { + id: { type: Number, required: false}, + date: { type: String, required: true}, + memo: { type: String, required: true}, + amount: { type: String, required: true}, + }, data() { return { minlength: 50, @@ -78,9 +84,9 @@ export default { min: new Date(new Date(new Date().setMonth(new Date().getMonth() - 1)).setDate(1)), max: new Date(), form: { - date: '', - memo: '', - amount: 0, + date: this.date, + memo: this.memo, + amount: this.amount, }, } }, @@ -119,5 +125,11 @@ export default { return this.$t('contribution.formText.thisMonth', obj) }, }, + watch: { + id(newId, oldId){ + console.log('eine id kommt mit') + } + + } } diff --git a/frontend/src/components/Contributions/ContributionList.vue b/frontend/src/components/Contributions/ContributionList.vue index e7fc930e6..c08d22c79 100644 --- a/frontend/src/components/Contributions/ContributionList.vue +++ b/frontend/src/components/Contributions/ContributionList.vue @@ -2,7 +2,7 @@
{{ items.length }}
- +
{{ $d(new Date(date), 'short') }}
{{ memo }}
-
+
-
- -
@@ -69,5 +77,10 @@ export default { return this.createdAt }, }, + methods: { + updateContribution(item) { + this.$emit('update-contribution', item) + }, + }, } diff --git a/frontend/src/pages/Community.vue b/frontend/src/pages/Community.vue index 6db97b5a0..b5907aefa 100644 --- a/frontend/src/pages/Community.vue +++ b/frontend/src/pages/Community.vue @@ -1,14 +1,15 @@