completionId: cgen-42eaaf27a9b74607981b4de7c3f42460
cgen-42eaaf27a9b74607981b4de7c3f42460
This commit is contained in:
parent
2a32c4da70
commit
df257c72a9
1 changed files with 6 additions and 1 deletions
|
|
@ -141,9 +141,14 @@ const ensureDailyStreakForProfile = async (
|
|||
};
|
||||
};
|
||||
|
||||
export function checkProfileComplete(p?: AethexUserProfile | null): boolean {
|
||||
export function checkProfileComplete(p?: AethexUserProfile | null, roles?: string[]): boolean {
|
||||
if (!p) return false;
|
||||
|
||||
// Admins/owners are always considered complete
|
||||
if (roles?.some((r) => ["owner", "admin", "founder", "staff"].includes(r.toLowerCase()))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ((p as any).onboarded === true) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue