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:
@@ -1,5 +1,5 @@
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { Card, Tabs, Table, Tag, Empty, Spin } from 'antd';
|
||||
import React, { useEffect, useState, useMemo } from 'react';
|
||||
import { Card, Tabs, Table, Tag, Empty, Spin, message } from 'antd';
|
||||
import type { ColumnsType } from 'antd/es/table';
|
||||
import api from '../../api';
|
||||
|
||||
@@ -65,6 +65,7 @@ const TeacherWorkspacePage: React.FC = () => {
|
||||
setData(res);
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
message.error('数据加载失败');
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
@@ -72,7 +73,7 @@ const TeacherWorkspacePage: React.FC = () => {
|
||||
fetchData();
|
||||
}, []);
|
||||
|
||||
const classColumns: ColumnsType<AssignedClass> = [
|
||||
const classColumns: ColumnsType<AssignedClass> = useMemo(() => [
|
||||
{
|
||||
title: '班级名称',
|
||||
dataIndex: 'className',
|
||||
@@ -88,9 +89,9 @@ const TeacherWorkspacePage: React.FC = () => {
|
||||
dataIndex: 'subject',
|
||||
render: (v: string | null) => v || '-',
|
||||
},
|
||||
];
|
||||
], []);
|
||||
|
||||
const scheduleColumns: ColumnsType<ScheduleItem> = [
|
||||
const scheduleColumns: ColumnsType<ScheduleItem> = useMemo(() => [
|
||||
{
|
||||
title: '时间',
|
||||
key: 'time',
|
||||
@@ -114,14 +115,14 @@ const TeacherWorkspacePage: React.FC = () => {
|
||||
</Tag>
|
||||
),
|
||||
},
|
||||
];
|
||||
], []);
|
||||
|
||||
const studentColumns: ColumnsType<StudentItem> = [
|
||||
const studentColumns: ColumnsType<StudentItem> = useMemo(() => [
|
||||
{ title: '姓名', dataIndex: 'studentName' },
|
||||
{ title: '学号', dataIndex: 'studentNo', render: (v: string) => v || '-' },
|
||||
{ title: '班级', dataIndex: 'className' },
|
||||
{ title: '加入日期', dataIndex: 'joinDate', render: (v: string) => v || '-' },
|
||||
];
|
||||
], []);
|
||||
|
||||
if (loading) {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user