diff --git a/src/components/directory/DirectoryFilter.vue b/src/components/directory/DirectoryFilter.vue
index 67c9932..84b84cd 100644
--- a/src/components/directory/DirectoryFilter.vue
+++ b/src/components/directory/DirectoryFilter.vue
@@ -6,11 +6,13 @@ import { Button } from '@/components/ui/button'
defineProps<{
category: string
search: string
+ town: string
}>()
const emit = defineEmits<{
'update:category': [value: string]
'update:search': [value: string]
+ 'update:town': [value: string]
}>()
const categories = [
@@ -23,6 +25,16 @@ const categories = [
{ id: 'lancha', label: 'Lanchas' },
{ id: 'other', label: 'Other' }
]
+
+const towns = [
+ { id: 'all', label: 'All Towns' },
+ { id: 'San Marcos', label: 'San Marcos' },
+ { id: 'Tzununa', label: 'Tzununa' },
+ { id: 'San Pablo', label: 'San Pablo' },
+ { id: 'San Pedro', label: 'San Pedro' },
+ { id: 'Panajachel', label: 'Panajachel' },
+ { id: 'Jaibalito', label: 'Jaibalito' }
+]
@@ -36,12 +48,22 @@ const categories = [
class="pl-10" placeholder="Search..." />
-
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/directory/DirectoryGrid.vue b/src/components/directory/DirectoryGrid.vue
index 34a9646..55e4d15 100644
--- a/src/components/directory/DirectoryGrid.vue
+++ b/src/components/directory/DirectoryGrid.vue
@@ -6,6 +6,7 @@ import { type DirectoryItem } from '@/types/directory'
import DirectoryFilter from './DirectoryFilter.vue'
const selectedCategory = ref('all')
+const selectedTown = ref('all')
const searchQuery = ref('')
const props = defineProps<{
@@ -42,6 +43,11 @@ const filteredItems = computed(() => {
results = results.filter(item => item.category === selectedCategory.value)
}
+ // Apply town filter
+ if (selectedTown.value !== 'all') {
+ results = results.filter(item => item.town === selectedTown.value)
+ }
+
return results
})
@@ -50,7 +56,7 @@ const filteredItems = computed(() => {