fix: wire showHidden param through suggestions API, remove dead code

This commit is contained in:
Jennie Robinson Faber 2026-04-05 17:00:06 +01:00
parent ed33cbb9e7
commit 6573e30d31
2 changed files with 5 additions and 15 deletions

View file

@ -13,7 +13,7 @@
<template v-else>
<!-- Filter Bar -->
<div v-if="tagOptions.length > 0 || stateOptions.length > 0" class="filter-bar">
<div v-if="tagOptions.length > 0" class="filter-bar">
<select
v-model="filterTag"
class="filter-select"
@ -340,7 +340,6 @@ const filterState = ref('')
const showHidden = ref(false)
const hiddenCount = ref(0)
const tagOptions = ref([])
const stateOptions = ref([])
const craftTagOptions = ref([])
// State display text
@ -361,15 +360,6 @@ const craftTagLabel = (slug) => {
return found ? found.label : slug
}
// Build tag options from the current member's cooperative topics
const buildTagOptions = () => {
const topics = memberData.value?.communityConnections?.topics || []
tagOptions.value = topics.map(t => ({
slug: t.tagSlug,
label: cooperativeTagLabel(t.tagSlug),
}))
}
// Helpers
const getInitials = (name) => {
if (!name) return '?'
@ -402,6 +392,7 @@ const loadSuggestions = async () => {
const params = {}
if (filterTag.value) params.tag = filterTag.value
if (filterState.value) params.state = filterState.value
if (showHidden.value) params.showHidden = 'true'
const data = await getSuggestions(params)
suggestions.value = data.suggestions || []
} catch (error) {
@ -512,8 +503,6 @@ const handleWithdraw = async (connectionId) => {
}
const handleShowHiddenToggle = async () => {
// Reload suggestions the API excludes hidden by default
// When showing hidden, we'd need an endpoint param; for now just reload
await loadSuggestions()
}