2025-03-24 15:12:03 +01:00
|
|
|
<template>
|
|
|
|
<RouterLink
|
|
|
|
:to="{ name: 'admin-unit-equipment-overview', params: { equipmentId: equipment.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>
|
2025-03-26 12:45:14 +01:00
|
|
|
{{ equipment.name }}
|
2025-03-24 15:12:03 +01:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div class="p-2">
|
2025-03-26 12:45:14 +01:00
|
|
|
<p v-if="equipment.code">Code: {{ equipment.code }}</p>
|
2025-03-24 15:12:03 +01:00
|
|
|
</div>
|
|
|
|
</RouterLink>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
import { defineComponent, type PropType } from "vue";
|
|
|
|
import { mapState, mapActions } from "pinia";
|
|
|
|
import { useAbilityStore } from "@/stores/ability";
|
2025-03-26 12:45:14 +01:00
|
|
|
import type { EquipmentViewModel } from "@/viewmodels/admin/unit/equipment/equipment.models";
|
2025-03-24 15:12:03 +01:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
export default defineComponent({
|
|
|
|
props: {
|
|
|
|
equipment: { type: Object as PropType<EquipmentViewModel>, default: {} },
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
...mapState(useAbilityStore, ["can"]),
|
|
|
|
},
|
|
|
|
});
|
|
|
|
</script>
|