Fix catalog: selection panels instead of modals, remove duplicate QuoteForm
All checks were successful
Build Docker Image / build (push) Successful in 3m55s
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
This commit is contained in:
@@ -1,27 +1,13 @@
|
||||
<template>
|
||||
<div class="flex flex-col gap-4 h-full">
|
||||
<!-- Quote form -->
|
||||
<QuoteForm
|
||||
:product-id="productId"
|
||||
:product-label="productLabel"
|
||||
:hub-id="hubId"
|
||||
:hub-label="hubLabel"
|
||||
:supplier-id="supplierId"
|
||||
:supplier-label="supplierLabel"
|
||||
:quantity="quantity"
|
||||
:can-search="canSearch"
|
||||
@edit-filter="emit('edit-filter', $event)"
|
||||
@remove-filter="emit('remove-filter', $event)"
|
||||
@update-quantity="emit('update-quantity', $event)"
|
||||
@search="emit('search')"
|
||||
@clear-all="emit('clear-all')"
|
||||
/>
|
||||
|
||||
<!-- Divider -->
|
||||
<div v-if="showResults" class="divider my-0" />
|
||||
<!-- 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 v-if="showResults" class="flex-1 overflow-y-auto">
|
||||
<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>
|
||||
@@ -32,9 +18,6 @@
|
||||
</div>
|
||||
|
||||
<div v-else class="flex flex-col gap-3">
|
||||
<Text tone="muted" class="text-sm">
|
||||
{{ $t('catalog.headers.offers') }}: {{ offers.length }}
|
||||
</Text>
|
||||
<div
|
||||
v-for="offer in offers"
|
||||
:key="offer.uuid"
|
||||
@@ -57,25 +40,11 @@ interface Offer {
|
||||
}
|
||||
|
||||
defineProps<{
|
||||
productId?: string
|
||||
productLabel?: string
|
||||
hubId?: string
|
||||
hubLabel?: string
|
||||
supplierId?: string
|
||||
supplierLabel?: string
|
||||
quantity?: string
|
||||
canSearch: boolean
|
||||
showResults: boolean
|
||||
loading: boolean
|
||||
offers: Offer[]
|
||||
}>()
|
||||
|
||||
const emit = defineEmits<{
|
||||
'edit-filter': [type: string]
|
||||
'remove-filter': [type: string]
|
||||
'update-quantity': [value: string]
|
||||
'search': []
|
||||
'clear-all': []
|
||||
'select-offer': [offer: Offer]
|
||||
}>()
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user