diff --git a/app/imports/api/properties/subSchemas/ResourceSchema.js b/app/imports/api/properties/subSchemas/ResourceSchema.js index 9e406a3d..412f0b82 100644 --- a/app/imports/api/properties/subSchemas/ResourceSchema.js +++ b/app/imports/api/properties/subSchemas/ResourceSchema.js @@ -8,7 +8,7 @@ const ResourceSchema = new SimpleSchema({ 'itemsConsumed.$': { type: Object, }, - 'itemsConsumed.$.variableName': { + 'itemsConsumed.$.tag': { type: String, }, 'itemsConsumed.$.quantity': { diff --git a/app/imports/ui/properties/forms/AdjustmentListForm.vue b/app/imports/ui/properties/forms/AdjustmentListForm.vue index 77701184..3942098d 100644 --- a/app/imports/ui/properties/forms/AdjustmentListForm.vue +++ b/app/imports/ui/properties/forms/AdjustmentListForm.vue @@ -27,23 +27,11 @@ -
- - add - -
diff --git a/app/imports/ui/properties/forms/BuffListForm.vue b/app/imports/ui/properties/forms/BuffListForm.vue index 3dcd1595..d58c4ad7 100644 --- a/app/imports/ui/properties/forms/BuffListForm.vue +++ b/app/imports/ui/properties/forms/BuffListForm.vue @@ -30,17 +30,6 @@ -
- - add - -
@@ -66,18 +55,6 @@ default: undefined, }, }, - data(){return { - addBuffLoading: false, - }}, - methods: { - acknowledgeAddBuff(){ - this.addBuffLoading = false; - }, - addBuff(){ - this.addBuffLoading = true; - this.$emit('push', {path: [], value: StoredBuffWithIdSchema.clean({}), ack: this.acknowledgeAddBuff}); - }, - }, } diff --git a/app/imports/ui/properties/forms/DamageListForm.vue b/app/imports/ui/properties/forms/DamageListForm.vue index a9601a6e..142659ab 100644 --- a/app/imports/ui/properties/forms/DamageListForm.vue +++ b/app/imports/ui/properties/forms/DamageListForm.vue @@ -27,23 +27,11 @@ -
- - add - -
- - diff --git a/app/imports/ui/properties/forms/ResultsForm.vue b/app/imports/ui/properties/forms/ResultsForm.vue index 8a7d35ca..c850486b 100644 --- a/app/imports/ui/properties/forms/ResultsForm.vue +++ b/app/imports/ui/properties/forms/ResultsForm.vue @@ -1,6 +1,6 @@ @@ -39,6 +66,9 @@ import DamageListForm from '/imports/ui/properties/forms/DamageListForm.vue'; import BuffListForm from '/imports/ui/properties/forms/BuffListForm.vue'; import ResultsSchema from '/imports/api/properties/subSchemas/ResultsSchema.js'; + import DamageSchema from '/imports/api/properties/subSchemas/DamageSchema.js'; + import AdjustmentSchema from '/imports/api/properties/subSchemas/AdjustmentSchema.js'; + import { StoredBuffWithIdSchema } from '/imports/api/properties/Buffs.js'; export default { components: { @@ -46,6 +76,9 @@ DamageListForm, BuffListForm, }, + data(){return { + addResultLoading: false, + }}, props: { model: { type: Object, @@ -63,6 +96,35 @@ default: undefined, }, }, + methods: { + acknowledgeAddResult(){ + this.addResultLoading = false; + }, + addDamage(){ + this.addResultLoading = true; + this.$emit('push', { + path: ['damages'], + value: DamageSchema.clean({}), + ack: this.acknowledgeAddResult, + }); + }, + addAdjustment(){ + this.addResultLoading = true; + this.$emit('push', { + path: ['adjustments'], + value: AdjustmentSchema.clean({}), + ack: this.acknowledgeAddResult, + }); + }, + addBuff(){ + this.addResultLoading = true; + this.$emit('push', { + path: ['buffs'], + value: StoredBuffWithIdSchema.clean({}), + ack: this.acknowledgeAddResult + }); + }, + }, }