feat: add backend API for flexible account record upload and validation, including concurrent account_id fetching, and a new frontend upload page.
This commit is contained in:
@@ -58,6 +58,7 @@ export default function Upload() {
|
||||
const [status, setStatus] = useState<ProcessStatus | null>(null)
|
||||
const [polling, setPolling] = useState(false)
|
||||
const [loading, setLoading] = useState(false)
|
||||
const [refreshing, setRefreshing] = useState(false)
|
||||
const [importResult, setImportResult] = useState<{
|
||||
imported: number
|
||||
total: number
|
||||
@@ -232,8 +233,13 @@ export default function Upload() {
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
onClick={() => { loadStats(); fetchStatus(); }}
|
||||
icon={<RefreshCw className={`h-4 w-4 ${polling ? 'animate-spin' : ''}`} />}
|
||||
disabled={refreshing}
|
||||
onClick={async () => {
|
||||
setRefreshing(true)
|
||||
await Promise.all([loadStats(), fetchStatus()])
|
||||
setTimeout(() => setRefreshing(false), 500)
|
||||
}}
|
||||
icon={<RefreshCw className={`h-4 w-4 ${refreshing || polling ? 'animate-spin' : ''}`} />}
|
||||
>
|
||||
刷新
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user