-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
good first issueGood for newcomersGood for newcomers
Description
Usecase:
Currently when I want to check when an individual is actively enrolled in a program(say Child program) in say, in report card query, I need to do the below:
enrolment.program.name === 'Child' && _.isNil(enrolment.programExitDateTime) && !enrolment.voided
Instead I would like to have a method, in models like below:
const isActive = (programName) => {
return this.program.name === programName && _.isNil(this.programExitDateTime) && !this.voided
}
Need:
- This is to prevent missing out checking voided or if the program is exited in rules/report card queries
- To keep the code in rules and report card queries more concise.
- Currently the method isActive available doesn't do all the checks.
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers
Type
Projects
Status
Ready