Skip to content

Commit

Permalink
Add grant for FT if select loan for full time
Browse files Browse the repository at this point in the history
  • Loading branch information
datajohnson committed Jun 17, 2024
1 parent 3cd7414 commit 9ee890f
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions src/api/models/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -605,9 +605,9 @@ export function FundingFromDraft(draft: any): any[] {
yea_request_amount: cleanNumber(yea_request_amount),
});

if (hasDependents && request_type_id == 4) {
if (request_type_id == 4) {
funding.push({
request_type_id: 32, // Dependent grant for FT
request_type_id: 35, // Grant for FT
status_id: 32, // Online status per Mariazel
received_date: new Date(),
status_date: new Date(),
Expand All @@ -616,8 +616,22 @@ export function FundingFromDraft(draft: any): any[] {
csl_request_amount: application_type_id == 2 ? cleanNumber(loan_amount) : 0,
is_csl_full_amount: application_type_id == 2 && csfa_amounts == "Full amount loans and grants",
is_csg_only: csfa_amounts == "Grants only",
yea_request_amount: cleanNumber(yea_request_amount),
});

if (hasDependents) {
funding.push({
request_type_id: 32, // Dependent grant for FT
status_id: 32, // Online status per Mariazel
received_date: new Date(),
status_date: new Date(),
entering_first_year: draft.program_details.year_entering == 1,
student_is_in_ft_study: draft.program_details.attendance == "Full Time",
csl_request_amount: application_type_id == 2 ? cleanNumber(loan_amount) : 0,
is_csl_full_amount: application_type_id == 2 && csfa_amounts == "Full amount loans and grants",
is_csg_only: csfa_amounts == "Grants only",
yea_request_amount: cleanNumber(yea_request_amount),
});
}
} else if (hasDependents && request_type_id == 5) {
funding.push({
request_type_id: 33, // Dependent grant for PT
Expand Down

0 comments on commit 9ee890f

Please sign in to comment.