Skip to content

Commit

Permalink
fix model
Browse files Browse the repository at this point in the history
  • Loading branch information
aherzberg committed Sep 6, 2024
1 parent c80dae6 commit 8f1f8a1
Show file tree
Hide file tree
Showing 6 changed files with 99 additions and 143 deletions.
28 changes: 0 additions & 28 deletions modules/mobile/app/models/mobile/v0/appeals/alert.rb

This file was deleted.

104 changes: 98 additions & 6 deletions modules/mobile/app/models/mobile/v0/appeals/appeal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,113 @@ class Appeal < Common::Resource
'multiple'
)

ALERT_TYPES = Types::String.enum(
'form9_needed',
'scheduled_hearing',
'hearing_no_show',
'held_for_evidence',
'cavc_option',
'ramp_eligible',
'ramp_ineligible',
'decision_soon',
'blocked_by_vso',
'scheduled_dro_hearing',
'dro_hearing_no_show'
)

EVENT_TYPES = Types::String.enum(
'claim_decision',
'nod',
'soc',
'form9',
'ssoc',
'certified',
'hearing_held',
'hearing_no_show',
'bva_decision',
'field_grant',
'withdrawn',
'ftr',
'ramp',
'death',
'merged',
'record_designation',
'reconsideration',
'vacated',
'other_close',
'cavc_decision',
'ramp_notice',
'transcript',
'remand_return',
'dro_hearing_held',
'dro_hearing_cancelled',
'dro_hearing_no_show'
)

LAST_ACTION_TYPES = Types::String.enum(
'field_grant',
'withdrawn',
'allowed',
'denied',
'remand',
'cavc_remand'
)

STATUS_TYPES = Types::String.enum(
'scheduled_hearing',
'pending_hearing_scheduling',
'on_docket',
'pending_certification_ssoc',
'pending_certification',
'pending_form9',
'pending_soc',
'stayed',
'at_vso',
'bva_development',
'decision_in_progress',
'bva_decision',
'field_grant',
'withdrawn',
'ftr',
'ramp',
'death',
'reconsideration',
'other_close',
'remand_ssoc',
'remand',
'merged'
)

attribute :id, Types::String
attribute :appealIds, Types::Array.of(Types::String)
attribute :active, Types::Bool
attribute :alerts, Types::Array.of(Appeals::Alert)
attribute :alerts, Types::Array do
attribute :type, ALERT_TYPES
attribute :details, Types::Hash
end
attribute :aod, Types::Bool.optional
attribute :aoj, AOJ_TYPES
attribute :description, Types::String
attribute :docket, Appeals::Docket.optional
attribute :events, Types::Array.of(Appeals::Event)
attribute :evidence, Types::Array.of(Appeals::Evidence).optional
attribute :docket, Docket.optional
attribute :events, Types::Array do
attribute :type, EVENT_TYPES
attribute :date, Types::Date
end
attribute :evidence, Types::Array.of(Evidence).optional
attribute :incompleteHistory, Types::Bool
attribute :issues, Types::Array.of(Appeals::Issue)
attribute :issues, Types::Array do
attribute :active, Types::Bool
attribute :lastAction, LAST_ACTION_TYPES.optional
attribute :description, Types::String
attribute :diagnosticCode, Types::String.optional
attribute :date, Types::Date
end
attribute :location, LOCATION_TYPES
attribute :programArea, PROGRAM_AREA_TYPES
attribute :status, Appeals::Status
attribute :status do
attribute :type, STATUS_TYPES
attribute :details, Types::Hash
end
attribute :type, Types::String
attribute :updated, Types::DateTime
end
Expand Down
43 changes: 0 additions & 43 deletions modules/mobile/app/models/mobile/v0/appeals/event.rb

This file was deleted.

26 changes: 0 additions & 26 deletions modules/mobile/app/models/mobile/v0/appeals/issue.rb

This file was deleted.

39 changes: 0 additions & 39 deletions modules/mobile/app/models/mobile/v0/appeals/status.rb

This file was deleted.

2 changes: 1 addition & 1 deletion modules/mobile/spec/requests/mobile/v0/appeal_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
end
end

it 'and attempting to access a nonexistant appeal returns a 404 wtih an error' do
it 'and attempting to access a nonexistent appeal returns a 404 with an error' do
VCR.use_cassette('caseflow/appeals') do
get '/mobile/v0/appeal/1234567', headers: sis_headers
expect(response).to have_http_status(:not_found)
Expand Down

0 comments on commit 8f1f8a1

Please sign in to comment.