2025-03-26 12:20:06 +01:00
|
|
|
<template>
|
|
|
|
<MainTemplate>
|
|
|
|
<template #headerInsert>
|
|
|
|
<RouterLink to="../" class="text-primary">zurück zur Liste</RouterLink>
|
|
|
|
</template>
|
|
|
|
<template #topBar>
|
|
|
|
<div class="flex flex-row gap-2 items-center justify-between pt-5 pb-3 px-7">
|
2025-03-26 12:45:14 +01:00
|
|
|
<h1 class="font-bold text-xl h-8 min-h-fit grow">AGT-Einsatz: {{ activeRespiratoryMissionObj?.title }}</h1>
|
2025-03-26 12:20:06 +01:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<template #diffMain>
|
|
|
|
<div class="flex flex-col gap-2 grow px-7 overflow-hidden">
|
|
|
|
<div class="flex flex-col grow gap-2 overflow-hidden">
|
|
|
|
<div class="w-full flex flex-row max-lg:flex-wrap justify-center">
|
|
|
|
<RouterLink
|
|
|
|
v-for="tab in tabs"
|
|
|
|
:key="tab.route"
|
|
|
|
v-slot="{ isActive }"
|
|
|
|
:to="{ name: tab.route }"
|
|
|
|
class="w-1/2 md:w-1/3 lg:w-full p-0.5 first:pl-0 last:pr-0"
|
|
|
|
>
|
|
|
|
<p
|
|
|
|
:class="[
|
2025-04-13 16:31:23 +02:00
|
|
|
'w-full rounded-lg py-2.5 text-sm text-center font-medium leading-5 focus:ring-0 outline-hidden',
|
|
|
|
isActive ? 'bg-red-200 shadow-sm border-b-2 border-primary rounded-b-none' : ' hover:bg-red-200',
|
2025-03-26 12:20:06 +01:00
|
|
|
]"
|
|
|
|
>
|
|
|
|
{{ tab.title }}
|
|
|
|
</p>
|
|
|
|
</RouterLink>
|
|
|
|
</div>
|
|
|
|
<RouterView />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</MainTemplate>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
2025-03-30 17:24:17 +02:00
|
|
|
import { defineComponent } from "vue";
|
2025-03-26 12:20:06 +01:00
|
|
|
import { mapActions, mapState } from "pinia";
|
|
|
|
import MainTemplate from "@/templates/Main.vue";
|
|
|
|
import { RouterLink, RouterView } from "vue-router";
|
|
|
|
import { useAbilityStore } from "@/stores/ability";
|
|
|
|
import { useRespiratoryMissionStore } from "@/stores/admin/unit/respiratoryMission/respiratoryMission";
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
export default defineComponent({
|
|
|
|
props: {
|
|
|
|
respiratoryMissionId: String,
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
tabs: [
|
|
|
|
{ route: "admin-unit-respiratory_mission-overview", title: "Übersicht" },
|
2025-03-30 17:24:17 +02:00
|
|
|
{ route: "admin-unit-respiratory_mission-wearer", title: "Träger" },
|
|
|
|
{ route: "admin-unit-respiratory_mission-gear", title: "Geräte" },
|
2025-03-26 12:20:06 +01:00
|
|
|
],
|
|
|
|
};
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
...mapState(useRespiratoryMissionStore, ["activeRespiratoryMissionObj"]),
|
|
|
|
...mapState(useAbilityStore, ["can"]),
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
this.fetchRespiratoryMissionByActiveId();
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
...mapActions(useRespiratoryMissionStore, ["fetchRespiratoryMissionByActiveId"]),
|
|
|
|
},
|
|
|
|
});
|
|
|
|
</script>
|