fix(admin): restore teacher profile form values

This commit is contained in:
2026-07-13 12:01:38 +08:00
parent 337d25e370
commit 8cadf8970e
3 changed files with 49 additions and 2 deletions

View File

@@ -0,0 +1,16 @@
export interface UserProfileFormValues {
joinedAt?: string;
qualifications?: string;
subjects?: string[];
}
export interface UserProfileResponse {
id?: number;
username?: string;
name?: string;
profile?: UserProfileFormValues | null;
}
export const userProfileResponseToFormValues = (
response: UserProfileResponse,
): UserProfileFormValues => response.profile || {};