diff --git a/app/presenters/online_reschedule_presenter.rb b/app/presenters/online_reschedule_presenter.rb index f722e642..0ed42d14 100644 --- a/app/presenters/online_reschedule_presenter.rb +++ b/app/presenters/online_reschedule_presenter.rb @@ -15,6 +15,10 @@ def date previous_start_at.strftime(DATE_FORMAT) end + def new_date + appointment.start_at.strftime(DATE_FORMAT) + end + def reference appointment.id end diff --git a/app/views/online_reschedulings/index.html.erb b/app/views/online_reschedulings/index.html.erb index 3def418c..eb73022a 100644 --- a/app/views/online_reschedulings/index.html.erb +++ b/app/views/online_reschedulings/index.html.erb @@ -51,6 +51,7 @@ Customer Guider Original Date/Time + New Date/Time Rescheduled At <% unless current_user.tpas? %> Processed @@ -61,10 +62,11 @@ <% @results.each do |result| %> <% result = OnlineReschedulePresenter.new(result) %> - Reference#<%= result.reference %> + Reference<%= link_to "##{result.reference}", appointment_path(result) %> Customer<%= result.customer_name %> Guider<%= result.previous_guider_name %> (<%= result.previous_guider_organisation %>) Original Date/Time<%= result.date %> + New Date/Time<%= result.new_date %> Rescheduled At<%= result.rescheduled_at %> <% unless current_user.tpas? %> Processed<%= processed_label(result) %> diff --git a/spec/features/resource_manager_searches_for_online_rescheduled_appointments_spec.rb b/spec/features/resource_manager_searches_for_online_rescheduled_appointments_spec.rb index bb111db6..78a4fae5 100644 --- a/spec/features/resource_manager_searches_for_online_rescheduled_appointments_spec.rb +++ b/spec/features/resource_manager_searches_for_online_rescheduled_appointments_spec.rb @@ -56,6 +56,7 @@ def they_see_the_rescheduled_appointments expect(result.customer_name).to have_text(@first.name) expect(result.previous_guider_name).to have_text(@first.previous_guider.name) expect(result.appointment_date_time).to have_text('01 February 2025 12:00') + expect(result.appointment_new_date_time).to have_text('02 February 2025 13:00') expect(result.rescheduled_date_time).to have_text('30 January 2025 13:00') expect(result.processed).to have_text('Yes') end diff --git a/spec/support/pages/online_reschedulings_search.rb b/spec/support/pages/online_reschedulings_search.rb index 1c3e7e34..59ad65cd 100644 --- a/spec/support/pages/online_reschedulings_search.rb +++ b/spec/support/pages/online_reschedulings_search.rb @@ -7,6 +7,7 @@ class OnlineReschedulingsSearch < Base element :customer_name, '.t-name' element :previous_guider_name, '.t-previous-guider-name' element :appointment_date_time, '.t-appointment-date-time' + element :appointment_new_date_time, '.t-appointment-new-date-time' element :rescheduled_date_time, '.t-rescheduled-date-time' element :processed, '.t-processed' end