feature: Core Digitization Workstation (Entry, Verification, Approval)
CI / backend (push) Successful in 6m11s
CI / frontend (push) Failing after 1m7s

This commit is contained in:
2026-08-12 04:22:25 +08:00
parent 9811f2a2ed
commit 5caf928787
16 changed files with 2077 additions and 905 deletions
@@ -6,6 +6,7 @@ export function usePresignedUrl(batchId: Ref<string | undefined>) {
const batchStore = useBatchStore()
const documentUrl = ref<string | null>(null)
const documentError = ref<string | null>(null)
const documentLoading = ref(false)
let currentBlobUrl: string | null = null
@@ -21,8 +22,12 @@ export function usePresignedUrl(batchId: Ref<string | undefined>) {
documentUrl.value = null
documentError.value = null
if (!batchId.value) return
if (!batchId.value) {
documentLoading.value = false
return
}
documentLoading.value = true
try {
await batchStore.getBatch(batchId.value)
const blob = await getBlob(`digitization-batches/${batchId.value}/document`)
@@ -33,6 +38,8 @@ export function usePresignedUrl(batchId: Ref<string | undefined>) {
documentUrl.value = currentBlobUrl
} catch (e: unknown) {
documentError.value = e instanceof Error ? e.message : 'Failed to load document'
} finally {
documentLoading.value = false
}
}
@@ -45,6 +52,7 @@ export function usePresignedUrl(batchId: Ref<string | undefined>) {
revokeBlobUrl()
documentUrl.value = null
documentError.value = null
documentLoading.value = false
}
},
{ immediate: true }
@@ -52,5 +60,5 @@ export function usePresignedUrl(batchId: Ref<string | undefined>) {
onUnmounted(revokeBlobUrl)
return { documentUrl, documentError, refreshUrl }
return { documentUrl, documentError, documentLoading, refreshUrl }
}