Tabs
This commit is contained in:
parent
4faf93c3ce
commit
f951a1cd4c
7 changed files with 29 additions and 9 deletions
|
@ -12,14 +12,14 @@
|
||||||
<RouterLink
|
<RouterLink
|
||||||
v-for="tab in tabs"
|
v-for="tab in tabs"
|
||||||
:key="tab.route"
|
:key="tab.route"
|
||||||
v-slot="{ isActive }"
|
v-slot="{ isExactActive }"
|
||||||
:to="{ name: tab.route }"
|
:to="{ name: tab.route }"
|
||||||
class="w-1/2 md:w-1/3 lg:w-full p-0.5 first:pl-0 last:pr-0"
|
class="w-1/2 md:w-1/3 lg:w-full p-0.5 first:pl-0 last:pr-0"
|
||||||
>
|
>
|
||||||
<p
|
<p
|
||||||
:class="[
|
:class="[
|
||||||
'w-full rounded-lg py-2.5 text-sm text-center font-medium leading-5 focus:ring-0 outline-none',
|
'w-full rounded-lg py-2.5 text-sm text-center font-medium leading-5 focus:ring-0 outline-none',
|
||||||
isActive ? 'bg-red-200 shadow border-b-2 border-primary rounded-b-none' : ' hover:bg-red-200',
|
isExactActive ? 'bg-red-200 shadow border-b-2 border-primary rounded-b-none' : ' hover:bg-red-200',
|
||||||
]"
|
]"
|
||||||
>
|
>
|
||||||
{{ tab.title }}
|
{{ tab.title }}
|
||||||
|
|
|
@ -63,7 +63,9 @@ export default defineComponent({
|
||||||
return {
|
return {
|
||||||
tabs: [
|
tabs: [
|
||||||
{ route: "admin-unit-equipment-overview", title: "Übersicht" },
|
{ route: "admin-unit-equipment-overview", title: "Übersicht" },
|
||||||
{ route: "admin-unit-equipment-xy", title: "xy" },
|
{ route: "admin-unit-equipment-xy", title: "Wartungen" },
|
||||||
|
{ route: "admin-unit-equipment-xy", title: "Prüfungen" },
|
||||||
|
{ route: "admin-unit-equipment-xy", title: "Schadensmeldungen" },
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
|
@ -67,7 +67,7 @@ export default defineComponent({
|
||||||
return {
|
return {
|
||||||
tabs: [
|
tabs: [
|
||||||
{ route: "admin-unit-equipment_type-overview", title: "Übersicht" },
|
{ route: "admin-unit-equipment_type-overview", title: "Übersicht" },
|
||||||
{ route: "admin-unit-equipment_type-xy", title: "xy" },
|
{ route: "admin-unit-equipment_type-xy", title: "Prüfpläne" },
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
|
@ -7,6 +7,15 @@
|
||||||
<div class="flex flex-row gap-2 items-center justify-between pt-5 pb-3 px-7">
|
<div class="flex flex-row gap-2 items-center justify-between pt-5 pb-3 px-7">
|
||||||
<h1 class="font-bold text-xl h-8 min-h-fit grow">AGT-Gerät: {{ activeRespiratoryGearObj?.equipment.name }}</h1>
|
<h1 class="font-bold text-xl h-8 min-h-fit grow">AGT-Gerät: {{ activeRespiratoryGearObj?.equipment.name }}</h1>
|
||||||
|
|
||||||
|
<RouterLink
|
||||||
|
v-if="can('read', 'unit', 'equipment')"
|
||||||
|
:to="{
|
||||||
|
name: 'admin-unit-equipment-overview',
|
||||||
|
params: { equipmentId: activeRespiratoryGearObj?.equipment.id ?? '_' },
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<ArrowTopRightOnSquareIcon class="w-5 h-5" />
|
||||||
|
</RouterLink>
|
||||||
<RouterLink v-if="can('update', 'unit', 'respiratory_gear')" :to="{ name: 'admin-unit-respiratory_gear-edit' }">
|
<RouterLink v-if="can('update', 'unit', 'respiratory_gear')" :to="{ name: 'admin-unit-respiratory_gear-edit' }">
|
||||||
<PencilIcon class="w-5 h-5" />
|
<PencilIcon class="w-5 h-5" />
|
||||||
</RouterLink>
|
</RouterLink>
|
||||||
|
@ -50,7 +59,7 @@ import { defineAsyncComponent, defineComponent, markRaw } from "vue";
|
||||||
import { mapActions, mapState } from "pinia";
|
import { mapActions, mapState } from "pinia";
|
||||||
import MainTemplate from "@/templates/Main.vue";
|
import MainTemplate from "@/templates/Main.vue";
|
||||||
import { RouterLink, RouterView } from "vue-router";
|
import { RouterLink, RouterView } from "vue-router";
|
||||||
import { PencilIcon, TrashIcon } from "@heroicons/vue/24/outline";
|
import { ArrowTopRightOnSquareIcon, PencilIcon, TrashIcon } from "@heroicons/vue/24/outline";
|
||||||
import { useModalStore } from "@/stores/modal";
|
import { useModalStore } from "@/stores/modal";
|
||||||
import { useAbilityStore } from "@/stores/ability";
|
import { useAbilityStore } from "@/stores/ability";
|
||||||
import { useRespiratoryGearStore } from "@/stores/admin/unit/respiratoryGear/respiratoryGear";
|
import { useRespiratoryGearStore } from "@/stores/admin/unit/respiratoryGear/respiratoryGear";
|
||||||
|
@ -65,7 +74,9 @@ export default defineComponent({
|
||||||
return {
|
return {
|
||||||
tabs: [
|
tabs: [
|
||||||
{ route: "admin-unit-respiratory_gear-overview", title: "Übersicht" },
|
{ route: "admin-unit-respiratory_gear-overview", title: "Übersicht" },
|
||||||
{ route: "admin-unit-respiratory_gear-xy", title: "xy" },
|
{ route: "admin-unit-respiratory_gear-xy", title: "Wartungen" },
|
||||||
|
{ route: "admin-unit-respiratory_gear-xy", title: "Prüfungen" },
|
||||||
|
{ route: "admin-unit-respiratory_gear-xy", title: "Einsätze" },
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
|
@ -68,7 +68,8 @@ export default defineComponent({
|
||||||
return {
|
return {
|
||||||
tabs: [
|
tabs: [
|
||||||
{ route: "admin-unit-respiratory_mission-overview", title: "Übersicht" },
|
{ route: "admin-unit-respiratory_mission-overview", title: "Übersicht" },
|
||||||
{ route: "admin-unit-respiratory_mission-xy", title: "xy" },
|
{ route: "admin-unit-respiratory_mission-xy", title: "Träger" },
|
||||||
|
{ route: "admin-unit-respiratory_mission-xy", title: "Geräte" },
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
|
@ -71,7 +71,11 @@ export default defineComponent({
|
||||||
return {
|
return {
|
||||||
tabs: [
|
tabs: [
|
||||||
{ route: "admin-unit-respiratory_wearer-overview", title: "Übersicht" },
|
{ route: "admin-unit-respiratory_wearer-overview", title: "Übersicht" },
|
||||||
{ route: "admin-unit-respiratory_wearer-xy", title: "xy" },
|
{ route: "admin-unit-respiratory_wearer-xy", title: "Einsätze" },
|
||||||
|
{ route: "admin-unit-respiratory_wearer-xy", title: "Bildungen" },
|
||||||
|
{ route: "admin-unit-respiratory_wearer-xy", title: "Unterweisungen" },
|
||||||
|
{ route: "admin-unit-respiratory_wearer-xy", title: "Untersuchungen" },
|
||||||
|
{ route: "admin-unit-respiratory_wearer-xy", title: "Belastungen" },
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
|
@ -63,7 +63,9 @@ export default defineComponent({
|
||||||
return {
|
return {
|
||||||
tabs: [
|
tabs: [
|
||||||
{ route: "admin-unit-vehicle-overview", title: "Übersicht" },
|
{ route: "admin-unit-vehicle-overview", title: "Übersicht" },
|
||||||
{ route: "admin-unit-vehicle-xy", title: "xy" },
|
{ route: "admin-unit-vehicle-xy", title: "Wartungen" },
|
||||||
|
{ route: "admin-unit-vehicle-xy", title: "Prüfungen" },
|
||||||
|
{ route: "admin-unit-vehicle-xy", title: "Schadensmeldungen" },
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue