-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build new session triage tab (#3133)
This updates the design of the session triage page to match the latest designs in the prototype, where a single tab for triage is shown and the nurses are able to filter the patients by triage outcome and the status is shown per programme. ## Screenshots <img width="1132" alt="Screenshot 2025-03-04 at 15 32 45" src="https://github.com/user-attachments/assets/9f26ca47-76a6-4952-86ea-68e70fa77cde" /> <img width="1139" alt="Screenshot 2025-03-04 at 15 33 02" src="https://github.com/user-attachments/assets/3a8d7d35-9487-471d-b47b-1f6ad72cfa7e" /> <img width="895" alt="Screenshot 2025-03-04 at 15 33 20" src="https://github.com/user-attachments/assets/21fa57bf-3781-4425-a08e-b6d1fd4262c7" />
- Loading branch information
Showing
43 changed files
with
409 additions
and
238 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
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
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
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
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 @@ | ||
# frozen_string_literal: true | ||
|
||
require "pagy/extras/array" | ||
|
||
class Sessions::TriageController < ApplicationController | ||
include Pagy::Backend | ||
include SearchFormConcern | ||
|
||
before_action :set_session | ||
before_action :set_search_form | ||
|
||
layout "full" | ||
|
||
def show | ||
scope = | ||
@session.patient_sessions.preload_for_status.in_programmes( | ||
@session.programmes | ||
) | ||
|
||
patient_sessions = @form.apply(scope) | ||
|
||
if patient_sessions.is_a?(Array) | ||
@pagy, @patient_sessions = pagy_array(patient_sessions) | ||
else | ||
@pagy, @patient_sessions = pagy(patient_sessions) | ||
end | ||
end | ||
|
||
private | ||
|
||
def set_session | ||
@session = | ||
policy_scope(Session).includes(:programmes).find_by!( | ||
slug: params[:session_slug] | ||
) | ||
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
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
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
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
Oops, something went wrong.