44 lines
1.4 KiB
Vue
44 lines
1.4 KiB
Vue
|
<template>
|
||
|
<div class="flex flex-col gap-2 h-full w-full overflow-y-auto">
|
||
|
<div v-if="activeInspectionPlanObj != null" class="flex flex-col gap-2 w-full">
|
||
|
<div>
|
||
|
<label for="type">Typ</label>
|
||
|
<input type="text" id="type" :value="activeInspectionPlanObj.equipmentType.type" readonly />
|
||
|
</div>
|
||
|
<div>
|
||
|
<label for="interval">Intervall</label>
|
||
|
<input type="text" id="interval" :value="activeInspectionPlanObj.inspectionInterval" reaonly />
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<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>
|