feat: add new upload page for batch processing and importing team owner data to S2A.
This commit is contained in:
@@ -22,7 +22,11 @@ const statusLabels: Record<string, string> = {
|
||||
pooled: '已入库',
|
||||
}
|
||||
|
||||
export default function OwnerList() {
|
||||
interface OwnerListProps {
|
||||
onStatsChange?: () => void
|
||||
}
|
||||
|
||||
export default function OwnerList({ onStatsChange }: OwnerListProps) {
|
||||
const [owners, setOwners] = useState<TeamOwner[]>([])
|
||||
const [total, setTotal] = useState(0)
|
||||
const [loading, setLoading] = useState(false)
|
||||
@@ -63,6 +67,7 @@ export default function OwnerList() {
|
||||
try {
|
||||
await fetch(`/api/db/owners/${id}`, { method: 'DELETE' })
|
||||
loadOwners()
|
||||
onStatsChange?.()
|
||||
} catch (e) {
|
||||
console.error('Failed to delete:', e)
|
||||
}
|
||||
@@ -73,6 +78,7 @@ export default function OwnerList() {
|
||||
try {
|
||||
await fetch('/api/db/owners/clear', { method: 'POST' })
|
||||
loadOwners()
|
||||
onStatsChange?.()
|
||||
} catch (e) {
|
||||
console.error('Failed to clear:', e)
|
||||
}
|
||||
|
||||
@@ -464,7 +464,7 @@ export default function Upload() {
|
||||
|
||||
{activeTab === 'owners' && (
|
||||
<div className="h-full overflow-hidden rounded-xl border border-slate-200 dark:border-slate-700 bg-white dark:bg-slate-800 shadow-sm">
|
||||
<OwnerList />
|
||||
<OwnerList onStatsChange={loadStats} />
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user