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