@@ -118,8 +115,8 @@ export default {
}
},
methods: {
- updateAmount(amount) {
- this.form.amount = (amount * 20).toFixed(2).toString()
+ updateAmount(hours) {
+ this.form.amount = (hours * 20).toFixed(2).toString()
},
submit() {
this.$emit(this.form.id ? 'update-contribution' : 'set-contribution', { ...this.form })
@@ -135,6 +132,15 @@ export default {
},
},
computed: {
+ showMessage() {
+ if (this.maxGddThisMonth <= 0 && this.maxGddLastMonth <= 0) return true
+ if (this.form.date)
+ return (
+ (this.isThisMonth && this.maxGddThisMonth <= 0) ||
+ (!this.isThisMonth && this.maxGddLastMonth <= 0)
+ )
+ return false
+ },
disabled() {
return (
this.form.date === '' ||
diff --git a/frontend/src/components/Contributions/ContributionList.spec.js b/frontend/src/components/Contributions/ContributionList.spec.js
index a1dfc934d..de875cf74 100644
--- a/frontend/src/components/Contributions/ContributionList.spec.js
+++ b/frontend/src/components/Contributions/ContributionList.spec.js
@@ -116,5 +116,15 @@ describe('ContributionList', () => {
expect(wrapper.emitted('delete-contribution')).toEqual([[{ id: 2 }]])
})
})
+
+ describe('update status', () => {
+ beforeEach(() => {
+ wrapper.findComponent({ name: 'ContributionListItem' }).vm.$emit('update-state', { id: 2 })
+ })
+
+ it('emits update status', () => {
+ expect(wrapper.emitted('update-state')).toEqual([[{ id: 2 }]])
+ })
+ })
})
})
diff --git a/frontend/src/components/DecayInformations/DecayInformation-BeforeStartblock.vue b/frontend/src/components/DecayInformations/DecayInformation-BeforeStartblock.vue
index c0f34e24d..037b4f376 100644
--- a/frontend/src/components/DecayInformations/DecayInformation-BeforeStartblock.vue
+++ b/frontend/src/components/DecayInformations/DecayInformation-BeforeStartblock.vue
@@ -1,5 +1,9 @@