diff --git a/src/api/models/application.ts b/src/api/models/application.ts index da7c335d..e1e04966 100644 --- a/src/api/models/application.ts +++ b/src/api/models/application.ts @@ -360,10 +360,14 @@ export function ApplicationFromDraft(draft: any): Application { ? ensureInteger(draft.residency.last_return_date.split("/")[1]) : null, + is_two_residence: false, + //prestudy_start_date: undefined, //prestudy_end_date: undefined, } as Application; + if (draft.funding_sources && draft.funding_sources.second_residence == true) app.is_two_residence = true; + if ( draft.csfa_accomodation && draft.csfa_accomodation.accomodations && diff --git a/src/api/services/shared/documentation-service.ts b/src/api/services/shared/documentation-service.ts index c9c18f98..3e5ca591 100644 --- a/src/api/services/shared/documentation-service.ts +++ b/src/api/services/shared/documentation-service.ts @@ -113,6 +113,15 @@ export class DocumentationService { case "Spouse as Dependent": // I don't currently know how to handle this... break; + case "Permanent Resident": + if (appDetail.citizenship_status != "3") doc.meets_conditions = false; + break; + case "Second Residence": + if (appDetail.is_two_residence != 1) doc.meets_conditions = false; + break; + case "Has Income": + //if (app.csfa_income.has_income != true) doc.meets_conditions = false; + break; case "Yukon and Previous CSL": // I don't currently know how to handle this... // But I belive it's handled by not having the requirement @@ -181,6 +190,7 @@ export class DocumentationService { break; case "Has Dependant": if (app.student_dependants.has_dependants == false) doc.meets_conditions = false; + if (app.student_dependants.has_dependants != true) doc.meets_conditions = false; break; case "Married/Common Law": if (app.personal_details.category != 2) doc.meets_conditions = false; @@ -207,6 +217,9 @@ export class DocumentationService { case "Second Residence": if (app.funding_sources.second_residence != true) doc.meets_conditions = false; break; + case "Has Income": + if (app.csfa_income.has_income != true) doc.meets_conditions = false; + break; case "Yukon and Previous CSL": // I don't currently know how to handle this... // But I belive it's handled by not having the requirement