All checks were successful
Build Docker Image / build (push) Successful in 3m55s
- Add SelectionPanel.vue for product/hub/supplier selection lists - Remove QuoteForm from QuotePanel (header already has controls) - Show SelectionPanel when selectMode is active - Connect search button in header to page via shared state
51 lines
1.3 KiB
Vue
51 lines
1.3 KiB
Vue
<template>
|
|
<div class="flex flex-col gap-4 h-full">
|
|
<!-- Header -->
|
|
<div class="flex items-center justify-between flex-shrink-0">
|
|
<h3 class="font-semibold text-lg">{{ $t('catalog.headers.offers') }}</h3>
|
|
<span class="badge badge-neutral">{{ offers.length }}</span>
|
|
</div>
|
|
|
|
<!-- Results section -->
|
|
<div class="flex-1 overflow-y-auto -mx-1 px-1">
|
|
<div v-if="loading" class="flex items-center justify-center py-8">
|
|
<span class="loading loading-spinner loading-md" />
|
|
</div>
|
|
|
|
<div v-else-if="offers.length === 0" class="text-center py-8 text-base-content/60">
|
|
<Icon name="lucide:search-x" size="32" class="mb-2" />
|
|
<p>{{ $t('catalog.empty.noOffers') }}</p>
|
|
</div>
|
|
|
|
<div v-else class="flex flex-col gap-3">
|
|
<div
|
|
v-for="offer in offers"
|
|
:key="offer.uuid"
|
|
class="cursor-pointer"
|
|
@click="emit('select-offer', offer)"
|
|
>
|
|
<slot name="offer-card" :offer="offer">
|
|
<OfferCard :offer="offer" linkable />
|
|
</slot>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
interface Offer {
|
|
uuid: string
|
|
[key: string]: any
|
|
}
|
|
|
|
defineProps<{
|
|
loading: boolean
|
|
offers: Offer[]
|
|
}>()
|
|
|
|
const emit = defineEmits<{
|
|
'select-offer': [offer: Offer]
|
|
}>()
|
|
</script>
|