Added action form, but without buffs

This commit is contained in:
Stefan Zermatten
2019-07-19 14:07:22 +02:00
parent 0c002ae5cd
commit a0dc36557c
13 changed files with 444 additions and 57 deletions

View File

@@ -1,20 +0,0 @@
<template lang="html">
<v-expansion-panel popout>
<v-expansion-panel-content>
<div slot="header" class="subheading">
Advanced
</div>
<v-card-text>
<slot/>
</v-card-text>
</v-expansion-panel-content>
</v-expansion-panel>
</template>
<script>
export default {
}
</script>
<style lang="css" scoped>
</style>

View File

@@ -0,0 +1,34 @@
<template lang="html">
<form-sections v-if="standalone">
<v-expansion-panel-content>
<div slot="header" class="subheading">
{{name}}
</div>
<v-card-text>
<slot/>
</v-card-text>
</v-expansion-panel-content>
</form-sections>
<v-expansion-panel-content v-else>
<div slot="header" class="subheading">
{{name}}
</div>
<v-card-text>
<slot/>
</v-card-text>
</v-expansion-panel-content>
</template>
<script>
import FormSections from '/imports/ui/components/forms/FormSections.vue';
export default {
components: {
FormSections,
},
props: {
name: String,
standalone: Boolean,
},
}
export { FormSections };
</script>

View File

@@ -0,0 +1,9 @@
<template lang="html">
<v-expansion-panel popout expand>
<slot/>
</v-expansion-panel>
</template>
<script>
export default {}
</script>

View File

@@ -32,6 +32,22 @@ const schemaFormMixin = {
}
if (ack) ack();
},
push(modifier, ack){
for (let key in modifier){
this.model[key].push(modifier[key]);
}
if (ack) ack();
},
changeAtIndex(field, index, modifier, ack){
for (let key in modifier){
this.$set(this.model[field][index], key, modifier[key])
}
if (ack) ack();
},
removeAtIndex(field, index, ack){
this.model[field].splice(index, 1);
if (ack) ack();
},
},
};