Skip to content

Commit 69aa5dd

Browse files
committed
Letter fix for STA/STAOther
1 parent b160791 commit 69aa5dd

File tree

6 files changed

+69
-51
lines changed

6 files changed

+69
-51
lines changed

src/api/models/request-type.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export enum RequestTypes {
3232
GRANT_FOR_STUDENTS_WITH_PERMANENT_DISABILITIES_PT = 34,
3333
GRANT_FOR_FULL_TIME_STUDENTS = 35,
3434
MATURE = 41,
35+
STUDENT_TRAINING_ALLOWANCE_OTHER = 46,
3536
}
3637

3738
interface RequestTypeRecord {

src/api/serializers/funding-requests/letters/student-training-allowance-alkan-air-approval-template-serializer.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ export default class StudentTrainingAllowanceAlkanAirApprovalTemplateSerializer
138138
name: studyArea.description,
139139
startDate: assessment.classesStartDate,
140140
endDate: assessment.classesEndDate,
141+
effectiveRateDate: assessment.effectiveRateDate,
141142
institutionName,
142143
ratePerWeekInCents,
143144
travelAllowanceInCents,

src/api/serializers/funding-requests/letters/student-training-allowance-yukon-university-approval-template-serializer.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ export default class StudentTrainingAllowanceYukonUniversityApprovalTemplateSeri
138138
name: studyArea.description,
139139
startDate: assessment.classesStartDate,
140140
endDate: assessment.classesEndDate,
141+
effectiveRateDate: assessment.effectiveRateDate,
141142
institutionName,
142143
ratePerWeekInCents,
143144
travelAllowanceInCents,

src/api/services/admin/funding-requests/letters/create-service.ts

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -67,27 +67,12 @@ export default class CreateService {
6767
currentUser,
6868
});
6969
} else if (requestType === RequestType.Types.STUDENT_TRAINING_ALLOWANCE && requestStatus === Status.Types.AWARDED) {
70-
// FUTURE: this could become a separate service
71-
const institutionName = this.#getInstitutionName(fundingRequest);
72-
if (institutionName === Institution.Names.YUKON_UNIVERSITY) {
73-
return this.#generateStudentTrainingAllowanceYukonUniversityApprovalLetter({
74-
director,
75-
uploader,
76-
fundingRequest,
77-
currentUser,
78-
});
79-
} else if (institutionName === Institution.Names.ALKAN_AIR_FLIGHT_TRAINING) {
80-
return this.#generateStudentTrainingAllowanceAlkanAirApprovalLetter({
81-
director,
82-
uploader,
83-
fundingRequest,
84-
currentUser,
85-
});
86-
} else {
87-
throw new Error(
88-
`Could not generate Student Training Allowance letter for institution name: ${institutionName}`
89-
);
90-
}
70+
return this.#generateStudentTrainingAllowanceYukonUniversityApprovalLetter({
71+
director,
72+
uploader,
73+
fundingRequest,
74+
currentUser,
75+
});
9176
} else if (
9277
requestType === RequestType.Types.STUDENT_TRAINING_ALLOWANCE &&
9378
requestStatus === Status.Types.REJECTED
@@ -98,6 +83,26 @@ export default class CreateService {
9883
fundingRequest,
9984
currentUser,
10085
});
86+
} else if (
87+
requestType === RequestType.Types.STUDENT_TRAINING_ALLOWANCE_OTHER &&
88+
requestStatus === Status.Types.AWARDED
89+
) {
90+
return this.#generateStudentTrainingAllowanceAlkanAirApprovalLetter({
91+
director,
92+
uploader,
93+
fundingRequest,
94+
currentUser,
95+
});
96+
} else if (
97+
requestType === RequestType.Types.STUDENT_TRAINING_ALLOWANCE_OTHER &&
98+
requestStatus === Status.Types.REJECTED
99+
) {
100+
return this.#generateStudentTrainingAllowanceRejectionLetter({
101+
director,
102+
uploader,
103+
fundingRequest,
104+
currentUser,
105+
});
101106
} else if (
102107
requestType === RequestType.Types.CANADA_STUDENT_LOAN_FULL_TIME &&
103108
requestStatus === Status.Types.AWARDED

src/api/templates/admin/application-letter/approval/student-training-allowance-alkan-air.handlebars

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@
2727
</p>
2828

2929
<p>
30-
I am pleased to inform you that your Student Training Allowance (STA) application has been
31-
approved as follows:
30+
I am pleased to inform you that your Student Training Allowance (STA) application has been approved as follows:
3231
</p>
3332

3433
<p>
@@ -41,6 +40,13 @@
4140
</span>
4241
<span class="flex justify-between">
4342
<strong>Institution: {{program.institutionName}}</strong>
43+
<span>
44+
<strong>Effective Rate Date:</strong>
45+
<span class="ml-4">{{momentDateFormat program.effectiveRateDate "MMM Do, YYYY"}}</span>
46+
</span>
47+
</span>
48+
<span class="flex justify-between">
49+
<strong>&nbsp;</strong>
4450
<span>
4551
<strong>End Date:</strong>
4652
<span class="ml-4">{{momentDateFormat program.endDate "MMM Do, YYYY"}}</span>
@@ -64,29 +70,28 @@
6470
</p>
6571

6672
<p>
67-
This funding covers the study period indicated above, up to a maximum of 40 weeks per academic
68-
year. If your application was received more than 14 days after the start of your classes, your
69-
start date above will reflect the date that your completed application was received.
73+
This funding covers the study period indicated above, up to a maximum of 40 weeks per academic year. If your
74+
application was received more than 14 days after the start of your classes, the effective rate date above will
75+
reflect the date that your completed application was received.
7076
</p>
7177

7278
<div>
7379
<strong>Your responsibilities:</strong>
7480

7581
<ul>
7682
<li>Ensure the information above regarding your funding is accurate.</li>
77-
<li>Before your program begins, provide banking information for direct deposit to Yukon
78-
Student Financial Assistance (SFA) by submitting a Direct Deposit Authorization Form
79-
including your direct deposit information to
83+
<li>Before your program begins, provide banking information for direct deposit to Yukon Student Financial
84+
Assistance (SFA) by submitting a Direct Deposit Authorization Form including your direct deposit information to
8085
<a href="mailto:sfa@yukon.ca">sfa@yukon.ca</a>. You can download the Authorization Form at
8186
<a
8287
href="http://yukon.ca/en/direct-deposit-authorziation-form"
8388
>http://yukon.ca/en/direct-deposit-authorziation-form</a>.</li>
84-
<li>If you stop attending classes, drop to part-time, or withdraw from classes, inform our
85-
office or Alkan Air to avoid having to pay back any STA.</li>
86-
<li>If you are or will be receiving financial assistance from any other source, check with our
87-
office to avoid having to pay back any STA.</li>
88-
<li>Yukon SFA will send you an email with the process required for confirming your regular
89-
attendance at {{program.institutionName}}.
89+
<li>If you stop attending classes, drop to part-time, or withdraw from classes, inform our office or Alkan Air to
90+
avoid having to pay back any STA.</li>
91+
<li>If you are or will be receiving financial assistance from any other source, check with our office to avoid
92+
having to pay back any STA.</li>
93+
<li>Yukon SFA will send you an email with the process required for confirming your regular attendance at
94+
{{program.institutionName}}.
9095
</li>
9196
</ul>
9297
</div>
@@ -106,4 +111,4 @@
106111
<br />
107112
Department of Education, Government of Yukon
108113
</p>
109-
</div>
114+
</div>

src/api/templates/admin/application-letter/approval/student-training-allowance-yukon-university.handlebars

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@
2727
</p>
2828

2929
<p>
30-
I am pleased to inform you that your Student Training Allowance (STA) application has been
31-
approved as follows:
30+
I am pleased to inform you that your Student Training Allowance (STA) application has been approved as follows:
3231
</p>
3332

3433
<p>
@@ -41,6 +40,13 @@
4140
</span>
4241
<span class="flex justify-between">
4342
<strong>Institution: {{program.institutionName}}</strong>
43+
<span>
44+
<strong>Effective Rate Date:</strong>
45+
<span class="ml-4">{{momentDateFormat program.effectiveRateDate "MMM Do, YYYY"}}</span>
46+
</span>
47+
</span>
48+
<span class="flex justify-between">
49+
<strong>&nbsp;</strong>
4450
<span>
4551
<strong>End Date:</strong>
4652
<span class="ml-4">{{momentDateFormat program.endDate "MMM Do, YYYY"}}</span>
@@ -64,29 +70,28 @@
6470
</p>
6571

6672
<p>
67-
This funding covers the study period indicated above, up to a maximum of 40 weeks per academic
68-
year. If your application was received more than 14 days after the start of your classes, your
69-
start date above will reflect the date that your completed application was received.
73+
This funding covers the study period indicated above, up to a maximum of 40 weeks per academic year. If your
74+
application was received more than 14 days after the start of your classes, the effective rate date above will
75+
reflect the date that your completed application was received.
7076
</p>
7177

7278
<div>
7379
<strong>Your responsibilities:</strong>
7480

7581
<ul>
7682
<li>Ensure the information above regarding your funding is accurate.</li>
77-
<li>Before your program begins, provide banking information for direct deposit to Yukon
78-
University. The payroll clerk can be reached at
83+
<li>Before your program begins, provide banking information for direct deposit to Yukon University. The payroll
84+
clerk can be reached at
7985
<a href="tel:867-668-8717">867-668-8717</a>
8086
(toll free at
8187
<a href="1-800-661-0504;8717">1-800-661-0504 extension 8717</a>).</li>
82-
<li>If you stop attending classes, drop to part-time, or withdraw from classes, inform our
83-
office or the Institution to avoid having to pay back any STA.</li>
84-
<li>If you are or will be receiving financial assistance from any other source, check with our
85-
office to avoid having to pay back any STA.</li>
88+
<li>If you stop attending classes, drop to part-time, or withdraw from classes, inform our office or the
89+
Institution to avoid having to pay back any STA.</li>
90+
<li>If you are or will be receiving financial assistance from any other source, check with our office to avoid
91+
having to pay back any STA.</li>
8692
<li>You will be required to sign in regularly to receive STA.</li>
87-
<li>The Financial Aid Advisor with the Office of the Registrar at Yukon University will send
88-
an email to your Yukon University email with the process required for confirming your
89-
regular attendance at the University.
93+
<li>The Financial Aid Advisor with the Office of the Registrar at Yukon University will send an email to your
94+
Yukon University email with the process required for confirming your regular attendance at the University.
9095
</li>
9196
</ul>
9297
</div>
@@ -106,4 +111,4 @@
106111
<br />
107112
Department of Education, Government of Yukon
108113
</p>
109-
</div>
114+
</div>

0 commit comments

Comments
 (0)