feat(client): show actionable customs count on sidebar
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user