extend report by title

This commit is contained in:
Julian Krauser 2025-07-21 11:03:49 +02:00
parent b56347c172
commit b5a3ff4dc6
8 changed files with 38 additions and 5 deletions

View file

@ -2,6 +2,10 @@
<form class="flex flex-col gap-2" @submit.prevent="setup">
<p class="text-primary cursor-pointer" @click="$emit('stepBack')">zurück</p>
<div class="flex flex-col gap-2">
<div>
<label for="title">Kurzbeschreibung (Titel)</label>
<input id="title" type="text" required :value="data.title" />
</div>
<div>
<label for="description">Beschreibung des Schadens</label>
<textarea id="description" required :value="data.description"></textarea>
@ -45,6 +49,7 @@ export default defineComponent({
data: {
type: Object as PropType<{
gear: undefined | MinifiedEquipmentViewModel | MinifiedVehicleViewModel | MinifiedWearableViewModel;
title: string;
description: string;
location: string;
note: string;
@ -57,7 +62,14 @@ export default defineComponent({
emits: {
nextStep: (s: string) => true,
stepBack: () => true,
data: (d: { description: string; location: string; note: string; reportedBy: string; image?: File }) => true,
data: (d: {
title: string;
description: string;
location: string;
note: string;
reportedBy: string;
image?: File;
}) => true,
},
mounted() {
if (this.data.image) {
@ -68,6 +80,7 @@ export default defineComponent({
setup(e: any) {
let formData = e.target.elements;
this.$emit("data", {
title: formData.title.value,
description: formData.description.value,
location: formData.location.value,
note: formData.note.value,