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:
@@ -244,14 +244,16 @@ const toggleTheme = () => {
|
||||
theme.value = theme.value === 'night' ? 'cupcake' : 'night'
|
||||
}
|
||||
|
||||
// Search handler for Quote mode - emits event that page can handle
|
||||
// Search handler for Quote mode - triggers search via shared state
|
||||
const localePath = useLocalePath()
|
||||
const router = useRouter()
|
||||
const searchTrigger = useState<number>('catalog-search-trigger', () => 0)
|
||||
const onSearch = () => {
|
||||
// Navigate to catalog page which will handle the search
|
||||
// Navigate to catalog page if not there
|
||||
if (!route.path.includes('/catalog')) {
|
||||
router.push({ path: localePath('/catalog'), query: { ...route.query, mode: 'quote' } })
|
||||
}
|
||||
// The page component will react to canSearch becoming true and perform the search
|
||||
// Trigger search by incrementing the counter (page watches this)
|
||||
searchTrigger.value++
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user