feature: Shared UX Primitives
This commit is contained in:
@@ -18,7 +18,11 @@
|
||||
<BatchList
|
||||
:batches="batchStore.batches"
|
||||
:loading="batchStore.loading"
|
||||
:error="batchStore.error"
|
||||
empty-title="No batches are waiting for verification."
|
||||
empty-description="New batches appear here after data entry is submitted."
|
||||
@select="openBatch"
|
||||
@retry="loadQueue"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -64,6 +68,14 @@ function openBatch(id: string) {
|
||||
router.push(`/verification/${id}`)
|
||||
}
|
||||
|
||||
async function loadQueue() {
|
||||
await batchStore.listBatches({
|
||||
status: 'PENDING_VERIFICATION',
|
||||
page: 1,
|
||||
pageSize: 50,
|
||||
})
|
||||
}
|
||||
|
||||
watch(
|
||||
batchId,
|
||||
async (id) => {
|
||||
@@ -76,11 +88,7 @@ watch(
|
||||
|
||||
onMounted(async () => {
|
||||
if (!batchId.value) {
|
||||
await batchStore.listBatches({
|
||||
status: 'PENDING_VERIFICATION',
|
||||
page: 1,
|
||||
pageSize: 50,
|
||||
})
|
||||
await loadQueue()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user