Skip to content

Commit

Permalink
PWNN-2097 Ability to select DfE approved or CAB approved framework (#…
Browse files Browse the repository at this point in the history
…1998)

<!--
  1. New dependency? Is there an accompanying ADR?
2. New route? Is the code covered by functional (unit) and feature
(browser) tests?
3. New method/class? Have you documented your code using valid Yard
syntax?
  4. Do you need to update the CHANGELOG and add a PR ref?
-->

## Changes in this PR

**PWNN-2097 Ability to select DfE approved or CAB approved framework**

app/controllers/support/frameworks_controller.rb - Added new condtion to
filter approved framework

<!--
  Succinct list of changes explaining what has changed and why.
-->

## Screen-shots or screen-capture of UI changes

<!--
  # Screen-shots
  - Include full page from header to footer, cropping the sides to fit.

  # Screen-captures
  - Record only the browser window
  - Don't full screen the browser window (to avoid large files)
- Break into separate videos if there are several journeys being
presented
  - Mac guide: https://support.apple.com/en-gb/HT208721
- Windows guide:
https://support.microsoft.com/en-us/windows/5328cd25-9046-4472-8a14-c485f138802c
-->
  • Loading branch information
edwin-jebaraj authored Nov 26, 2024
2 parents 3855c77 + 157cf70 commit 1b22e4a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/controllers/support/frameworks_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ def index

render json: ::Frameworks::Framework
.not_evaluating
.approved_status
.omnisearch(params[:q])
.order("reference DESC")
.as_json(methods:)
Expand Down
1 change: 1 addition & 0 deletions app/models/frameworks/framework/filterable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module Frameworks::Framework::Filterable
scope :by_proc_ops_lead, ->(proc_ops_lead_ids) { where(proc_ops_lead_id: Array(proc_ops_lead_ids)) }
scope :by_provider_contact, ->(provider_contact_ids) { where(provider_contact_id: Array(provider_contact_ids)) }
scope :by_omnisearch, ->(query) { omnisearch(query) }
scope :approved_status, -> { where(status: %w[dfe_approved cab_approved]) }
end

class_methods do
Expand Down

0 comments on commit 1b22e4a

Please sign in to comment.