connect to backend

This commit is contained in:
Julian Krauser 2025-06-04 14:30:41 +02:00
parent 6c8d57a7e5
commit ddeac1aa26
41 changed files with 221 additions and 291 deletions

View file

@ -8,6 +8,12 @@
{{ equipmentType.type }}
</p>
</div>
<div class="flex flex-col p-2">
<div class="flex flex-row gap-2">
<p class="min-w-16">Beschreibung:</p>
<p class="grow overflow-hidden">{{ equipmentType.description }}</p>
</div>
</div>
</RouterLink>
</template>

View file

@ -8,6 +8,12 @@
{{ vehicleType.type }}
</p>
</div>
<div class="flex flex-col p-2">
<div class="flex flex-row gap-2">
<p class="min-w-16">Beschreibung:</p>
<p class="grow overflow-hidden">{{ vehicleType.description }}</p>
</div>
</div>
</RouterLink>
</template>

View file

@ -4,6 +4,23 @@
<p>
{{ wearableType.type }}
</p>
<div class="flex flex-row">
<RouterLink
v-if="can('update', 'unit', 'wearable_type')"
:to="{ name: 'admin-unit-wearable_type-edit', params: { wearableTypeId: wearableType.id } }"
>
<PencilIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
</RouterLink>
<div v-if="can('delete', 'unit', 'wearable_type')" @click="openDeleteModal">
<TrashIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
</div>
</div>
</div>
<div class="flex flex-col p-2">
<div class="flex flex-row gap-2">
<p class="min-w-16">Beschreibung:</p>
<p class="grow overflow-hidden">{{ wearableType.description }}</p>
</div>
</div>
</div>
</template>
@ -25,5 +42,14 @@ export default defineComponent({
computed: {
...mapState(useAbilityStore, ["can"]),
},
methods: {
...mapActions(useModalStore, ["openModal"]),
openDeleteModal() {
this.openModal(
markRaw(defineAsyncComponent(() => import("@/components/admin/unit/wearableType/DeleteWearableTypeModal.vue"))),
this.wearableType.id
);
},
},
});
</script>