Improved handling for new invoices

This commit is contained in:
2026-04-18 23:42:39 +02:00
parent 33a9271013
commit 4878f750bd
16 changed files with 206 additions and 32 deletions

View File

@@ -17,6 +17,11 @@ const props = defineProps({
<td>{{props.invoice.travelRoute}}</td>
</tr>
<tr>
<th>Grund der Reise</th>
<td>{{props.invoice.travelReason}}</td>
</tr>
<tr>
<th>Gesamte Wegstrecke</th>
<td>{{props.invoice.distance}} km</td>

View File

@@ -109,6 +109,7 @@ function handleFileChange(event) {
:userIban="data.userIban"
:userAccountOwner="data.userAccountOwner"
:receipt="receipt"
travelReason=""
@close="finalStep = false"
/>

View File

@@ -25,9 +25,10 @@ const props = defineProps({
userIban: String,
havePassengers: Number,
materialTransportation: Boolean,
travelReason: String,
})
console.log(props.receipt)
console.log(props)
const finalStep = ref(true)
const userName = ref(props.userName)
@@ -49,6 +50,8 @@ async function sendData() {
errorMsg.value = ''
success.value = false
console.log(props)
const formData = new FormData()
formData.append('name', userName.value)
@@ -61,6 +64,7 @@ async function sendData() {
formData.append('accountIban', userIban.value)
formData.append('havePassengers', props.havePassengers ? 1 : 0)
formData.append('materialTransportation', props.materialTransportation ? 1 : 0)
formData.append('travelReason', props.travelReason)
if (props.receipt) {
formData.append('receipt', props.receipt)

View File

@@ -18,6 +18,7 @@ const data = defineProps({
const { request } = useAjax();
const distanceAllowance = ref(null);
const travelDirection = ref(null);
const travelReason = ref(null);
const have_receipt = ref('')
const havePassengers = ref(false);
const materialTransportation = ref(false);
@@ -57,7 +58,16 @@ function handleFileChange(event) {
/>
</fieldset><br /><br />
<fieldset v-if="travelDirection !== null">
<fieldset v-if="travelDirection !== null">
<legend><span style="font-weight: bolder;">Was war der Grund für deine Reise?</span></legend>
<input
type="text"
name="travel-reason"
v-model="travelReason"
/>
</fieldset><br /><br />
<fieldset v-if="travelReason !== null">
<legend><span style="font-weight: bolder;">Bist du mit dem ÖPNV gefahren oder besitzt du einen Beleg</span></legend>
<input type="button" style="border-radius: 0; width: 100px;" @click="have_receipt='yes'" value="Ja" />
<input type="button" style="border-radius: 0; width: 100px;" @click="getDistanceAllowance" value="Nein" />
@@ -92,6 +102,7 @@ function handleFileChange(event) {
:userIban="data.userIban"
:userAccountOwner="data.userAccountOwner"
:receipt="receipt"
:travelReason="travelReason"
@close="finalStep = false"
/>
</fieldset>
@@ -142,6 +153,7 @@ function handleFileChange(event) {
:userTelephone="data.userTelephone"
:userIban="data.userIban"
:userAccountOwner="data.userAccountOwner"
:travelReason="travelReason"
@close="finalStep = false"
/>