-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #148 from lsa-mis/LRA-969-room-ready-show-last-roo…
…m-update-log-entry Lra 969 room ready show last RoomUpdateLog entry
- Loading branch information
Showing
5 changed files
with
52 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,4 +55,7 @@ def total_rooms(zone) | |
.count | ||
end | ||
|
||
def room_update_log_status(log_note) | ||
log_note.split("|").first.strip | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<div class="col-lg-4 col-md-6 col-sm-12 mb-3"> | ||
<div class="card"> | ||
<div class="card-header"> | ||
<h3>Resources Script</h3> | ||
</div> | ||
<div class="card-body"> | ||
<h6 class="card-text mb-4">Last Run at: <%= show_date_with_time(last_room_update_log.created_at) %></h6> | ||
<h6 class="card-text mb-4"> | ||
Status: | ||
<span | ||
class="<%= room_update_log_status(last_room_update_log.note) == 'error' ? 'text-danger' : 'text-success' %>"> | ||
<%= last_room_update_log.note.include?('success') ? 'SUCCESS' : 'ERROR' %> | ||
</span> | ||
</h6> | ||
|
||
<h6 class="card-text mb-4"> | ||
Note: | ||
<% if room_update_log_status(last_room_update_log.note) == 'success' %> | ||
Resources updated successfully for rooms. | ||
<% elsif room_update_log_status(last_room_update_log.note) == 'success-partial' %> | ||
Resources updated successfully for rooms. | ||
<a class="text-primary" data-bs-toggle="collapse" href="#nonExistingRooms" role="button" aria-expanded="false" aria-controls="nonExistingRooms"> | ||
These | ||
</a> | ||
rooms (rmrecnbr) don't exist in WebCheckout. | ||
<div class="collapse" id="nonExistingRooms"> | ||
<div class="card card-body"> | ||
<%= last_room_update_log.note.split(':').last.strip %> | ||
</div> | ||
</div> | ||
<% elsif room_update_log_status(last_room_update_log.note) == 'error' %> | ||
An error occurred while updating resources for rooms. Please report an issue. | ||
<% end %> | ||
</h6> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters