feat(client): show actionable customs count on sidebar

This commit is contained in:
2026-10-09 18:14:19 +08:00
parent 639b1ae22c
commit c0b151bc15
10 changed files with 136 additions and 2 deletions
@@ -8,6 +8,9 @@ import { MERCHANT_CUSTOMS_STATUS_LABELS, type MerchantCustomsContainer } from '.
import { readCustomsDocuments, type CustomsDocumentRow } from '../utils/customsDocumentsReader'
import CustomsDocumentsDialog from '../components/CustomsDocumentsDialog.vue'
import { useCustomsPendingStore } from '../store/customsPending'
const customsPending = useCustomsPendingStore()
const loading = ref(false)
const errorMessage = ref('')
const queryModel = ref<QueryModel>({ orderNo: '', inboundCode: '', containerNo: '', status: '' })
@@ -68,6 +71,7 @@ function statusType(detail: MerchantCustomsContainer) {
}
async function load() {
if (loading.value) return
void customsPending.refresh(true)
loading.value = true; errorMessage.value = ''
try {
const { records: loadedRecords, failedCount } = await readCustomsDocuments()