From 43cd74ddc685b1b813334a2aa66e19a7acf52411 Mon Sep 17 00:00:00 2001 From: Michael Johnson Date: Wed, 19 Jun 2024 14:15:34 -0700 Subject: [PATCH 1/2] Clear out travel for STA if by correspondence --- .../assessment/assessment-sta-repository.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/api/repositories/assessment/assessment-sta-repository.ts b/src/api/repositories/assessment/assessment-sta-repository.ts index 4eac9c38..5c3bbede 100644 --- a/src/api/repositories/assessment/assessment-sta-repository.ts +++ b/src/api/repositories/assessment/assessment-sta-repository.ts @@ -47,6 +47,12 @@ export class AssessmentSTA extends AssessmentBaseRepository { initValues.home_city_id || 0, initValues.destination_city_id || 0, ]); + + // clear travel if by correspondence + if (this.application.is_correspondence) { + initValues.travel_allowance = 0; + } + initValues.weekly_amount = await this.getScalarValue("fn_get_weekly_amount_sta", [application_id]); if (disbursementList.length) { @@ -159,6 +165,12 @@ export class AssessmentSTA extends AssessmentBaseRepository { refreshData.home_city_id || 0, refreshData.destination_city_id || 0, ]); + + // clear travel if by correspondence + if (this.application.is_correspondence) { + refreshData.travel_allowance = 0; + } + refreshData.weekly_amount = await this.getScalarValue("fn_get_weekly_amount_sta", [application_id]); refreshData.assessed_amount = await this.getScalarValue("fn_get_other_inst_total_sta", [ From 544c9cc47a27f8bc08cd5dc37126b8fbdbcadb29 Mon Sep 17 00:00:00 2001 From: Michael Johnson Date: Wed, 19 Jun 2024 15:18:37 -0700 Subject: [PATCH 2/2] Adding conditions for new items --- src/api/services/shared/documentation-service.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/api/services/shared/documentation-service.ts b/src/api/services/shared/documentation-service.ts index c415f631..c9c18f98 100644 --- a/src/api/services/shared/documentation-service.ts +++ b/src/api/services/shared/documentation-service.ts @@ -201,6 +201,12 @@ export class DocumentationService { case "Spouse as Dependent": // I don't currently know how to handle this... break; + case "Permanent Resident": + if (app.statistical.citizenship != "3") doc.meets_conditions = false; + break; + case "Second Residence": + if (app.funding_sources.second_residence != 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