view models and data structure

This commit is contained in:
Julian Krauser 2025-03-26 12:45:14 +01:00
parent 45fe7b34c3
commit 5faa4b7906
37 changed files with 157 additions and 516 deletions

View file

@ -7,12 +7,12 @@
</template>
<template #diffMain>
<div class="flex flex-col w-full h-full gap-2 justify-center px-7">
<div class="w-full flex flex-row max-lg:flex-wrap justify-center">
<div class="w-full flex flex-row justify-center">
<div
v-for="tab in tabs"
:key="tab.route"
@click="isActive = tab.route"
class="w-1/2 md:w-1/3 lg:w-full p-0.5 first:pl-0 last:pr-0 cursor-pointer"
class="w-full p-0.5 first:pl-0 last:pr-0 cursor-pointer"
>
<p
:class="[
@ -58,10 +58,10 @@ export default defineComponent({
data() {
return {
tabs: [
{ route: "overview", title: "offen" },
{ route: "membership", title: "bearbeitet" },
{ route: "open", title: "offen" },
{ route: "done", title: "bearbeitet" },
],
isActive: "overview",
isActive: "open",
currentPage: 0,
maxEntriesPerPage: 25,
};

View file

@ -39,7 +39,7 @@ import { useEquipmentStore } from "@/stores/admin/unit/equipment/equipment";
import { useModalStore } from "@/stores/modal";
import Pagination from "@/components/Pagination.vue";
import { useAbilityStore } from "@/stores/ability";
import type { EquipmentViewModel } from "../../../../viewmodels/admin/unit/equipmentType/equipment.models";
import type { EquipmentViewModel } from "../../../../viewmodels/admin/unit/equipment/equipment.models";
import EquipmentListItem from "../../../../components/admin/unit/equipment/EquipmentListItem.vue";
</script>

View file

@ -6,7 +6,7 @@
<template #topBar>
<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">
{{ activeEquipmentObj?.lastname }}, {{ activeEquipmentObj?.firstname }}
{{ activeEquipmentObj?.name }}
</h1>
<RouterLink v-if="can('update', 'unit', 'equipment')" :to="{ name: 'admin-unit-equipment-edit' }">

View file

@ -38,7 +38,7 @@ import { useEquipmentTypeStore } from "@/stores/admin/unit/equipmentType/equipme
import { useModalStore } from "@/stores/modal";
import Pagination from "@/components/Pagination.vue";
import { useAbilityStore } from "@/stores/ability";
import type { EquipmentTypeViewModel } from "@/viewmodels/admin/unit/equipmentType.models";
import type { EquipmentTypeViewModel } from "@/viewmodels/admin/unit/equipmentType/equipmentType.models";
import EquipmentTypeListItem from "@/components/admin/unit/equipmentType/EquipmentTypeListItem.vue";
</script>

View file

@ -6,7 +6,7 @@
<template #topBar>
<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">
{{ activeEquipmentTypeObj?.lastname }}, {{ activeEquipmentTypeObj?.firstname }}
{{ activeEquipmentTypeObj?.type }}
</h1>
<RouterLink v-if="can('update', 'unit', 'equipment_type')" :to="{ name: 'admin-unit-equipment_type-edit' }">

View file

@ -5,9 +5,7 @@
</template>
<template #topBar>
<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">
{{ activeRespiratoryGearObj?.lastname }}, {{ activeRespiratoryGearObj?.firstname }}
</h1>
<h1 class="font-bold text-xl h-8 min-h-fit grow">AGT-Gerät: {{ activeRespiratoryGearObj?.equipment.name }}</h1>
<RouterLink v-if="can('update', 'unit', 'respiratory_gear')" :to="{ name: 'admin-unit-respiratory_gear-edit' }">
<PencilIcon class="w-5 h-5" />

View file

@ -5,9 +5,7 @@
</template>
<template #topBar>
<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">
{{ activeRespiratoryMissionObj?.lastname }}, {{ activeRespiratoryMissionObj?.firstname }}
</h1>
<h1 class="font-bold text-xl h-8 min-h-fit grow">AGT-Einsatz: {{ activeRespiratoryMissionObj?.title }}</h1>
<RouterLink
v-if="can('update', 'unit', 'respiratory_mission')"

View file

@ -6,7 +6,8 @@
<template #topBar>
<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">
{{ activeRespiratoryWearerObj?.lastname }}, {{ activeRespiratoryWearerObj?.firstname }}
AGT-Träger: {{ activeRespiratoryWearerObj?.member.lastname }},
{{ activeRespiratoryWearerObj?.member.firstname }}
</h1>
<RouterLink