add additional fields

This commit is contained in:
Julian Krauser 2025-05-21 09:10:41 +02:00
parent 43f46c0fad
commit b83b22d806
16 changed files with 97 additions and 3 deletions

View file

@ -14,6 +14,10 @@
<input type="text" id="name" required />
</div>
<ScanInput name="code" label="Code" :required="false" />
<div>
<label for="commissioned">In-Betrieb-Nahme</label>
<input type="date" id="commissioned" required />
</div>
<div>
<label for="location">Verortung (optional)</label>
<input type="text" id="location" />
@ -81,6 +85,7 @@ export default defineComponent({
name: formData.name.value,
location: formData.location.value,
equipmentTypeId: this.selectedType,
commissioned: formData.commissioned.value,
};
this.status = "loading";
this.createEquipment(createEquipment)

View file

@ -17,6 +17,14 @@
<label for="location">Verortung</label>
<input type="text" id="location" :value="activeEquipmentObj.location" readonly />
</div>
<div>
<label for="commissioned">In-Betrieb-Nahme</label>
<input type="date" id="commissioned" :value="activeEquipmentObj.commissioned" readonly />
</div>
<div>
<label for="decommissioned">Außer-Betrieb-Nahme</label>
<input type="date" id="decommissioned" :value="activeEquipmentObj.decommissioned" readonly />
</div>
</div>
<Spinner v-if="loadingActive == 'loading'" class="mx-auto" />

View file

@ -17,6 +17,14 @@
<label for="location">Verortung (optional)</label>
<input type="text" id="location" v-model="equipment.location" />
</div>
<div>
<label for="commissioned">In-Betrieb-Nahme</label>
<input type="date" id="commissioned" required v-model="equipment.commissioned" />
</div>
<div>
<label for="decommissioned">Außer-Betrieb-Nahme (optional)</label>
<input type="date" id="decommissioned" v-model="equipment.decommissioned" />
</div>
<div class="flex flex-row justify-end gap-2">
<button primary-outline type="reset" class="w-fit!" :disabled="canSaveOrReset" @click="resetForm">
abbrechen
@ -98,6 +106,8 @@ export default defineComponent({
code: formData.code.value || null,
name: formData.name.value,
location: formData.location.value,
commissioned: formData.commissioned.value,
decommissioned: formData.decommissioned.value ?? null,
};
this.status = "loading";
this.updateActiveEquipment(updateEquipment)

View file

@ -14,6 +14,10 @@
<input type="text" id="name" required />
</div>
<ScanInput name="code" label="Code" :required="false" />
<div>
<label for="commissioned">In-Betrieb-Nahme</label>
<input type="date" id="commissioned" required />
</div>
<div>
<label for="location">Verortung (optional)</label>
<input type="text" id="location" />
@ -80,6 +84,7 @@ export default defineComponent({
code: formData.code.value || null,
location: formData.location.value,
vehicleTypeId: this.selectedType,
commissioned: formData.commissioned.value,
};
this.status = "loading";
this.createVehicle(createVehicle)

View file

@ -17,6 +17,14 @@
<label for="location">Verortung</label>
<input type="text" id="location" :value="activeVehicleObj.location" readonly />
</div>
<div>
<label for="commissioned">In-Betrieb-Nahme</label>
<input type="date" id="commissioned" :value="activeVehicleObj.commissioned" readonly />
</div>
<div>
<label for="decommissioned">Außer-Betrieb-Nahme</label>
<input type="date" id="decommissioned" :value="activeVehicleObj.decommissioned" readonly />
</div>
</div>
<Spinner v-if="loadingActive == 'loading'" class="mx-auto" />

View file

@ -17,6 +17,14 @@
<label for="location">Verortung (optional)</label>
<input type="text" id="location" />
</div>
<div>
<label for="commissioned">In-Betrieb-Nahme</label>
<input type="date" id="commissioned" required v-model="vehicle.commissioned" />
</div>
<div>
<label for="decommissioned">Außer-Betrieb-Nahme (optional)</label>
<input type="date" id="decommissioned" v-model="vehicle.decommissioned" />
</div>
<div class="flex flex-row justify-end gap-2">
<RouterLink
:to="{ name: 'admin-unit-vehicle' }"
@ -100,6 +108,8 @@ export default defineComponent({
name: formData.name.value,
code: formData.code.value || null,
location: formData.location.value,
commissioned: formData.commissioned.value,
decommissioned: formData.decommissioned.value ?? null,
};
this.status = "loading";
this.updateActiveVehicle(updateVehicle)

View file

@ -14,11 +14,15 @@
<input type="text" id="name" required />
</div>
<ScanInput name="code" label="Code" :required="false" />
<div>
<label for="commissioned">In-Betrieb-Nahme</label>
<input type="date" id="commissioned" required />
</div>
<div>
<label for="location">Verortung (optional)</label>
<input type="text" id="location" />
</div>
<MemberSearchSelectSingle title="Träger (optional)" />
<MemberSearchSelectSingle title="Träger (optional)" v-model="wearer" />
<div class="flex flex-row justify-end gap-2">
<RouterLink
:to="{ name: 'admin-unit-wearable' }"
@ -62,6 +66,7 @@ export default defineComponent({
status: null as null | "loading" | { status: "success" | "failed"; reason?: string },
timeout: null as any,
selectedType: "" as string,
wearer: "" as string,
};
},
computed: {
@ -82,8 +87,9 @@ export default defineComponent({
code: formData.code.value || null,
name: formData.name.value,
location: formData.location.value,
wearerId: "",
wearerId: this.wearer,
wearableTypeId: this.selectedType,
commissioned: formData.commissioned.value,
};
this.status = "loading";
this.createWearable(createWearable)

View file

@ -17,6 +17,14 @@
<label for="location">Verortung</label>
<input type="text" id="location" :value="activeWearableObj.location" readonly />
</div>
<div>
<label for="commissioned">In-Betrieb-Nahme</label>
<input type="date" id="commissioned" :value="activeWearableObj.commissioned" readonly />
</div>
<div>
<label for="decommissioned">Außer-Betrieb-Nahme</label>
<input type="date" id="decommissioned" :value="activeWearableObj.decommissioned" readonly />
</div>
<div>
<label for="wearer">Träger</label>
<input

View file

@ -18,6 +18,14 @@
<input type="text" id="location" v-model="wearable.location" />
</div>
<MemberSearchSelectMultiple title="Träger (optional)" />
<div>
<label for="commissioned">In-Betrieb-Nahme</label>
<input type="date" id="commissioned" required v-model="wearable.commissioned" />
</div>
<div>
<label for="decommissioned">Außer-Betrieb-Nahme (optional)</label>
<input type="date" id="decommissioned" v-model="wearable.decommissioned" />
</div>
<div class="flex flex-row justify-end gap-2">
<button primary-outline type="reset" class="w-fit!" :disabled="canSaveOrReset" @click="resetForm">
abbrechen
@ -100,6 +108,8 @@ export default defineComponent({
code: formData.code.value || null,
name: formData.name.value,
location: formData.location.value,
commissioned: formData.commissioned.value,
decommissioned: formData.decommissioned.value ?? null,
};
this.status = "loading";
this.updateActiveWearable(updateWearable)