base components on collections

This commit is contained in:
Julian Krauser 2025-03-25 10:42:40 +01:00
parent b6d6dd0796
commit 3e87bbc267
24 changed files with 1347 additions and 57 deletions

View file

@ -0,0 +1,34 @@
<template>
<RouterLink
:to="{ name: 'admin-unit-damageReport-overview', params: { damageReportId: damageReport.id } }"
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>
{{ damageReport.lastname }}, {{ damageReport.firstname }}
{{ damageReport.nameaffix ? `- ${damageReport.nameaffix}` : "" }}
</p>
</div>
<div class="p-2">
<p v-if="damageReport.internalId">ID: {{ damageReport.internalId }}</p>
</div>
</RouterLink>
</template>
<script setup lang="ts">
import { defineComponent, type PropType } from "vue";
import { mapState, mapActions } from "pinia";
import { useAbilityStore } from "@/stores/ability";
import type { DamageReportViewModel } from "@/viewmodels/admin/unit/damageReport/damageReport.models";
</script>
<script lang="ts">
export default defineComponent({
props: {
damageReport: { type: Object as PropType<DamageReportViewModel>, default: {} },
},
computed: {
...mapState(useAbilityStore, ["can"]),
},
});
</script>