feat: DingTalk attendance import + integration config + expense types + UI polish

Server:
- Add DingTalk attendance import service with SSE progress streaming
- Add IntegrationConfig entity & module for multi-tenant DingTalk setup
- Add ExpenseType entity & ExpenseTypesModule
- Add SeedModule for DB initialization
- Add UserDingMapping entity for DingTalk user linkage
- Attendance service: import flow with dedup & student auto-mapping
- Rooms service: time-range overlap queries
- Sync controller/service: DingTalk integration wiring
- Permission guard: refactor to pure re-export
- Campus scope middleware: tenant-aware filtering

Admin UI:
- Attendance page: import UI with progress & result summary
- All pages: tableStyle/tablePagination standardization
- Login page: responsive styling
- Sensitive data: useViewSensitive hook for masked viewing
- Vite config: path aliases, build optimization
- Test infra: vitest config, test utilities

Docs: PRD DingTalk batch 1 & 2 design docs
This commit is contained in:
2026-07-09 09:11:56 +08:00
parent f1959f0d2a
commit 42d3f0e27f
71 changed files with 5331 additions and 609 deletions

View File

@@ -0,0 +1,24 @@
/**
* Vitest browser-mode setup.
* Runs once before all tests.
*/
import { beforeAll, afterEach } from 'vitest';
// Base URL: the Vite dev server proxies /api → localhost:3003
const BASE = 'http://localhost:3002';
beforeAll(() => {
// Ensure we're running against the local dev server
console.log(`[setup] browser integration tests → ${BASE}`);
});
afterEach(() => {
// Clear localStorage between tests to avoid state leakage
// (only clear auth-related keys; keep other state if needed)
localStorage.removeItem('token');
localStorage.removeItem('user');
localStorage.removeItem('permissions');
localStorage.removeItem('currentCampusId');
});
export { BASE };