forked from wangziqi/gongxue-base
14 lines
401 B
TypeScript
14 lines
401 B
TypeScript
export interface DepositStudentLookup {
|
|
id: number;
|
|
name: string;
|
|
studentNo?: string | null;
|
|
}
|
|
|
|
export const buildDepositStudentOption = (student: DepositStudentLookup) => ({
|
|
value: student.id,
|
|
label: `${student.name} (${student.studentNo || `#${student.id}`})`,
|
|
});
|
|
|
|
export const buildDepositStudentOptions = (students: DepositStudentLookup[]) =>
|
|
students.map(buildDepositStudentOption);
|