Skip to content

Commit

Permalink
Merge branch 'master' into dash/oren/API-34439-poa-requests-index-end…
Browse files Browse the repository at this point in the history
…point
  • Loading branch information
nihil2501 committed Apr 12, 2024
2 parents 04a62ba + fa9d675 commit 435d835
Show file tree
Hide file tree
Showing 235 changed files with 9,378 additions and 3,013 deletions.
6 changes: 2 additions & 4 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ app/controllers/v0/evss_claims_async_controller.rb @department-of-veterans-affai
app/controllers/v0/evss_claims_controller.rb @department-of-veterans-affairs/benefits-management-tools-be @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/controllers/v0/example_controller.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/controllers/v0/feature_toggles_controller.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/controllers/v0/financial_status_reports_controller.rb @department-of-veterans-affairs/vsa-debt-resolution @department-of-veterans-affairs/backend-review-group
app/controllers/v0/folders_controller.rb @department-of-veterans-affairs/vfs-health-modernization-initiative @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/controllers/v0/form1010cg/attachments_controller.rb @department-of-veterans-affairs/vfs-10-10 @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/controllers/v0/form1095_bs_controller.rb @department-of-veterans-affairs/vfs-1095-b @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
Expand Down Expand Up @@ -246,7 +245,6 @@ app/models/form1010cg/submission.rb @department-of-veterans-affairs/vfs-10-10 @d
app/models/form1095_b.rb @department-of-veterans-affairs/vfs-1095-b @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/models/form526_job_status.rb @department-of-veterans-affairs/Disability-Experience @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/models/form526_submission.rb @department-of-veterans-affairs/Disability-Experience @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/models/form5655_submission.rb @department-of-veterans-affairs/vsa-debt-resolution @department-of-veterans-affairs/backend-review-group
app/models/form_attachment.rb @department-of-veterans-affairs/Benefits-Team-1 @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/models/form_profile.rb @department-of-veterans-affairs/vfs-authenticated-experience-backend @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/models/form_profiles @department-of-veterans-affairs/my-education-benefits @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
Expand Down Expand Up @@ -290,6 +288,7 @@ app/models/rate_limited_search.rb @department-of-veterans-affairs/va-api-enginee
app/models/saml_request_tracker.rb @department-of-veterans-affairs/octo-identity
app/models/saved_claim.rb @department-of-veterans-affairs/Benefits-Team-1 @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/models/session.rb @department-of-veterans-affairs/octo-identity
app/models/saved_claim/burial.rb @department-of-veterans-affairs/benefits-non-disability @department-of-veterans-affairs/pensions @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/models/saved_claim/pension.rb @department-of-veterans-affairs/pensions @department-of-veterans-affairs/backend-review-group
app/models/saved_claim/veteran_readiness_employment_claim.rb @department-of-veterans-affairs/benefits-non-disability @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/models/sign_in @department-of-veterans-affairs/octo-identity
Expand Down Expand Up @@ -977,6 +976,7 @@ rakelib/mockdata_synchronize.rake @department-of-veterans-affairs/octo-identity
rakelib/pension_burial.rake @department-of-veterans-affairs/mbs-core-team @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
rakelib/piilog_repl @department-of-veterans-affairs/backend-review-group @department-of-veterans-affairs/va-api-engineers
rakelib/prod @department-of-veterans-affairs/vfs-vaos @department-of-veterans-affairs/backend-review-group @department-of-veterans-affairs/va-api-engineers
rakelib/prod/user_credential.rake @department-of-veterans-affairs/octo-identity
rakelib/remove_va1995s_records.rake @department-of-veterans-affairs/govcio-vfep-codereviewers @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
rakelib/routes_csv.rake @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
rakelib/rswag.rake @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
Expand Down Expand Up @@ -1013,7 +1013,6 @@ spec/controllers/v0/evss_claims_async_controller_spec.rb @department-of-veterans
spec/controllers/v0/evss_claims_controller_spec.rb @department-of-veterans-affairs/vfs-authenticated-experience-backend @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/controllers/v0/example_controller_spec.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/controllers/v0/feature_toggles_controller_spec.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/controllers/v0/financial_status_reports_controller_spec.rb @department-of-veterans-affairs/vsa-debt-resolution @department-of-veterans-affairs/backend-review-group
spec/controllers/v0/form1010cg @department-of-veterans-affairs/vfs-10-10 @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/controllers/v0/form1010cg/attachments_controller_spec.rb @department-of-veterans-affairs/vfs-10-10 @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/controllers/v0/forms_controller_spec.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group @department-of-veterans-affairs/vfs-public-websites-frontend
Expand Down Expand Up @@ -1427,7 +1426,6 @@ spec/models/form1010cg @department-of-veterans-affairs/vfs-10-10 @department-of-
spec/models/form1095_b_spec.rb @department-of-veterans-affairs/vfs-1095-b @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/models/form526_job_status_spec.rb @department-of-veterans-affairs/Disability-Experience @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/models/form526_submission_spec.rb @department-of-veterans-affairs/Disability-Experience @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/models/form5655_submission_spec.rb @department-of-veterans-affairs/vsa-debt-resolution @department-of-veterans-affairs/backend-review-group
spec/models/form_attachment_spec.rb @department-of-veterans-affairs/vfs-authenticated-experience-backend @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/models/form_profile_spec.rb @department-of-veterans-affairs/vfs-authenticated-experience-backend @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/models/form_submission_spec.rb @department-of-veterans-affairs/platform-va-product-forms @department-of-veterans-affairs/Disability-Experience @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
Expand Down
2 changes: 2 additions & 0 deletions Dangerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# frozen_string_literal: true

