Skip to content

Commit

Permalink
Remove error from display in UI (#4786)
Browse files Browse the repository at this point in the history
* - remove error from display in UI

* add comment

* remove from ui

* remove status error from spec

* Commit changes on schema

* revert schema changes
  • Loading branch information
EfeAgare authored Dec 23, 2024
1 parent b03ed67 commit 113ecae
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
3 changes: 2 additions & 1 deletion app/models/partner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ class Partner < ApplicationRecord
"application/vnd.openxmlformats-officedocument.wordprocessingml.document"
].freeze

enum :status, { uninvited: 0, invited: 1, awaiting_review: 2, approved: 3, error: 4, recertification_required: 5, deactivated: 6 }
# Status `4` (error) was removed for being obsolete but is intentionally skipped to preserve existing enum values.
enum status: { uninvited: 0, invited: 1, awaiting_review: 2, approved: 3, recertification_required: 5, deactivated: 6 }

belongs_to :organization
belongs_to :partner_group, optional: true
Expand Down
3 changes: 1 addition & 2 deletions app/views/partners/_statuses.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
"uninvited": 'ban',
"invited": 'envelope',
"awaiting_review": 'question-circle',
"approved": 'check-circle',
"error": 'exclamation-circle'
"approved": 'check-circle'
}.with_indifferent_access
current_filtered_status = params.dig(:filters, :by_status) %>

Expand Down
2 changes: 0 additions & 2 deletions spec/models/partner_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@
expect(build(:partner, status: :invited)).not_to be_deletable
expect(build(:partner, status: :awaiting_review)).not_to be_deletable
expect(build(:partner, status: :approved)).not_to be_deletable
expect(build(:partner, status: :error)).not_to be_deletable
expect(build(:partner, status: :recertification_required)).not_to be_deletable
expect(build(:partner, status: :deactivated)).not_to be_deletable
end
Expand Down Expand Up @@ -191,7 +190,6 @@
it 'should return false', :aggregate_failures do
expect(build(:partner, status: :uninvited)).not_to be_approvable
expect(build(:partner, status: :approved)).not_to be_approvable
expect(build(:partner, status: :error)).not_to be_approvable
expect(build(:partner, status: :recertification_required)).not_to be_approvable
expect(build(:partner, status: :deactivated)).not_to be_approvable
end
Expand Down

0 comments on commit 113ecae

Please sign in to comment.