feat: implement Bari bounds validation and update UI components for admin panel
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import type { Report } from '~/types/api'
|
||||
import { isWithinBariBounds } from '~/utils/bari'
|
||||
|
||||
definePageMeta({
|
||||
middleware: 'auth',
|
||||
@@ -15,7 +16,9 @@ const filterStatus = ref('')
|
||||
|
||||
const { data: reportsRes, pending } = useAsyncData('citizen-reports-list', () => getReports({}))
|
||||
|
||||
const reports = computed<Report[]>(() => reportsRes.value?.reports || [])
|
||||
const reports = computed<Report[]>(() =>
|
||||
(reportsRes.value?.reports || []).filter((report) => isWithinBariBounds(report.latitude, report.longitude))
|
||||
)
|
||||
const filteredReports = computed(() => {
|
||||
if (!filterStatus.value) return reports.value
|
||||
if (filterStatus.value === 'IN_PROGRESS') {
|
||||
|
||||
Reference in New Issue
Block a user