require 'ostruct'

module VSPDanger
HEAD_SHA = `git rev-parse --abbrev-ref HEAD`.chomp.freeze
BASE_SHA = 'origin/master'
Expand Down
15 changes: 7 additions & 8 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ GIT

GIT
remote: https://github.com/department-of-veterans-affairs/vets-json-schema
revision: 7892dc348677325cc57712ff4a12d6a78f024315
revision: 0832461353f871b688b0c231ecf9bdbfb1f9145a
branch: master
specs:
vets_json_schema (21.5.5)
vets_json_schema (22.0.3)
multi_json (~> 1.0)
script_utils (= 0.0.4)

Expand Down Expand Up @@ -571,8 +571,8 @@ GEM
iso_country_codes (0.7.8)
jar-dependencies (0.4.1)
jmespath (1.6.2)
json (2.7.1)
json (2.7.1-java)
json (2.7.2)
json (2.7.2-java)
json-schema (4.3.0)
addressable (>= 2.8)
json_schemer (2.2.1)
Expand Down Expand Up @@ -660,7 +660,7 @@ GEM
nio4r (2.7.0)
nio4r (2.7.0-java)
no_proxy_fix (0.1.2)
nokogiri (1.16.3)
nokogiri (1.16.4)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nori (2.6.0)
Expand Down Expand Up @@ -890,7 +890,7 @@ GEM
rswag-ui (2.13.0)
actionpack (>= 3.1, < 7.2)
railties (>= 3.1, < 7.2)
rubocop (1.62.1)
rubocop (1.63.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
Expand Down Expand Up @@ -952,7 +952,7 @@ GEM
rake (>= 10.0)
semantic_logger (4.15.0)
concurrent-ruby (~> 1.0)
sentry-ruby (5.17.2)
sentry-ruby (5.17.3)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
shellany (0.0.1)
Expand Down Expand Up @@ -1283,4 +1283,3 @@ RUBY VERSION

BUNDLED WITH
2.4.9

28 changes: 28 additions & 0 deletions app/controllers/v0/burial_claims_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,22 @@ module V0
class BurialClaimsController < ClaimsBaseController
service_tag 'burial-application'

def show
submission_attempt = determine_submission_attempt
if submission_attempt
state = submission_attempt.aasm_state == 'failure' ? 'failure' : 'success'
render(json: { data: { attributes: { state: } } })
elsif central_mail_submission
render(json: central_mail_submission)
else
Rails.logger.error("ActiveRecord::RecordNotFound: Claim submission not found for claim_id: #{params[:id]}")
render(json: { data: { attributes: { state: 'not found' } } }, status: :not_found)
end
rescue => e
Rails.logger.error(e.to_s)
render(json: { data: { attributes: { state: 'error processing request' } } }, status: :unprocessable_entity)
end

def create
PensionBurial::TagSentry.tag_sentry

Expand Down Expand Up @@ -37,5 +53,17 @@ def short_name
def claim_class
SavedClaim::Burial
end

private

def determine_submission_attempt
claim = claim_class.find_by(guid: params[:id])
form_submission = claim&.form_submissions&.last
form_submission&.form_submission_attempts&.last
end

def central_mail_submission
CentralMailSubmission.joins(:central_mail_claim).find_by(saved_claims: { guid: params[:id] })
end
end
end
163 changes: 0 additions & 163 deletions app/controllers/v0/financial_status_reports_controller.rb

This file was deleted.

Loading

0 comments on commit 435d835

Please sign in to comment.