From 5edfaf5a8ac746f534a41500e75d2673cfbada09 Mon Sep 17 00:00:00 2001 From: Igor Moyzeson Date: Tue, 7 Apr 2026 00:42:28 -0700 Subject: [PATCH] updated requests dashboard --- app/views/requests/instructor_index.html.erb | 19 +++++++++++++------ app/views/requests/student_index.html.erb | 6 ++++++ 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/app/views/requests/instructor_index.html.erb b/app/views/requests/instructor_index.html.erb index 4274f8ef..57e440ed 100644 --- a/app/views/requests/instructor_index.html.erb +++ b/app/views/requests/instructor_index.html.erb @@ -46,7 +46,8 @@ Original Due Date Requested Due Date # of Days - Status + Status + Updated At @@ -127,17 +128,23 @@ <% else %> Approved <% end %> - on <%= request.updated_at.strftime('%a, %b %-d at %-I:%M%P') || 'N/A' %> - by <%= request.auto_approved ? 'Auto Approval System' : request.last_processed_by_user&.name || 'Unknown' %> <% when 'denied' %> - Denied - on <%= request.updated_at.strftime('%a, %b %-d at %-I:%M%P') || 'N/A' %> - by <%= request.last_processed_by_user&.name || 'Unknown' %> + Denied <% else %> Unknown <% end %> <% end %> + + <% case request.status %> + <% when 'approved' %> + <%= request.updated_at.strftime('%a, %b %-d at %-I:%M%P') %> + by <%= request.auto_approved ? 'Auto Approval System' : request.last_processed_by_user&.name || 'Unknown' %> + <% when 'denied' %> + <%= request.updated_at.strftime('%a, %b %-d at %-I:%M%P') %> + by <%= request.last_processed_by_user&.name || 'Unknown' %> + <% end %> + <% end %> diff --git a/app/views/requests/student_index.html.erb b/app/views/requests/student_index.html.erb index e955f237..4ed64ef4 100644 --- a/app/views/requests/student_index.html.erb +++ b/app/views/requests/student_index.html.erb @@ -14,6 +14,7 @@ Requested Due Date # of Days Status + Updated At Actions @@ -56,6 +57,11 @@ Unknown <% end %> + + <% if request.status == 'approved' || request.status == 'denied' %> + <%= request.updated_at.strftime('%a, %b %-d at %-I:%M%P') %> + <% end %> + <%= link_to 'View', course_request_path(@course, request), class: "btn btn-sm btn-primary" %> <% if request&.status == 'pending' %>