Skip to content

Commit

Permalink
[CPDLP-3338] MVP NPQ Prep - Add missing funded place to NPQ applicati…
Browse files Browse the repository at this point in the history
…ons csv (#1552)
  • Loading branch information
mooktakim authored Jul 26, 2024
1 parent 09c66ec commit 634ef2a
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 7 deletions.
2 changes: 2 additions & 0 deletions app/serializers/api/applications_csv_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class ApplicationsCsvSerializer
private_childcare_provider_urn
headteacher_status
eligible_for_funding
funded_place
funding_choice
course_identifier
status
Expand Down Expand Up @@ -67,6 +68,7 @@ def to_row(application)
application.private_childcare_provider&.provider_urn,
application.headteacher_status,
application.eligible_for_funding,
application.funded_place,
application.funding_choice,
application.course.identifier,
application.lead_provider_approval_status,
Expand Down
9 changes: 7 additions & 2 deletions public/api/docs/v1/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1406,13 +1406,13 @@ components:
example: |
id,participant_id,full_name,email,email_validated,teacher_reference_number,
teacher_reference_number_validated,school_urn,school_ukprn,private_childcare_provider_urn,
headteacher_status,eligible_for_funding,funding_choice,course_identifier,
headteacher_status,eligible_for_funding,funded_place,funding_choice,course_identifier,
status,works_in_school,employer_name,employment_role,created_at,updated_at,
cohort,ineligible_for_funding_reason,targeted_delivery_funding_eligibility,
teacher_catchment,teacher_catchment_country,teacher_catchment_iso_country_code,itt_provider,lead_mentor
db3a7848-7308-4879-942a-c4a70ced400a,7a8fef46-3c43-42c0-b3d5-1ba5904ba562,
Isabelle MacDonald,[email protected],true,1234567,
false,100015,10005549,,no,false,trust,npq-early-headship-coaching-offer,
false,100015,10005549,,no,false,true,trust,npq-early-headship-coaching-offer,
accepted,true,,,2024-04-23T15:52:03Z,2024-04-23T15:52:03Z,2021,
establishment-ineligible,false,true,United Kingdom of Great Britain and Northern Ireland
,GBR,Test ITT Provider,false
Expand Down Expand Up @@ -1497,6 +1497,11 @@ components:
funding from the DfE
type: boolean
example: true
funded_place:
description: This field indicates whether the application is funded
nullable: true
type: boolean
example: true
funding_choice:
description: Indicates how this NPQ participant has said they will funded
their training
Expand Down
9 changes: 7 additions & 2 deletions public/api/docs/v2/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1590,13 +1590,13 @@ components:
example: |
id,participant_id,full_name,email,email_validated,teacher_reference_number,
teacher_reference_number_validated,school_urn,school_ukprn,private_childcare_provider_urn,
headteacher_status,eligible_for_funding,funding_choice,course_identifier,
headteacher_status,eligible_for_funding,funded_place,funding_choice,course_identifier,
status,works_in_school,employer_name,employment_role,created_at,updated_at,
cohort,ineligible_for_funding_reason,targeted_delivery_funding_eligibility,
teacher_catchment,teacher_catchment_country,teacher_catchment_iso_country_code,itt_provider,lead_mentor
db3a7848-7308-4879-942a-c4a70ced400a,7a8fef46-3c43-42c0-b3d5-1ba5904ba562,
Isabelle MacDonald,[email protected],true,1234567,
false,100015,10005549,,no,false,trust,npq-early-headship-coaching-offer,
false,100015,10005549,,no,false,true,trust,npq-early-headship-coaching-offer,
accepted,true,,,2024-04-23T15:52:03Z,2024-04-23T15:52:03Z,2021,
establishment-ineligible,false,true,United Kingdom of Great Britain and Northern Ireland
,GBR,Test ITT Provider,false
Expand Down Expand Up @@ -1681,6 +1681,11 @@ components:
funding from the DfE
type: boolean
example: true
funded_place:
description: This field indicates whether the application is funded
nullable: true
type: boolean
example: true
funding_choice:
description: Indicates how this NPQ participant has said they will funded
their training
Expand Down
4 changes: 3 additions & 1 deletion spec/serializers/api/applications_csv_serializer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
:accepted,
:with_private_childcare_provider,
employer_name: "Employer Name",
employment_role: "Employment Role")
employment_role: "Employment Role",
funded_place: true)
end
let(:rows) { CSV.parse(csv, headers: true) }
let(:first_application) { applications.first }
Expand All @@ -30,6 +31,7 @@
employer_name: first_application.employer_name,
employment_role: first_application.employment_role,
full_name: first_application.user.full_name,
funded_place: first_application.funded_place.to_s,
funding_choice: first_application.funding_choice,
headteacher_status: first_application.headteacher_status,
ineligible_for_funding_reason: first_application.ineligible_for_funding_reason,
Expand Down
6 changes: 6 additions & 0 deletions spec/swagger_schemas/models/application_csv.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@
type: :boolean,
example: true,
},
funded_place: {
description: "This field indicates whether the application is funded",
nullable: true,
type: :boolean,
example: true,
},
funding_choice: {
description: "Indicates how this NPQ participant has said they will funded their training",
type: :string,
Expand Down
4 changes: 2 additions & 2 deletions spec/swagger_schemas/responses/applications_csv.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
},
example: "id,participant_id,full_name,email,email_validated,teacher_reference_number,\n" \
"teacher_reference_number_validated,school_urn,school_ukprn,private_childcare_provider_urn,\n" \
"headteacher_status,eligible_for_funding,funding_choice,course_identifier,\n" \
"headteacher_status,eligible_for_funding,funded_place,funding_choice,course_identifier,\n" \
"status,works_in_school,employer_name,employment_role,created_at,updated_at,\n" \
"cohort,ineligible_for_funding_reason,targeted_delivery_funding_eligibility,\n" \
"teacher_catchment,teacher_catchment_country,teacher_catchment_iso_country_code,itt_provider,lead_mentor\n"\
"db3a7848-7308-4879-942a-c4a70ced400a,7a8fef46-3c43-42c0-b3d5-1ba5904ba562,\n" \
"Isabelle MacDonald,[email protected],true,1234567,\n" \
"false,100015,10005549,,no,false,trust,npq-early-headship-coaching-offer,\n" \
"false,100015,10005549,,no,false,true,trust,npq-early-headship-coaching-offer,\n" \
"accepted,true,,,2024-04-23T15:52:03Z,2024-04-23T15:52:03Z,2021,\n" \
"establishment-ineligible,false,true,United Kingdom of Great Britain and Northern Ireland\n" \
",GBR,Test ITT Provider,false\n",
Expand Down

0 comments on commit 634ef2a

Please sign in to comment.