2025-04-11 14:14:11 +02:00
|
|
|
<template>
|
2025-05-14 14:42:00 +02:00
|
|
|
<div class="flex flex-col gap-2 h-full w-full overflow-hidden">
|
2025-04-11 14:14:11 +02:00
|
|
|
<div v-if="activeInspectionPlanObj != null" class="flex flex-col gap-2 w-full">
|
|
|
|
<div>
|
|
|
|
<label for="type">Typ</label>
|
2025-05-14 14:42:00 +02:00
|
|
|
<input type="text" id="type" :value="activeInspectionPlanObj.related.type" readonly />
|
2025-04-11 14:14:11 +02:00
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<label for="interval">Intervall</label>
|
|
|
|
<input type="text" id="interval" :value="activeInspectionPlanObj.inspectionInterval" reaonly />
|
|
|
|
</div>
|
|
|
|
</div>
|
2025-05-14 14:42:00 +02:00
|
|
|
<p>Prüfungspunkte</p>
|
|
|
|
<div v-if="activeInspectionPlanObj?.inspectionPoints" class="flex flex-col gap-2 grow overflow-y-scroll">
|
2025-05-13 10:11:26 +02:00
|
|
|
<div
|
|
|
|
v-for="point in activeInspectionPlanObj?.inspectionPoints"
|
|
|
|
class="flex flex-col h-fit w-full border border-primary rounded-md"
|
|
|
|
>
|
|
|
|
<div class="bg-primary p-2 text-white flex flex-row justify-between items-center">
|
|
|
|
<p>{{ point.title }}</p>
|
|
|
|
</div>
|
|
|
|
<div class="p-2">
|
|
|
|
<p>Eingabetyp: {{ point.type }}</p>
|
|
|
|
<p>Beschreibung: {{ point.description }}</p>
|
|
|
|
</div>
|
2025-04-28 12:29:44 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2025-04-11 14:14:11 +02:00
|
|
|
|
|
|
|
<Spinner v-if="loadingActive == 'loading'" class="mx-auto" />
|
|
|
|
<p v-else-if="loadingActive == 'failed'" @click="fetchInspectionPlanByActiveId" class="cursor-pointer">
|
|
|
|
↺ laden fehlgeschlagen
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
import { defineComponent } from "vue";
|
|
|
|
import { mapActions, mapState } from "pinia";
|
|
|
|
import Spinner from "@/components/Spinner.vue";
|
|
|
|
import { useInspectionPlanStore } from "@/stores/admin/unit/inspectionPlan/inspectionPlan";
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
export default defineComponent({
|
|
|
|
props: {
|
|
|
|
inspectionPlanId: String,
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
...mapState(useInspectionPlanStore, ["activeInspectionPlanObj", "loadingActive"]),
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
this.fetchInspectionPlanByActiveId();
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
...mapActions(useInspectionPlanStore, ["fetchInspectionPlanByActiveId"]),
|
|
|
|
},
|
|
|
|
});
|
|
|
|
</script>
|