Last active
January 13, 2023 18:27
-
-
Save rossmartin/48ab1913ee322c18658ab6673836a1d8 to your computer and use it in GitHub Desktop.
Profile completion
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum ProfileSteps { | |
EmailVerification = 'emailVerification', | |
Employment = 'employment', | |
Education = 'education', | |
Licenses = 'licenses', | |
Certifications = 'certifications', | |
References = 'references', | |
SkillsChecklist = 'skillsChecklist', | |
BackgroundQuestions = 'backgroundQuestions', | |
PersonalInfo = 'personalInfo', | |
PermanentAddress = 'permanentAddress', | |
YearsOfExperience = 'yearsOfExperience', | |
} | |
enum CompletableStatus { | |
Complete = 'complete', | |
Incomplete = 'incomplete', | |
Pending = 'pending', | |
Expiring = 'expiring', | |
Expired = 'expired', | |
} | |
type ProfileCompletion = { | |
meta: { | |
percentCompleted: number; | |
pendingCount: number; | |
expiringCount: number; | |
expiredCount: number; | |
}; | |
steps: { | |
// This does not have to be a mapped type. | |
// I'm not sure what the equivalent graphql types would be. | |
// It can just be "[key: string]". | |
[key in ProfileSteps]: { | |
status: CompletableStatus; | |
label: string; | |
description?: string; | |
}; | |
}; | |
}; | |
export const profileCompletionMockV2: ProfileCompletion = { | |
meta: { | |
percentCompleted: 80, | |
pendingCount: 0, | |
expiringCount: 2, | |
expiredCount: 1, | |
}, | |
steps: { | |
emailVerification: { | |
status: CompletableStatus.Complete, | |
label: 'Verify Email Address', | |
// a description is only needed for pending, expiring or expired | |
}, | |
employment: { | |
status: CompletableStatus.Incomplete, | |
label: 'Work Experience', | |
}, | |
education: { | |
status: CompletableStatus.Complete, | |
label: 'Education', | |
}, | |
licenses: { | |
status: CompletableStatus.Expired, | |
label: 'License', | |
description: 'California RN license expired', | |
}, | |
certifications: { | |
status: CompletableStatus.Complete, | |
label: 'BLS Certification', | |
}, | |
references: { | |
status: CompletableStatus.Expiring, | |
label: 'References', | |
description: 'Two references expiring on 05/02/2023', | |
}, | |
skillsChecklist: { | |
status: CompletableStatus.Complete, | |
label: 'Skills Checklist', | |
}, | |
backgroundQuestions: { | |
status: CompletableStatus.Complete, | |
label: 'Answer Background Questions', | |
}, | |
personalInfo: { | |
status: CompletableStatus.Complete, | |
label: 'Personal Info', | |
}, | |
permanentAddress: { | |
status: CompletableStatus.Complete, | |
label: 'Permanent address', | |
}, | |
yearsOfExperience: { | |
status: CompletableStatus.Complete, | |
label: 'Years of experience', | |
}, | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment