Skip to content

Commit

Permalink
Replace most alert-like header cards with alerts
Browse files Browse the repository at this point in the history
  • Loading branch information
werebus committed Oct 23, 2024
1 parent 99e80af commit 620d02e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
27 changes: 14 additions & 13 deletions app/views/assignments/_current.haml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
#current-assignment.text-center
.card.text-white.mb-3
- if @current_assignment.present?
.card-body.bg-success
%h5.card-title Currently on call: #{@current_assignment.user.last_name}
- else
.card-body.bg-warning
%h5.card-title No one is currently on call!
- if @fallback_user.present?
.card-text #{@fallback_user.last_name} is the fallback.
.card.mb-3
.card-body
.card-text On-call switches at: #{@roster.switchover_time.strftime('%-I:%M %P')}
- if @current_assignment.present?
.alert.alert-info
Currently on call:
%strong= @current_assignment.user.last_name
- else
.alert.alert-danger
No one is currently on call!
- if @fallback_user.present?
%hr
#{@fallback_user.last_name} is the fallback.

.card.mb-3
.card-body
.card-text On-call switches at #{@roster.switchover_time.strftime('%-I:%M %P')}
9 changes: 4 additions & 5 deletions app/views/users/index.haml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
%h1 Users in #{@roster.name}

- if @fallback.nil?
.card.bg-warning
.card-body
%h5.card-title No fallback user!
= link_to 'Select a fallback user', edit_roster_path(@roster)
- if @fallback.blank?
.alert.alert-warning.pb-0
%p No fallback user!
%p= link_to 'Select a fallback user', edit_roster_path(@roster), class: 'alert-link'

.container-fluid.my-4
.row
Expand Down

0 comments on commit 620d02e

Please sign in to comment.