adrema/resources/js/views/form/MemberAssign.vue

22 lines
776 B
Vue
Raw Normal View History

2024-07-02 18:04:55 +02:00
<template>
<div>
<div class="mt-4">
<f-text id="search_string" v-model="searchString" label="Mitglied finden"></f-text>
</div>
<div v-if="results !== null" class="mt-5 sm:mt-10 space-y-2">
2024-07-03 17:43:49 +02:00
<ui-search-result v-for="member in results.hits" :key="member.id" :member="member">
<template #buttons>
<button class="btn btn-primary btn-sm" @click.prevent="emit('assign', member.id)">Zuweisen</button>
</template>
</ui-search-result>
2024-07-02 18:04:55 +02:00
</div>
</div>
</template>
2024-07-03 16:37:58 +02:00
<script lang="js" setup>
2024-07-02 18:04:55 +02:00
import useSearch from '../../composables/useSearch.js';
const emit = defineEmits(['assign']);
2024-07-03 17:31:06 +02:00
const { searchString, results } = useSearch(null, { limit: 10 });
2024-07-02 18:04:55 +02:00
</script>