parent
339e76d874
commit
d692cf3bdf
resources/js/views/subscription
|
@ -22,7 +22,7 @@
|
||||||
<ui-sprite src="trash" class="w-5 h-5"></ui-sprite>
|
<ui-sprite src="trash" class="w-5 h-5"></ui-sprite>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<a href="#" class="btn btn-sm flex btn-primary flex self-start mt-4" @click.prevent="inner.children.push({name: 'Beitrag {year} für {name} (' + inner.name + ')', amount: 0})">
|
<a href="#" class="btn btn-sm flex btn-primary flex self-start mt-4" @click.prevent="inner.children.push({name: defaultChildName, amount: 0})">
|
||||||
<ui-sprite src="plus" class="w-5 h-5"></ui-sprite>
|
<ui-sprite src="plus" class="w-5 h-5"></ui-sprite>
|
||||||
Position hinzufügen
|
Position hinzufügen
|
||||||
</a>
|
</a>
|
||||||
|
@ -46,6 +46,12 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
computed: {
|
||||||
|
defaultChildName() {
|
||||||
|
return this.inner.name ? `Beitrag {year} für {name} (${this.inner.name})` : 'Beitrag {year} für {name}';
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
submit() {
|
submit() {
|
||||||
this.mode === 'create' ? this.$inertia.post(`/subscription`, this.inner) : this.$inertia.patch(`/subscription/${this.inner.id}`, this.inner);
|
this.mode === 'create' ? this.$inertia.post(`/subscription`, this.inner) : this.$inertia.patch(`/subscription/${this.inner.id}`, this.inner);
|
||||||
|
|
Loading…
Reference in New Issue