fix(deposits): show student numbers in lookup
This commit is contained in:
@@ -19,6 +19,7 @@ import dayjs from 'dayjs';
|
||||
import api from '../../api';
|
||||
import PermissionButton from '../../components/PermissionButton';
|
||||
import { message } from '../../ui/app-message';
|
||||
import { buildDepositStudentOption } from './deposit-student-option';
|
||||
|
||||
const statusMap: Record<string, { text: string; color: string }> = {
|
||||
paid: { text: '已缴', color: 'green' },
|
||||
@@ -90,10 +91,8 @@ const DepositsPage: React.FC = () => {
|
||||
const studentOptions = useMemo(
|
||||
() =>
|
||||
students
|
||||
.map((s: any) => ({
|
||||
value: s.id,
|
||||
label: s.studentNo ? `${s.name} (${s.studentNo})` : s.name,
|
||||
})),
|
||||
.filter((s: any) => s.status === 'active')
|
||||
.map(buildDepositStudentOption),
|
||||
[students],
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user