From 612ed49b37f7ddd341ab9443856ec6e3f9370e51 Mon Sep 17 00:00:00 2001 From: Hassan Mir Date: Fri, 13 Dec 2024 15:46:39 +0000 Subject: [PATCH] Initial changes to DQT copy updates to TRS --- app/components/status_tag/component.rb | 1 + app/jobs/update_trs_trn_request_job.rb | 4 ++-- app/lib/application_form_status_updater.rb | 2 +- app/lib/assessment_factory.rb | 4 ++-- app/lib/failure_reasons.rb | 1 + .../assessor_interface/application_forms/show.html.erb | 4 ++-- .../application_forms/status.html.erb | 2 +- .../shared/_age_range_subjects_form_fields.html.erb | 2 +- config/locales/assessor_interface.en.yml | 6 +++++- config/locales/components.en.yml | 1 + config/locales/teacher_interface.en.yml | 2 ++ spec/factories/application_forms.rb | 4 ++-- spec/jobs/update_trstrn_request_job_spec.rb | 4 ++-- spec/lib/application_form_status_updater_spec.rb | 2 +- spec/lib/assessment_factory_spec.rb | 4 ++-- spec/lib/trs/country_code_spec.rb | 2 +- spec/lib/trs/subject_spec.rb | 6 +++--- spec/services/award_qts_spec.rb | 2 +- .../assessor_interface/completing_assessment_spec.rb | 6 +++--- .../duplicate_applicant_application_form_spec.rb | 10 +++++----- 20 files changed, 39 insertions(+), 30 deletions(-) diff --git a/app/components/status_tag/component.rb b/app/components/status_tag/component.rb index 451d1d764..923a0f0c2 100644 --- a/app/components/status_tag/component.rb +++ b/app/components/status_tag/component.rb @@ -46,6 +46,7 @@ def tags overdue_lops: "pink", overdue_reference: "pink", potential_duplicate_in_dqt: "pink", + potential_duplicate_in_trs: "pink", pre_assessment: "pink", preliminary_check: "pink", received: "purple", diff --git a/app/jobs/update_trs_trn_request_job.rb b/app/jobs/update_trs_trn_request_job.rb index 6de666b51..306f40d73 100644 --- a/app/jobs/update_trs_trn_request_job.rb +++ b/app/jobs/update_trs_trn_request_job.rb @@ -15,12 +15,12 @@ def perform(trs_trn_request) trs_trn_request.update!(potential_duplicate:) end - ApplicationFormStatusUpdater.call(application_form:, user: "DQT") + ApplicationFormStatusUpdater.call(application_form:, user: "TRS") unless potential_duplicate AwardQTS.call( application_form:, - user: "DQT", + user: "TRS", trn: response[:trn], access_your_teaching_qualifications_url: response[:access_your_teaching_qualifications_link], diff --git a/app/lib/application_form_status_updater.rb b/app/lib/application_form_status_updater.rb index ba8dff719..0fe10c1e0 100644 --- a/app/lib/application_form_status_updater.rb +++ b/app/lib/application_form_status_updater.rb @@ -109,7 +109,7 @@ def statuses %w[awarded] elsif trs_trn_request.present? if trs_trn_request.potential_duplicate? - %w[potential_duplicate_in_dqt] + %w[potential_duplicate_in_trs] else %w[awarded_pending_checks] end diff --git a/app/lib/assessment_factory.rb b/app/lib/assessment_factory.rb index b353ea38a..a32361649 100644 --- a/app/lib/assessment_factory.rb +++ b/app/lib/assessment_factory.rb @@ -36,7 +36,7 @@ def personal_information_section (:name_change_document_present if application_form.has_alternative_name), :duplicate_application, :applicant_already_qts, - :applicant_already_dqt, + :applicant_already_trs, ].compact failure_reasons = [ @@ -55,7 +55,7 @@ def personal_information_section ), FailureReasons::DUPLICATE_APPLICATION, FailureReasons::APPLICANT_ALREADY_QTS, - FailureReasons::APPLICANT_ALREADY_DQT, + FailureReasons::APPLICANT_ALREADY_TRS, ].compact if suitability_active? diff --git a/app/lib/failure_reasons.rb b/app/lib/failure_reasons.rb index f8a9a587d..a099e0c4b 100644 --- a/app/lib/failure_reasons.rb +++ b/app/lib/failure_reasons.rb @@ -42,6 +42,7 @@ class FailureReasons ADDITIONAL_DEGREE_TRANSCRIPT_ILLEGIBLE = "additional_degree_transcript_illegible", APPLICANT_ALREADY_DQT = "applicant_already_dqt", + APPLICANT_ALREADY_TRS = "applicant_already_trs", APPLICATION_AND_QUALIFICATION_NAMES_DO_NOT_MATCH = "application_and_qualification_names_do_not_match", DEGREE_CERTIFICATE_ILLEGIBLE = "degree_certificate_illegible", diff --git a/app/views/assessor_interface/application_forms/show.html.erb b/app/views/assessor_interface/application_forms/show.html.erb index 53ff9c264..6a51634b7 100644 --- a/app/views/assessor_interface/application_forms/show.html.erb +++ b/app/views/assessor_interface/application_forms/show.html.erb @@ -18,9 +18,9 @@ <% if (duplicate_matches = @view_object.duplicate_matches).present? %> <%= govuk_notification_banner(title_text: "Important") do |notification_banner| %> - <% notification_banner.with_heading(text: "Application details match DQT record(s)") %> + <% notification_banner.with_heading(text: "Application details match TRS record(s)") %> -

The surname and date of birth used in this application matches the following records found in the Database of Qualified Teachers (DQT):

+

The surname and date of birth used in this application matches the following records found in the Teaching Record System (TRS):