mirror of
https://github.com/urosran/cally.git
synced 2026-10-26 02:47:54 +00:00
Fix profile type
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
import {ProfileType} from "@/contexts/AuthContext";
|
||||
|
||||
export interface User {
|
||||
uid: string;
|
||||
email: string | null;
|
||||
}
|
||||
|
||||
export interface UserProfile {
|
||||
userType: "parent" | "child" | "caregiver";
|
||||
userType: ProfileType;
|
||||
name: string;
|
||||
childrenIds?: string[];
|
||||
birthday?: Date;
|
||||
@@ -15,18 +17,17 @@ export interface User {
|
||||
}
|
||||
|
||||
export interface ParentProfile extends UserProfile {
|
||||
userType: "parent";
|
||||
userType: ProfileType.PARENT;
|
||||
childrenIds: string[];
|
||||
}
|
||||
|
||||
export interface ChildProfile extends UserProfile {
|
||||
userType: "child";
|
||||
userType: ProfileType.CHILD;
|
||||
birthday: Date;
|
||||
parentId: string;
|
||||
}
|
||||
|
||||
export interface CaregiverProfile extends UserProfile {
|
||||
userType: "caregiver";
|
||||
//assignedChildrenId: string[];
|
||||
userType: ProfileType.CAREGIVER;
|
||||
contact: string;
|
||||
}
|
||||
Reference in New Issue
Block a user