Implement topupTrackerStore

(cherry picked from commit fbf2aeb54f6c82afcdb4717f49bca28d9d869ab5)
This commit is contained in:
Benjamin Lu
2025-10-31 21:57:59 -07:00
parent cdc0bb591a
commit 4d9a566a13
3 changed files with 164 additions and 2 deletions

View File

@@ -101,12 +101,14 @@ import {
EventType,
useCustomerEventsService
} from '@/services/customerEventsService'
import { useTopupTrackerStore } from '@/stores/topupTrackerStore'
const events = ref<AuditLog[]>([])
const loading = ref(true)
const error = ref<string | null>(null)
const customerEventService = useCustomerEventsService()
const topupTracker = useTopupTrackerStore()
const pagination = ref({
page: 1,
@@ -159,6 +161,8 @@ const loadEvents = async () => {
if (response.totalPages) {
pagination.value.totalPages = response.totalPages
}
void topupTracker.reconcileWithEvents(response.events)
} else {
error.value = customerEventService.error.value || 'Failed to load events'
}