2021-07-04 01:44:41 +02:00
|
|
|
<template>
|
|
|
|
<form class="p-6 grid gap-4 justify-start" @submit.prevent="submit">
|
|
|
|
<f-text id="name" v-model="inner.name" label="Name" required></f-text>
|
2022-08-23 23:49:19 +02:00
|
|
|
<f-select
|
|
|
|
id="fee_id"
|
|
|
|
name="fee_id"
|
|
|
|
:options="fees"
|
|
|
|
v-model="inner.fee_id"
|
|
|
|
label="Nami-Beitrag"
|
|
|
|
required
|
|
|
|
></f-select>
|
2021-07-04 01:44:41 +02:00
|
|
|
<f-text id="amount" v-model="inner.amount" label="Interner Beitrag" required></f-text>
|
|
|
|
|
|
|
|
<button type="submit" class="btn btn-primary">Absenden</button>
|
|
|
|
</form>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
2022-08-23 23:49:19 +02:00
|
|
|
data: function () {
|
2021-07-04 01:44:41 +02:00
|
|
|
return {
|
|
|
|
inner: {},
|
|
|
|
};
|
|
|
|
},
|
|
|
|
|
|
|
|
props: {
|
|
|
|
data: {},
|
|
|
|
fees: {},
|
|
|
|
mode: {},
|
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
submit() {
|
|
|
|
this.mode === 'create'
|
|
|
|
? this.$inertia.post(`/subscription`, this.inner)
|
|
|
|
: this.$inertia.patch(`/subscription/${this.inner.id}`, this.inner);
|
2022-08-23 23:49:19 +02:00
|
|
|
},
|
2021-07-04 01:44:41 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
created() {
|
|
|
|
this.inner = this.data;
|
2022-08-23 23:49:19 +02:00
|
|
|
},
|
2021-07-04 01:44:41 +02:00
|
|
|
};
|
|
|
|
</script>
|